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();
 }
 private void SlideButton_Clik(object sender, RoutedEventArgs e)
 {
     if (ChartContainer.Content == quarterPage)
     {
         dayPage = new DayChartPage(model);
         dayPage.Refresh();
         ChartContainer.Content = dayPage;
     }
     else
     {
         quarterPage = new QuarterChartPage(model);
         quarterPage.Refresh();
         ChartContainer.Content = quarterPage;
     }
 }