public RateHistory()
 {
     this.InitializeComponent();
     this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
     ViewModel              = DataViewModel.getInstance();
     webHandler             = new WebHandler();
     FromDatePicker.MinYear = new DateTime(2002, 01, 01);
     FromDatePicker.MaxYear = DateTime.Today;
     ToDatePicker.MaxYear   = DateTime.Today;
     if (ViewModel.FromRateHistoryDate != null)
     {
         FromDatePicker.SelectedDate = ViewModel.FromRateHistoryDate;
         ToDatePicker.IsEnabled      = true;
         if (ViewModel.ToRateHistoryDate != null)
         {
             ToDatePicker.SelectedDate    = ViewModel.ToRateHistoryDate;
             DownloadDataButton.IsEnabled = true;
             if (ViewModel.HistoryOfCurrency != null)
             {
                 loadChartData();
             }
         }
     }
     lineChart.LegendItems.Clear();
 }
예제 #2
0
 public MainPage()
 {
     this.InitializeComponent();
     this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
     ViewModel  = DataViewModel.getInstance();
     webHandler = new WebHandler();
     if (ViewModel.Dates == null)
     {
         DownloadDates();
     }
     else
     {
         if (DatesListView != null)
         {
             DatesListView.SelectedIndex = ViewModel.CurrentDateSelection;
         }
     }
 }
예제 #3
0
 public WebHandler()
 {
     this.httpClient = new HttpClient();;
     ViewModel       = DataViewModel.getInstance();
 }