public void ClosePopup() { try { //Reset the image resources vBitmapImage = null; image_source.Source = null; //Disable page events DisablePageEvents(); //Adjust screen rotation AppAdjust.AdjustScreenRotation(); //Close the popup popup_Main.IsOpen = false; } 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 { } }