Пример #1
0
 protected override void OnDisappearing()
 {
     try
     {
         DataStorage.UpdateOption("Color Code", ColorCodePicker.SelectedItem as string);
         try
         {
             int minValue = -100;
             int maxValue = 100;
             if (MinEntry.Text != "")
             {
                 minValue = Convert.ToInt32(MinEntry.Text);
             }
             if (MaxEntry.Text != "")
             {
                 maxValue = Convert.ToInt32(MaxEntry.Text);
             }
             if (minValue < maxValue)
             {
                 SettingsManagerInterface.SetString(minValue.ToString(), "Min");
                 SettingsManagerInterface.SetString(maxValue.ToString(), "Max");
             }
             else
             {
                 throw new ArgumentException();
             }
         }
         catch (Exception)
         {
             ShowToast("Invalid Entry Into Min Max Feild");
         }
     }
     catch (Exception ex)
     {
     }
     base.OnDisappearing();
 }
Пример #2
0
        private void ThemeChanged(object sender, EventArgs e)
        {
            SettingsManagerInterface.SetString((ThemePicker.SelectedItem as string), "SelectedString");
            switch ((ThemePicker.SelectedItem as string))
            {
            case "Blue":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["LightBlue"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["Blue"];
                break;

            case "Orange":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["Orange"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["DarkOrange"];
                break;

            case "GrayScale":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["Black"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["Black"];
                break;

            case "Neon":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["Pink"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["DarkPink"];
                break;

            case "Green":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["Green"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["DarkGreen"];
                break;

            case "Red":
                Application.Current.Resources["TraceColor"]        = (Color)Application.Current.Resources["Red"];
                Application.Current.Resources["NavigationPrimary"] = (Color)Application.Current.Resources["DarkRed"];
                break;
            }
        }