예제 #1
0
        private void Settings_Close()
        {
            // Move these to strings so we can set the local settings easier
            string _Accent1 = $"{Settings_Tab_Appearance_AccentColourPicker.SelectedColour.R},{Settings_Tab_Appearance_AccentColourPicker.SelectedColour.G},{Settings_Tab_Appearance_AccentColourPicker.SelectedColour.B}";
            string _Accent2 = $"{Settings_Tab_Appearance_MenuGradientSecondColourPicker.SelectedColour.R},{Settings_Tab_Appearance_MenuGradientSecondColourPicker.SelectedColour.G},{Settings_Tab_Appearance_MenuGradientSecondColourPicker.SelectedColour.B}";
            string _Accent3 = Settings_Tab_Appearance_GradientEnabledCheckBox.IsChecked.ToString();

            string _DefaultCatsystem = Settings_Tab_General_DefaultCatSystemBox.Text;
            string _DotSize          = $"{Settings_Tab_Appearance_DotSizeXText.Text},{Settings_Tab_Appearance_DotSizeYText.Text}";
            string _LineSize         = $"{Settings_Tab_Appearance_LineSizeText.Text}";

            // This is for autoupdating.
            SettingsAPI.SetSetting("AccentColour1", _Accent1);
            SettingsAPI.SetSetting("AccentColour2", _Accent2);
            SettingsAPI.SetSetting("AccentEnabled", _Accent3);
            SettingsAPI.SetSetting("DotSize", _DotSize);
            SettingsAPI.SetSetting("DefaultCategorySystem", _DefaultCatsystem);
            SettingsAPI.SetSetting("LineSize", _LineSize);

            ApplicationSettings.DotSize = new Point(Settings_Tab_Appearance_DotSizeXSlider.Value, Settings_Tab_Appearance_DotSizeYSlider.Value);

            // Show a message box telling the user they need to restart to save their settings
            MessageBox.Show("You must restart the Track Maker for these settings to take effect.", "Information", MessageBoxButton.OK, MessageBoxImage.Information);

            Close();
        }
예제 #2
0
        public MainPage()
        {
            InitializeComponent();

            masterPage.listView.ItemSelected += OnItemSelected;

            if (Device.RuntimePlatform == Device.UWP)
            {
                MasterBehavior = MasterBehavior.Popover;
                //Load UWP Settings
                string       url = SettingsAPI.UMDUrl;
                UMDAppConfig cfg = SettingsAPI.LoadConfig();
            }
        }