コード例 #1
0
        public ExecutionReportWindow(ExecutionStatsGenerator statsGen)
        {
            var dialogService = new DialogService(this);

            InitializeComponent();
            ViewModel   = new ExecutionReportViewModel(statsGen, dialogService);
            DataContext = ViewModel;
        }
コード例 #2
0
ファイル: OrdersPageViewModel.cs プロジェクト: spurnaye/QPAS
        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
ファイル: OrdersPageViewModel.cs プロジェクト: QANTau/QPAS
        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
ファイル: OrdersPageViewModel.cs プロジェクト: herbota/QPAS
        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;
 }