Example #1
0
        private void btnSaveChanges_Click(object sender, EventArgs e)
        {
            settings.StandardRPPEP             = (int)nudRealPixelsPerEditorPixels.Value;
            settings.VisualizerBackgroundColor = btnSetColorOfVisualizerBackground.BackColor;
            ProgramInfo.CurrentTheme           = ProgramInfo.MainThemesController.GetTheme(cmbThemes.Text);

            ProgramInfo.MainSettings = settings;
            FormsManager.ReloadAllForms();
            Program.SaveSettings();

            Close();
        }
Example #2
0
        static public void LoadSettings()
        {
            if (!File.Exists(settingsFilePath))
            {
                ProgramInfo.MainSettings = SettingsInfo.Default;
                ProgramInfo.CurrentTheme = ProgramInfo.MainThemesController.GetTheme("Standard");
                return;
            }

            string fileContent = File.ReadAllText(settingsFilePath);

            string[] dataParts = fileContent.Split('|');

            ProgramInfo.CurrentTheme = ProgramInfo.MainThemesController.GetTheme(dataParts[0]);
            FormsManager.ReloadAllForms();
            ProgramInfo.MainSettings = new SettingsInfo()
            {
                StandardRPPEP             = int.Parse(dataParts[1]),
                VisualizerBackgroundColor = Color.FromArgb(int.Parse(dataParts[2])),
            };
        }