public bool Commit(ITerminalSessionOptions terminalsession, IMRUOptions mru, ICoreServicePreference window, IStartupActionOptions startup) { StringResource sr = OptionDialogPlugin.Instance.Strings; string itemname = null; bool successful = false; try { itemname = sr.GetString("Caption.OptionDialog.MRUCount"); mru.LimitCount = Int32.Parse(_MRUSize.Text); terminalsession.AskCloseOnExit = _askCloseOnExit.Checked; window.ShowsToolBar = _showToolBar.Checked; window.Language = ((EnumListItem <Language>)_languageBox.SelectedItem).Value; startup.StartupAction = ((EnumListItem <StartupAction>)_startupOptionBox.SelectedItem).Value; successful = true; } catch (FormatException) { GUtil.Warning(this, String.Format(sr.GetString("Message.OptionDialog.InvalidItem"), itemname)); } catch (Exception ex) { GUtil.Warning(this, ex.Message); } return(successful); }
/* * public void ReloadMenu(string extension_point_name) { * MainMenuItem item = _menu.FindMainMenuItem(extension_point_name); * if(item==null) throw new ArgumentException("extension point not found"); * foreach(MainWindow w in _windows) w.ReloadMenu(_menu, item); * } */ public void ReloadPreference(ICoreServicePreference pref) { foreach (MainWindow w in _windows) { w.ReloadPreference(pref); } }
public void InitUI(ITerminalSessionOptions terminalsession, IMRUOptions mru, ICoreServicePreference window, IStartupActionOptions startup) { _MRUSize.Text = mru.LimitCount.ToString(); _askCloseOnExit.Checked = terminalsession.AskCloseOnExit; _showToolBar.Checked = window.ShowsToolBar; _languageBox.SelectedItem = window.Language; // select EnumListItem<T> by T _startupOptionBox.SelectedItem = startup.StartupAction; // select EnumListItem<T> by T }
public void ReloadPreference(ICoreServicePreference pref) { IPoderosaAboutBoxFactory af = AboutBoxUtil.GetCurrentAboutBoxFactory(); if (af != null) { this.Icon = af.ApplicationIcon; } _toolStripContainer.ReloadPreference(pref); }
public void InitUI(ITerminalEmulatorOptions options, ICoreServicePreference window_options) { _leftAltKeyAction.SelectedIndex = (int)options.LeftAltKey; _rightAltKeyAction.SelectedIndex = (int)options.RightAltKey; _send0x7FByDel.Checked = options.Send0x7FByDel; _send0x7FByBack.Checked = options.Send0x7FByBack; _autoCopyByLeftButton.Checked = window_options.AutoCopyByLeftButton; _rightButtonAction.SelectedIndex = (int)options.RightButtonAction; _middleButtonAction.SelectedIndex = (int)options.MiddleButtonAction; _wheelAmount.Text = options.WheelAmount.ToString(); _zone0x1FBox.SelectedIndex = (int)options.Zone0x1F; _viewSplitModifierBox.SelectedIndex = ToViewSplitOptionIndex(window_options.ViewSplitModifier); _customKeySettingsBox.Text = options.CustomKeySettings; }
public void OnPreferenceImport(IPreferenceFolder oldvalues, IPreferenceFolder newvalues) { ICoreServicePreference nv = (ICoreServicePreference)newvalues.QueryAdapter(typeof(ICoreServicePreference)); WindowManagerPlugin.Instance.ReloadPreference(nv); _adapter.ClearSplitModifierCheckedFlag(); //言語が変わっていたら... Language lang = nv.Language; if (lang != ((ICoreServicePreference)oldvalues.QueryAdapter(typeof(ICoreServicePreference))).Language) { Debug.WriteLine("Change Language"); WindowManagerPlugin.Instance.PoderosaWorld.Culture.SetCulture(CoreServicePreferenceAdapter.LangToCulture(lang)); } }
public bool Commit(ITerminalEmulatorOptions options, ICoreServicePreference window_options) { StringResource sr = OptionDialogPlugin.Instance.Strings; bool successful = false; string itemname = null; try { //Win9xでは、左右のAltの区別ができないので別々の設定にすることを禁止する if (System.Environment.OSVersion.Platform == PlatformID.Win32Windows && ((EnumListItem <AltKeyAction>)_leftAltKeyAction.SelectedItem).Value != ((EnumListItem <AltKeyAction>)_rightAltKeyAction.SelectedItem).Value) { GUtil.Warning(this, sr.GetString("Message.OptionDialog.AltKeyOnWin9x")); return(false); } options.LeftAltKey = ((EnumListItem <AltKeyAction>)_leftAltKeyAction.SelectedItem).Value; options.RightAltKey = ((EnumListItem <AltKeyAction>)_rightAltKeyAction.SelectedItem).Value; options.Send0x7FByDel = _send0x7FByDel.Checked; options.Send0x7FByBack = _send0x7FByBack.Checked; options.Zone0x1F = ((EnumListItem <KeyboardStyle>)_zone0x1FBox.SelectedItem).Value; itemname = "Custom Key Setting"; KeyFunction.Parse(_customKeySettingsBox.Text); //パースできればOK options.CustomKeySettings = _customKeySettingsBox.Text; window_options.AutoCopyByLeftButton = _autoCopyByLeftButton.Checked; options.RightButtonAction = ((EnumListItem <MouseButtonAction>)_rightButtonAction.SelectedItem).Value; options.MiddleButtonAction = ((EnumListItem <MouseButtonAction>)_middleButtonAction.SelectedItem).Value; itemname = sr.GetString("Caption.OptionDialog.MousewheelAmount"); options.WheelAmount = Int32.Parse(_wheelAmount.Text); window_options.ViewSplitModifier = ((ListItem <Keys>)_viewSplitModifierBox.SelectedItem).Value; successful = true; } catch (FormatException) { GUtil.Warning(this, String.Format(sr.GetString("Message.OptionDialog.InvalidItem"), itemname)); } catch (InvalidOptionException ex) { GUtil.Warning(this, ex.Message); } return(successful); }
public void InitUI(ITerminalEmulatorOptions options, ICoreServicePreference window_options) { _constructing = true; _leftAltKeyAction.SelectedItem = options.LeftAltKey; // select EnumListItem<T> by T _rightAltKeyAction.SelectedItem = options.RightAltKey; // select EnumListItem<T> by T _send0x7FByDel.Checked = options.Send0x7FByDel; _send0x7FByBack.Checked = options.Send0x7FByBack; _autoCopyByLeftButton.Checked = window_options.AutoCopyByLeftButton; _rightButtonAction.SelectedItem = options.RightButtonAction; // select EnumListItem<T> by T _middleButtonAction.SelectedItem = options.MiddleButtonAction; // select EnumListItem<T> by T _wheelAmount.Text = options.WheelAmount.ToString(); _zone0x1FBox.SelectedItem = options.Zone0x1F; // select EnumListItem<T> by T _viewSplitModifierBox.SelectedItem = FixupViewSplitModifier(window_options.ViewSplitModifier); // select EnumListItem<T> by T _customKeySettingsBox.Text = options.CustomKeySettings; _constructing = false; AdjustAutoKeySettings(null, null); }
public bool Commit(ITerminalEmulatorOptions options, ICoreServicePreference window_options) { StringResource sr = OptionDialogPlugin.Instance.Strings; bool successful = false; string itemname = null; try { //Win9xでは、左右のAltの区別ができないので別々の設定にすることを禁止する if (System.Environment.OSVersion.Platform == PlatformID.Win32Windows && ((EnumListItem<AltKeyAction>)_leftAltKeyAction.SelectedItem).Value != ((EnumListItem<AltKeyAction>)_rightAltKeyAction.SelectedItem).Value) { GUtil.Warning(this, sr.GetString("Message.OptionDialog.AltKeyOnWin9x")); return false; } options.LeftAltKey = ((EnumListItem<AltKeyAction>)_leftAltKeyAction.SelectedItem).Value; options.RightAltKey = ((EnumListItem<AltKeyAction>)_rightAltKeyAction.SelectedItem).Value; options.Send0x7FByDel = _send0x7FByDel.Checked; options.Send0x7FByBack = _send0x7FByBack.Checked; options.Zone0x1F = ((EnumListItem<KeyboardStyle>)_zone0x1FBox.SelectedItem).Value; itemname = "Custom Key Setting"; KeyFunction.Parse(_customKeySettingsBox.Text); //パースできればOK options.CustomKeySettings = _customKeySettingsBox.Text; window_options.AutoCopyByLeftButton = _autoCopyByLeftButton.Checked; options.RightButtonAction = ((EnumListItem<MouseButtonAction>)_rightButtonAction.SelectedItem).Value; options.MiddleButtonAction = ((EnumListItem<MouseButtonAction>)_middleButtonAction.SelectedItem).Value; itemname = sr.GetString("Caption.OptionDialog.MousewheelAmount"); options.WheelAmount = Int32.Parse(_wheelAmount.Text); window_options.ViewSplitModifier = ((ListItem<Keys>)_viewSplitModifierBox.SelectedItem).Value; successful = true; } catch (FormatException) { GUtil.Warning(this, String.Format(sr.GetString("Message.OptionDialog.InvalidItem"), itemname)); } catch (InvalidOptionException ex) { GUtil.Warning(this, ex.Message); } return successful; }
public bool Commit(ITerminalSessionOptions terminalsession, IMRUOptions mru, ICoreServicePreference window, IStartupActionOptions startup) { StringResource sr = OptionDialogPlugin.Instance.Strings; string itemname = null; bool successful = false; try { itemname = sr.GetString("Caption.OptionDialog.MRUCount"); mru.LimitCount = Int32.Parse(_MRUSize.Text); terminalsession.AskCloseOnExit = _askCloseOnExit.Checked; window.ShowsToolBar = _showToolBar.Checked; window.Language = ((EnumListItem<Language>)_languageBox.SelectedItem).Value; startup.StartupAction = ((EnumListItem<StartupAction>)_startupOptionBox.SelectedItem).Value; successful = true; } catch (FormatException) { GUtil.Warning(this, String.Format(sr.GetString("Message.OptionDialog.InvalidItem"), itemname)); } catch (Exception ex) { GUtil.Warning(this, ex.Message); } return successful; }
/* public void ReloadMenu(string extension_point_name) { MainMenuItem item = _menu.FindMainMenuItem(extension_point_name); if(item==null) throw new ArgumentException("extension point not found"); foreach(MainWindow w in _windows) w.ReloadMenu(_menu, item); } */ public void ReloadPreference(ICoreServicePreference pref) { foreach (MainWindow w in _windows) w.ReloadPreference(pref); }
public void ReloadPreference(ICoreServicePreference pref) { this.TopToolStripPanelVisible = pref.ShowsToolBar; }
public void ReloadPreference(ICoreServicePreference pref) { IPoderosaAboutBoxFactory af = AboutBoxUtil.GetCurrentAboutBoxFactory(); if (af != null) this.Icon = af.ApplicationIcon; _toolStripContainer.ReloadPreference(pref); }