예제 #1
0
        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;
        }
예제 #2
0
 private void Options_FormClosed(object sender, FormClosedEventArgs e)
 {
     settings = ((OptionsMenu)sender).settings;
 }
예제 #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();
        }
예제 #4
0
        public HotkeyOptions(Settings settings)
        {
            InitializeComponent();

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

            this.settings = settings;
        }