Example #1
0
 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();
 }
Example #2
0
 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;
     }
 }