public HomePage()
 {
     InitializeComponent();
     refreshTimer = new DispatcherTimer() { Interval = TimeSpan.FromSeconds(Properties.Settings.Default.RefreshInterval) };
     refreshTimer.Tick += (s, e) => Model.Calculate();
     model = new ChartViewModel();
     model.OnBeginCalculate += BeginCalculate;
     model.OnEndCalculate += EndCalculate;
     quarterPage = new QuarterChartPage(model);
     dayPage = new DayChartPage(model);
     model.Load();
     ChartViewForm.DataContext = model;
     ChartContainer.Content = /*quarterPage*/dayPage;
     refreshTimer.Start();
 }
 public DayChartPage(ChartViewModel model)
 {
     InitializeComponent();
     viewModel = model;
 }