Пример #1
0
        public ExecutionReportWindow(ExecutionStatsGenerator statsGen)
        {
            var dialogService = new DialogService(this);

            InitializeComponent();
            ViewModel   = new ExecutionReportViewModel(statsGen, dialogService);
            DataContext = ViewModel;
        }
Пример #2
0
        public OrdersPageViewModel(IDBContext context, IDialogService dialogService, IDataSourcer datasourcer, MainViewModel parent)
            : base(dialogService)
        {
            Context     = context;
            Parent      = parent;
            Datasourcer = datasourcer;

            TradesRepository = new TradesRepository(Context, Datasourcer);

            OrdersSource        = new CollectionViewSource();
            OrdersSource.Source = Context.Orders.Local;
            OrdersSource.SortDescriptions.Add(new SortDescription("TradeDate", ListSortDirection.Descending));

            ExecutionStatsGenerator = new ExecutionStatsGenerator(datasourcer);

            CreateCommands();
        }
Пример #3
0
        public OrdersPageViewModel(IDBContext context, IDialogCoordinator dialogService, IDataSourcer datasourcer, IMainViewModel parent)
            : base(dialogService)
        {
            Context = context;
            Parent = parent;
            Datasourcer = datasourcer;

            TradesRepository = parent.TradesRepository;

            OrdersSource = new CollectionViewSource();
            OrdersSource.Source = Context.Orders.Local;
            OrdersSource.SortDescriptions.Add(new SortDescription("TradeDate", ListSortDirection.Descending));

            ExecutionStatsGenerator = new ExecutionStatsGenerator(datasourcer);

            CreateCommands();
        }
Пример #4
0
        public OrdersPageViewModel(IContextFactory contextFactory, IDialogCoordinator dialogService, IDataSourcer datasourcer, IAppSettings settings, DataContainer data, IScriptRunner scriptRunner, IMainViewModel parent)
            : base(dialogService)
        {
            Parent           = parent;
            _contextFactory  = contextFactory;
            Datasourcer      = datasourcer;
            _data            = data;
            _scriptRunner    = scriptRunner;
            TradesRepository = new TradesRepository(contextFactory, datasourcer, settings);

            OrdersSource        = new CollectionViewSource();
            OrdersSource.Source = data.Orders;
            OrdersSource.SortDescriptions.Add(new SortDescription("TradeDate", ListSortDirection.Descending));

            ExecutionStatsGenerator = new ExecutionStatsGenerator(datasourcer);

            CreateCommands();
        }
Пример #5
0
        public ExecutionReportViewModel(ExecutionStatsGenerator statsGenerator, IDialogCoordinator dialogService)
            : base(dialogService)
        {
            UseSessionsTime = true;
            ReferenceTime   = new DateTime(1, 1, 1, 16, 0, 0);

            StatsGenerator = statsGenerator;

            OrderCount = StatsGenerator.Orders.Count;

            Benchmark = ExecutionBenchmark.Close;

            Stats = new ObservableCollection <KeyValuePair <string, string> >();
            Data  = new ExecutionReportDS();
            TimeVsSlippagePoints = new ObservableCollection <Point3D>();

            CreateCommands();
        }
Пример #6
0
        public ExecutionReportViewModel(ExecutionStatsGenerator statsGenerator, IDialogCoordinator dialogService)
            : base(dialogService)
        {
            UseSessionsTime = true;
            ReferenceTime = new DateTime(1, 1, 1, 16, 0, 0);

            StatsGenerator = statsGenerator;

            OrderCount = StatsGenerator.Orders.Count;

            Benchmark = ExecutionBenchmark.Close;

            Stats = new ObservableCollection<KeyValuePair<string, string>>();
            Data = new ExecutionReportDS();
            TimeVsSlippagePoints = new ObservableCollection<Point3D>();

            CreateCommands();
        }
Пример #7
0
 public ExecutionReportWindow(ExecutionStatsGenerator statsGen)
 {
     InitializeComponent();
     ViewModel = new ExecutionReportViewModel(statsGen, DialogCoordinator.Instance);
     DataContext = ViewModel;
 }
Пример #8
0
 public ExecutionReportWindow(ExecutionStatsGenerator statsGen)
 {
     InitializeComponent();
     ViewModel   = new ExecutionReportViewModel(statsGen, DialogCoordinator.Instance);
     DataContext = ViewModel;
 }