public GeneralOptions(Settings settings)
        {
            InitializeComponent();

            this.settings = settings;
            chbAutosave.Checked = settings.AutoSaveActiveFiles;
            chbRemoveTextOnEnter.Checked = settings.RemoveTextOnEnter;
            chbShowDetails.Checked = settings.ShowConsoleDetails;
            nudMinutes.Value = settings.AutoSaveInterval;
            chbShowStartPage.Checked = settings.ShowStartPageAtLaunch;
            chbAutocloseStartPage.Checked = settings.AutoCloseStartPage;
        }
Exemple #2
0
 private void Options_FormClosed(object sender, FormClosedEventArgs e)
 {
     settings = ((OptionsMenu)sender).settings;
 }
Exemple #3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            if (File.Exists("settings.config"))
            {
                settings = Json.Decode<Settings>(File.ReadAllText("settings.config"));
                if (!settings.SeenPatchNotes)
                {
                    ShowPatchNotes();
                }
            }
            else
            {
                settings = new Settings();
                ShowPatchNotes();
            }

            AutoSaveTimer.Interval = settings.AutoSaveInterval * 60000;
            AutoSaveTimer.Enabled = settings.AutoSaveActiveFiles;
            AutoSaveTimer.Tick += AutoSaveTimer_Tick;

            ShowStartPage();
        }
Exemple #4
0
        public HotkeyOptions(Settings settings)
        {
            InitializeComponent();

            appWideKeys = new AppWideKeys(settings.AppWideShortcutKeys);
            editorHotkeys = new EditorHotkeys(settings.EditorShortcutKeys);
        }
Exemple #5
0
        public OptionsMenu(Settings settings)
        {
            InitializeComponent();

            this.settings = settings;
        }