private async void TextBlock_Loaded(object sender, RoutedEventArgs e) { settings st = new settings(); Settings_Config cfg = await st.readCollection(file); comboBox.SelectedIndex = cfg.start; }
private void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { int _start = comboBox.SelectedIndex; settings st = new Campus_Harburg_Core.settings(); Settings_Config cfg = new Settings_Config(); cfg.start = _start; st.writeCollection(file, cfg); }
protected override async void OnNavigatedTo(NavigationEventArgs e) { API_InternalFile_UWP file = new API_InternalFile_UWP(); settings set = new settings(); Settings_Config cfg = await set.readCollection(file); switch (cfg.start) { case 0: { this.MyFrame.Navigate(typeof(frm_start)); } break; case 1: { } break; case 2: { this.MyFrame.Navigate(typeof(frm_mensa)); } break; case 3: { this.MyFrame.Navigate(typeof(room_search)); } break; default: { this.MyFrame.Navigate(typeof(frm_start)); } break; } SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; SystemNavigationManager.GetForCurrentView().BackRequested += MainPage_BackRequested; base.OnNavigatedTo(e); if (ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract", 1, 0)) { HardwareButtons.BackPressed += MainPage_BackRequestedH; } }