private void InitSettings() { settings = new Settings(); settings.Reload(); if (settings.SwitchHotkey.KeyData == Keys.None) { settings.SwitchHotkey = new KeyboardEventArgs(Keys.Pause, false); } SaveSettings(); }
private void InitSettings() { settings = new Settings(); settings.Reload(); if (settings.SwitchHotkey.KeyData == Keys.None) { settings.SwitchHotkey = new KeyboardEventArgs(Keys.Pause, false); } SaveSettings(); }
private void OnSettings(object sender, EventArgs e) { engine.Stop(); var settingsForm = new SettingsForm(settings); settingsForm.FormClosed += (a, b) => engine.Start(); var result = settingsForm.ShowDialog(); if (result == DialogResult.OK) { SaveSettings(); } else { settings.Reload(); } }
public static Settings Init() { var settings = new Settings(); settings.Reload(); if (settings.SwitchHotkey.KeyData == Keys.None) { settings.SwitchHotkey = new KeyboardEventArgs(Keys.Pause, false); } if (settings.ConvertSelectionHotkey.KeyData == Keys.None) { settings.ConvertSelectionHotkey = new KeyboardEventArgs(Keys.Pause | Keys.Shift, false); } if (settings.ShowTrayIcon == null) { settings.ShowTrayIcon = true; } if (settings.SwitchDelay < 1) { settings.SwitchDelay = 20; } settings.Save(); return(settings); }
void ResetSettings() { settings.Reload(); }
public static Settings Init() { var settings = new Settings(); settings.Reload(); if (settings.SwitchHotkey.KeyData == Keys.None) { settings.SwitchHotkey = new KeyboardEventArgs(Keys.Pause, false); } if (settings.ConvertSelectionHotkey.KeyData == Keys.None) { settings.ConvertSelectionHotkey = new KeyboardEventArgs(Keys.Pause | Keys.Shift, false); } if (settings.ShowTrayIcon == null) { settings.ShowTrayIcon = true; } if (settings.SwitchDelay < 1) { settings.SwitchDelay = 20; } settings.Save(); return settings; }