private void SettingsSave() { try { //Color Theme setting_ColorTheme.SelectedIndexChanged += async (sender, e) => { Picker ComboBox = (Picker)sender; await AppSettingSave("ColorTheme", ComboBox.SelectedIndex); //Adjust the color theme AppAdjust.AdjustColorTheme(); }; //Item Scroll Direction setting_ListViewDirection.SelectedIndexChanged += async (sender, e) => { Picker ComboBox = (Picker)sender; await AppSettingSave("ListViewDirection", ComboBox.SelectedIndex); //Adjust the scrolling direction if (EventChangeListViewDirection != null) { EventChangeListViewDirection(ComboBox.SelectedIndex); } }; //Adjust Font Size setting_AdjustFontSize.ValueChanged += async (sender, e) => { Slider Slider = (Slider)sender; await AppSettingSave("AdjustFontSize", Convert.ToInt32(Slider.Value).ToString()); setting_AdjustFontSizeText.Text = "Adjust the displayed font size: " + Convert.ToInt32(Slider.Value); //Adjust the font sizes AppAdjust.AdjustFontSizes(); }; //Item list view style setting_ListViewStyle.SelectedIndexChanged += async (sender, e) => { Picker ComboBox = (Picker)sender; await AppSettingSave("ListViewStyle", ComboBox.SelectedIndex); //Adjust the list style if (EventChangeListViewStyle != null) { EventChangeListViewStyle(ComboBox.SelectedIndex); } }; } catch { } }
private void SettingsSave() { try { //Disable Landscape Display setting_DisableLandscapeDisplay.Click += (sender, e) => { CheckBox CheckBox = (CheckBox)sender; if ((bool)CheckBox.IsChecked) { AppVariables.ApplicationSettings["DisableLandscapeDisplay"] = true; DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait; } else { AppVariables.ApplicationSettings["DisableLandscapeDisplay"] = false; DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.Landscape; } }; //Color Theme setting_ColorTheme.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ColorTheme"] = ComboBox.SelectedIndex; //Adjust the color theme AppAdjust.AdjustColorTheme(); }; //Item Scroll Direction setting_ItemScrollDirection.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ItemScrollDirection"] = ComboBox.SelectedIndex; //Adjust the scrolling direction EventAdjustItemsScrollingDirection(ComboBox.SelectedIndex); }; //Adjust Font Size setting_AdjustFontSize.ValueChanged += (sender, e) => { Slider Slider = (Slider)sender; AppVariables.ApplicationSettings["AdjustFontSize"] = Slider.Value.ToString(); //Adjust the font sizes AppAdjust.AdjustFontSizes(); }; //Item list view style setting_ListViewStyle.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ListViewStyle"] = ComboBox.SelectedIndex; //Adjust the list style EventChangeListViewStyle(ComboBox.SelectedIndex); }; } catch { } }
private void SettingsSave() { try { //Disable Landscape Display setting_DisableLandscapeDisplay.Click += (sender, e) => { CheckBox CheckBox = (CheckBox)sender; AppVariables.ApplicationSettings["DisableLandscapeDisplay"] = (bool)CheckBox.IsChecked; //Adjust screen rotation AppAdjust.AdjustScreenRotation(); //Adjust the listview rotation AppAdjust.AdjustListviewRotationEvent(null, null); }; //Color Theme setting_ColorTheme.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ColorTheme"] = ComboBox.SelectedIndex; //Adjust the color theme AppAdjust.AdjustColorTheme(); }; //Item Scroll Direction setting_ItemScrollDirection.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ItemScrollDirection"] = ComboBox.SelectedIndex; //Adjust the scrolling direction EventAdjustItemsScrollingDirection(ComboBox.SelectedIndex); }; //Adjust Font Size setting_AdjustFontSize.ValueChanged += (sender, e) => { Slider Slider = (Slider)sender; string fontSize = Slider.Value.ToString(); AppVariables.ApplicationSettings["AdjustFontSize"] = Slider.Value.ToString(); textblock_AdjustFontSize.Text = textblock_AdjustFontSize.Tag.ToString() + fontSize; //Adjust the font sizes AppAdjust.AdjustFontSizes(); }; //Item list view style setting_ListViewStyle.SelectionChanged += (sender, e) => { ComboBox ComboBox = (ComboBox)sender; AppVariables.ApplicationSettings["ListViewStyle"] = ComboBox.SelectedIndex; //Adjust the list style EventChangeListViewStyle(ComboBox.SelectedIndex); }; } catch { } }