public ExecutionReportWindow(ExecutionStatsGenerator statsGen) { var dialogService = new DialogService(this); InitializeComponent(); ViewModel = new ExecutionReportViewModel(statsGen, dialogService); DataContext = ViewModel; }
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(); }
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(); }
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(); }
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(); }
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(); }
public ExecutionReportWindow(ExecutionStatsGenerator statsGen) { InitializeComponent(); ViewModel = new ExecutionReportViewModel(statsGen, DialogCoordinator.Instance); DataContext = ViewModel; }