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; }
private void Options_FormClosed(object sender, FormClosedEventArgs e) { settings = ((OptionsMenu)sender).settings; }
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(); }
public HotkeyOptions(Settings settings) { InitializeComponent(); appWideKeys = new AppWideKeys(settings.AppWideShortcutKeys); editorHotkeys = new EditorHotkeys(settings.EditorShortcutKeys); }
public OptionsMenu(Settings settings) { InitializeComponent(); this.settings = settings; }