public ProtocolOptions Import(ProtocolOptions src) { Debug.Assert(src._folder.Id == _folder.Id); //SSH関係 _retainsPassphrase = ConvertItem(src._retainsPassphrase); _cipherAlgorithmOrder = ConvertItem(src._cipherAlgorithmOrder); _cipherAlgorithmOrderWasChecked = false; _hostKeyAlgorithmOrder = ConvertItem(src._hostKeyAlgorithmOrder); _sshWindowSize = ConvertItem(src._sshWindowSize); _sshCheckMAC = ConvertItem(src._sshCheckMAC); _hostKeyCheckerVerifierTypeName = ConvertItem(src._hostKeyCheckerVerifierTypeName); _logSSHEvents = ConvertItem(src._logSSHEvents); _socketConnectTimeout = ConvertItem(src._socketConnectTimeout); _ipVersionPriority = ConvertItem <IPVersionPriority>(src._ipVersionPriority); //SOCKS関係 _useSocks = ConvertItem(src._useSocks); _socksServer = ConvertItem(src._socksServer); _socksPort = ConvertItem(src._socksPort); _socksAccount = ConvertItem(src._socksAccount); _socksPassword = ConvertItem(src._socksPassword); _socksNANetworks = ConvertItem(src._socksNANetworks); _socketBufferSize = ConvertItem(src._socketBufferSize); _readSerializedPassword = ConvertItem(src._readSerializedPassword); _savePassword = ConvertItem(src._savePassword); _savePlainTextPassword = ConvertItem(src._savePlainTextPassword); return(this); }
public override void DefineItems(IPreferenceBuilder builder) { //SSH関係 //Note: Validator Required _cipherAlgorithmOrder = builder.DefineStringValue(_folder, "cipherAlgorithmOrder", "", null); FixCipherAlgorithms(_cipherAlgorithmOrder); _hostKeyAlgorithmOrder = builder.DefineStringValue(_folder, "hostKeyAlgorithmOrder", "", null); FixHostKeyAlgorithms(_hostKeyAlgorithmOrder); _sshWindowSize = builder.DefineIntValue(_folder, "sshWindowSize", 2097152, PreferenceValidatorUtil.PositiveIntegerValidator); _sshCheckMAC = builder.DefineBoolValue(_folder, "sshCheckMAC", true, null); _hostKeyCheckerVerifierTypeName = builder.DefineStringValue(_folder, "hostKeyCheckerVerifierTypeName", "Poderosa.Usability.SSHKnownHosts", null); _logSSHEvents = builder.DefineBoolValue(_folder, "logSSHEvents", false, null); var defaultTimeouts = new Granados.SSHTimeouts(); _sshResponseTimeout = builder.DefineIntValue(_folder, "sshResponseTimeout", defaultTimeouts.ResponseTimeout, PreferenceValidatorUtil.PositiveIntegerValidator); _socketConnectTimeout = builder.DefineIntValue(_folder, "socketConnectTimeout", 3000, PreferenceValidatorUtil.PositiveIntegerValidator); _ipVersionPriority = new EnumPreferenceItem <IPVersionPriority>(builder.DefineStringValue(_folder, "ipVersionPriority", "Both", null), IPVersionPriority.Both); //SOCKS関係 _useSocks = builder.DefineBoolValue(_folder, "useSocks", false, null); _socksServer = builder.DefineStringValue(_folder, "socksServer", "", null); _socksPort = builder.DefineIntValue(_folder, "socksPort", 1080, PreferenceValidatorUtil.PositiveIntegerValidator); _socksAccount = builder.DefineStringValue(_folder, "socksAccount", "", null); _socksPassword = builder.DefineStringValue(_folder, "socksPassword", "", null); _socksNANetworks = builder.DefineStringValue(_folder, "socksNANetworks", "", null); //PreferenceEditorのみ _socketBufferSize = builder.DefineIntValue(_folder, "socketBufferSize", 0x1000, PreferenceValidatorUtil.PositiveIntegerValidator); _readSerializedPassword = builder.DefineBoolValue(_folder, "readSerializedPassword", false, null); _savePassword = builder.DefineBoolValue(_folder, "savePassword", false, null); _savePlainTextPassword = builder.DefineBoolValue(_folder, "savePlainTextPassword", false, null); }
public override void DefineItems(IPreferenceBuilder builder) { //SSH関係 _retainsPassphrase = builder.DefineBoolValue(_folder, "retainPassphrase", false, null); //Note: Validator Required _cipherAlgorithmOrder = builder.DefineStringValue(_folder, "cipherAlgorithmOrder", DEFAULT_CIPHER_ALGORITHM_ORDER, null); _cipherAlgorithmOrderWasChecked = false; _hostKeyAlgorithmOrder = builder.DefineStringValue(_folder, "hostKeyAlgorithmOrder", "DSA;RSA", null); _sshWindowSize = builder.DefineIntValue(_folder, "sshWindowSize", 4096, PreferenceValidatorUtil.PositiveIntegerValidator); _sshCheckMAC = builder.DefineBoolValue(_folder, "sshCheckMAC", true, null); _hostKeyCheckerVerifierTypeName = builder.DefineStringValue(_folder, "hostKeyCheckerVerifierTypeName", "Poderosa.Usability.SSHKnownHosts", null); _logSSHEvents = builder.DefineBoolValue(_folder, "logSSHEvents", false, null); _socketConnectTimeout = builder.DefineIntValue(_folder, "socketConnectTimeout", 3000, PreferenceValidatorUtil.PositiveIntegerValidator); _ipVersionPriority = new EnumPreferenceItem <IPVersionPriority>(builder.DefineStringValue(_folder, "ipVersionPriority", "Both", null), IPVersionPriority.Both); //SOCKS関係 _useSocks = builder.DefineBoolValue(_folder, "useSocks", false, null); _socksServer = builder.DefineStringValue(_folder, "socksServer", "", null); _socksPort = builder.DefineIntValue(_folder, "socksPort", 1080, PreferenceValidatorUtil.PositiveIntegerValidator); _socksAccount = builder.DefineStringValue(_folder, "socksAccount", "", null); _socksPassword = builder.DefineStringValue(_folder, "socksPassword", "", null); _socksNANetworks = builder.DefineStringValue(_folder, "socksNANetworks", "", null); //PreferenceEditorのみ _socketBufferSize = builder.DefineIntValue(_folder, "socketBufferSize", 0x1000, PreferenceValidatorUtil.PositiveIntegerValidator); _readSerializedPassword = builder.DefineBoolValue(_folder, "readSerializedPassword", false, null); _savePassword = builder.DefineBoolValue(_folder, "savePassword", false, null); _savePlainTextPassword = builder.DefineBoolValue(_folder, "savePlainTextPassword", false, null); }
public override void DefineItems(IPreferenceBuilder builder) { _askCloseOnExit = builder.DefineBoolValue(_folder, "askCloseOnExit", false, null); _terminalEstablishTimeout = builder.DefineIntValue(_folder, "terminalEstablishTimeout", 5000, PreferenceValidatorUtil.PositiveIntegerValidator); _telnetSSHLoginDialogUISupportTypeName = builder.DefineStringValue(_folder, "telnetSSHLoginDialogUISupport", "Poderosa.Usability.MRUList", null); _cygwinLoginDialogUISupportTypeName = builder.DefineStringValue(_folder, "cygwinLoginDialogUISupport", "Poderosa.Usability.MRUList", null); }
public override void DefineItems(IPreferenceBuilder builder) { //表示 _fontName = builder.DefineStringValue(_folder, "fontName", "Courier New", null); _cjkFontName = builder.DefineStringValue(_folder, "cjkFontName", "MS ゴシック", null); _fontSize = builder.DefineIntValue(_folder, "fontSize", 10, PreferenceValidatorUtil.PositiveIntegerValidator); //floatにすべきかなあ _useClearType = builder.DefineBoolValue(_folder, "useClearType", true, null); _enableBoldStyle = builder.DefineBoolValue(_folder, "enableBoldStyle", true, null); _forceBoldStyle = builder.DefineBoolValue(_folder, "forceBoldStyle", false, null); _lineSpacing = builder.DefineIntValue(_folder, "lineSpacing", 0, PreferenceValidatorUtil.IntRangeValidator(0, 10)); _bgColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "bgColor", "Window", null), KnownColor.Window); _textColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "textColor", "WindowText", null), KnownColor.WindowText); _backgroundImageFileName = builder.DefineStringValue(_folder, "backgroundImageFileName", "", null); _imageStyle = new EnumPreferenceItem <ImageStyle>(builder.DefineStringValue(_folder, "imageStyle", "Center", null), ImageStyle.Center); _escapeSequenceColorSet = builder.DefineStringValue(_folder, "escapeSequenceColorSet", "", null); _caretColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "caretColor", "Empty", null), Color.Empty); _caretType = new EnumPreferenceItem <CaretType>(builder.DefineStringValue(_folder, "caretType", "Box", null), CaretType.Box); _caretBlink = builder.DefineBoolValue(_folder, "caretBlink", true, null); //ターミナル _closeOnDisconnect = builder.DefineBoolValue(_folder, "closeOnDisconnect", true, null); _beepOnBellChar = builder.DefineBoolValue(_folder, "beepOnBellChar", false, null); _askCloseOnExit = builder.DefineBoolValue(_folder, "askCloseOnExit", true, null); _charDecodeErrorBehavior = new EnumPreferenceItem <WarningOption>(builder.DefineStringValue(_folder, "charDecodeErrorBehavior", "MessageBox", null), WarningOption.MessageBox); _disconnectNotification = new EnumPreferenceItem <WarningOption>(builder.DefineStringValue(_folder, "disconnectNotification", "StatusBar", null), WarningOption.StatusBar); _enableComplementForNewConnections = builder.DefineBoolValue(_folder, "enableComplementForNewConnections", false, null); _commandPopupAlwaysOnTop = builder.DefineBoolValue(_folder, "commandPopupAlwaysOnTop", false, null); _commandPopupInTaskBar = builder.DefineBoolValue(_folder, "commandPopupInTaskBar", false, null); //操作 _terminalBufferSize = builder.DefineIntValue(_folder, "terminalBufferSize", 1000, PreferenceValidatorUtil.PositiveIntegerValidator); _send0x7FByDel = builder.DefineBoolValue(_folder, "send0x7FByDel", false, null); _send0x7FByBack = builder.DefineBoolValue(_folder, "send0x7FByBack", false, null); _zone0x1F = new EnumPreferenceItem <KeyboardStyle>(builder.DefineStringValue(_folder, "zone0x1F", "None", null), KeyboardStyle.None); _customKeySettings = builder.DefineStringValue(_folder, "customKeySettings", "", null); _allowsScrollInAppMode = builder.DefineBoolValue(_folder, "allowsScrollInAppMode", false, null); _keepAliveInterval = builder.DefineIntValue(_folder, "keepAliveInterval", 60000, PreferenceValidatorUtil.IntRangeValidator(0, 100 * 60000)); _additionalWordElement = builder.DefineStringValue(_folder, "additionalWordElement", "", null); //マウスとキーボード _wheelAmount = builder.DefineIntValue(_folder, "wheelAmount", 3, PreferenceValidatorUtil.PositiveIntegerValidator); _leftAltKey = new EnumPreferenceItem <AltKeyAction>(builder.DefineStringValue(_folder, "leftAltKey", "Menu", null), AltKeyAction.Menu); _rightAltKey = new EnumPreferenceItem <AltKeyAction>(builder.DefineStringValue(_folder, "rightAltKey", "Menu", null), AltKeyAction.Menu); _rightButtonAction = new EnumPreferenceItem <MouseButtonAction>(builder.DefineStringValue(_folder, "rightButtonAction", "ContextMenu", null), MouseButtonAction.ContextMenu); _middleButtonAction = new EnumPreferenceItem <MouseButtonAction>(builder.DefineStringValue(_folder, "middleButtonAction", "None", null), MouseButtonAction.None); //ログ _defaultLogType = new EnumPreferenceItem <LogType>(builder.DefineStringValue(_folder, "defaultLogType", "None", null), LogType.None); _defaultLogDirectory = builder.DefineStringValue(_folder, "defaultLogDirectory", "", null); // Copy and Paste _alertOnPasteNewLineChar = builder.DefineBoolValue(_folder, "alertOnPasteNewLineChar", true, null); //PreferenceEditorのみ _intelliSenseKey = builder.DefineStringValue(_folder, "intelliSenseKey", "Ctrl+OemPeriod", PreferenceValidatorUtil.KeyWithModifierValidator); _commandPopupKey = builder.DefineStringValue(_folder, "commandPopupKey", "Ctrl+Oemcomma", PreferenceValidatorUtil.KeyWithModifierValidator); _parseKeyRequired = true; _shellHistoryLimitCount = builder.DefineIntValue(_folder, "shellHistoryLimitCount", 100, PreferenceValidatorUtil.PositiveIntegerValidator); }
public override void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { base.InitializePreference(builder, folder); _folder = folder; _i = builder.DefineIntValue(folder, "i", 10, null); _s = builder.DefineStringValue(folder, "s", "bobo", null); }
private void OnReset(object sender, EventArgs e) { IIntPreferenceItem intitem = _item.AsInt(); IStringPreferenceItem stritem = _item.AsString(); Debug.Assert(intitem != null || stritem != null); _valueBox.Text = intitem != null?intitem.InitialValue.ToString() : stritem.InitialValue; }
public override void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { base.InitializePreference(builder, folder); IPreferenceFolder foo = builder.DefineFolderArray(folder, this, "foo"); _i = builder.DefineIntValue(foo, "i", 10, null); _s = builder.DefineStringValue(foo, "s", "bobo", null); }
/// <summary> /// <ja>オプション項目定義</ja> /// </summary> public override void DefineItems(IPreferenceBuilder builder) { _useAction = new EnumPreferenceItem <UseAction>(builder.DefineStringValue(_folder, "useAction", "WhenNewLine", null), UseAction.NewLine); _highlightKeyword = builder.DefineStringValue(_folder, "highlightKeyword", DEFAULT_HIGHLIGHT_KEYWORD, null); _showConfirmCheck = builder.DefineBoolValue(_folder, "showConfirmed", false, null); _afterSpecifiedTimePaste = builder.DefineBoolValue(_folder, "afterSpecifiedTimePaste", false, null); _pasteTime = builder.DefineIntValue(_folder, "pasteTime", 0, null); _ChangeDialogSize = builder.DefineBoolValue(_folder, "allowChangeDialogSize", false, null); }
public override void DefineItems(IPreferenceBuilder builder) { _viewSplitModifier = builder.DefineStringValue(_folder, "viewSplitModifier", "None", null); _showsToolBar = builder.DefineBoolValue(_folder, "showsToolBar", true, null); _caretInterval = builder.DefineIntValue(_folder, "caretInterval", 300, PreferenceValidatorUtil.PositiveIntegerValidator); _autoCopyByLeftButton = builder.DefineBoolValue(_folder, "autoCopyByLeftButton", false, null); _language = builder.DefineStringValue(_folder, "language", GetNativeLanguage().ToString(), null); _splitLimitCount = builder.DefineIntValue(_folder, "splitLimitCount", 16, PreferenceValidatorUtil.IntRangeValidator(1, 50)); }
public CoreServicePreferenceAdapter Import(CoreServicePreferenceAdapter src) { _viewSplitModifier = ConvertItem(src._viewSplitModifier); _showsToolBar = ConvertItem(src._showsToolBar); _language = ConvertItem(src._language); _caretInterval = ConvertItem(src._caretInterval); _autoCopyByLeftButton = ConvertItem(src._autoCopyByLeftButton); _splitLimitCount = ConvertItem(src._splitLimitCount); return this; }
/// <summary> /// <ja>設定ファイルからインポート</ja> /// </summary> public ExtendPasteOptions Import(ExtendPasteOptions src) { _useAction = ConvertItem(src._useAction); _highlightKeyword = ConvertItem(src._highlightKeyword); _showConfirmCheck = ConvertItem(src._showConfirmCheck); _afterSpecifiedTimePaste = ConvertItem(src._afterSpecifiedTimePaste); _pasteTime = ConvertItem(src._pasteTime); _ChangeDialogSize = ConvertItem(src._ChangeDialogSize); return(this); }
public CoreServicePreferenceAdapter Import(CoreServicePreferenceAdapter src) { _viewSplitModifier = ConvertItem(src._viewSplitModifier); _showsToolBar = ConvertItem(src._showsToolBar); _language = ConvertItem(src._language); _caretInterval = ConvertItem(src._caretInterval); _autoCopyByLeftButton = ConvertItem(src._autoCopyByLeftButton); _splitLimitCount = ConvertItem(src._splitLimitCount); return(this); }
public override void DefineItems(IPreferenceBuilder builder) { _limitCount = builder.DefineIntValue(_folder, "limitCount", 5, delegate(int value, IPreferenceValidationResult result) { if (value < 0 || value > 100) { result.ErrorMessage = "MRU LimitCount Error"; //これちゃんと呼ばれるかな } }); }
/// <summary> /// コンストラクタ /// </summary> public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { ITerminalEmulatorOptions terminalOptions = ConnectProfilePlugin.Instance.TerminalEmulatorService.TerminalEmulatorOptions; _rootPreference = folder; _profileDefinition = builder.DefineFolderArray(folder, this, "profile"); _hostName = builder.DefineStringValue(_profileDefinition, "hostName", "", null); _protocol = builder.DefineStringValue(_profileDefinition, "protocol", "", null); _port = builder.DefineIntValue(_profileDefinition, "port", 0, null); _authType = builder.DefineStringValue(_profileDefinition, "authType", "", null); _keyFile = builder.DefineStringValue(_profileDefinition, "keyFile", "", null); _userName = builder.DefineStringValue(_profileDefinition, "userName", "", null); _password = builder.DefineStringValue(_profileDefinition, "password", "", null); _autoLogin = builder.DefineBoolValue(_profileDefinition, "autoLogin", false, null); _loginPrompt = builder.DefineStringValue(_profileDefinition, "loginPrompt", "", null); _passwordPrompt = builder.DefineStringValue(_profileDefinition, "passwordPrompt", "", null); _execCommand = builder.DefineStringValue(_profileDefinition, "execCommand", "", null); _suUserName = builder.DefineStringValue(_profileDefinition, "suUserName", "", null); _suPassword = builder.DefineStringValue(_profileDefinition, "suPassword", "", null); _suType = builder.DefineStringValue(_profileDefinition, "suType", "", null); _charCode = builder.DefineStringValue(_profileDefinition, "charCode", "", null); _newLine = builder.DefineStringValue(_profileDefinition, "newLine", "", null); _telnetNewLine = builder.DefineBoolValue(_profileDefinition, "telnetNewLine", true, null); _terminalType = builder.DefineStringValue(_profileDefinition, "terminalType", "", null); _terminalFontColor = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalFontColor", terminalOptions.TextColor.Name, null), KnownColor.White); _terminalBGColor = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalBGColor", terminalOptions.BGColor.Name, null), KnownColor.Black); _terminalESCColor0 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor0", terminalOptions.EscapeSequenceColorSet[0].Color.Name, null), KnownColor.Black); _terminalESCColor1 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor1", terminalOptions.EscapeSequenceColorSet[1].Color.Name, null), KnownColor.Red); _terminalESCColor2 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor2", terminalOptions.EscapeSequenceColorSet[2].Color.Name, null), KnownColor.Green); _terminalESCColor3 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor3", terminalOptions.EscapeSequenceColorSet[3].Color.Name, null), KnownColor.Yellow); _terminalESCColor4 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor4", terminalOptions.EscapeSequenceColorSet[4].Color.Name, null), KnownColor.Blue); _terminalESCColor5 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor5", terminalOptions.EscapeSequenceColorSet[5].Color.Name, null), KnownColor.Magenta); _terminalESCColor6 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor6", terminalOptions.EscapeSequenceColorSet[6].Color.Name, null), KnownColor.Cyan); _terminalESCColor7 = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "terminalESCColor7", terminalOptions.EscapeSequenceColorSet[7].Color.Name, null), KnownColor.White); _terminalAsciiFont = builder.DefineStringValue(_profileDefinition, "terminalAsciiFont", terminalOptions.Font.Name, null); _terminalCjkFont = builder.DefineStringValue(_profileDefinition, "terminalCjkFont", terminalOptions.CJKFont.Name, null); _terminalFontSize = builder.DefineIntValue(_profileDefinition, "terminalFontSize", (int)terminalOptions.Font.Size, null); _terminalClearType = builder.DefineBoolValue(_profileDefinition, "terminalClearType", terminalOptions.UseClearType, null); _terminalBoldStyle = builder.DefineBoolValue(_profileDefinition, "terminalBoldStyle", terminalOptions.EnableBoldStyle, null); _terminalForceBoldStyle = builder.DefineBoolValue(_profileDefinition, "terminalForceBoldStyle", terminalOptions.ForceBoldStyle, null); _terminalBGImage = builder.DefineStringValue(_profileDefinition, "terminalBGImage", terminalOptions.BackgroundImageFileName, null); _terminalBGImagePos = builder.DefineStringValue(_profileDefinition, "terminalBGImagePos", terminalOptions.ImageStyle.ToString(), null); _commandSendInterval = builder.DefineIntValue(_profileDefinition, "commandSendInterval", ConnectProfileStruct.DEFAULT_CMD_SEND_INTERVAL, null); _promptRecvTimeout = builder.DefineIntValue(_profileDefinition, "promptRecvTimeout", ConnectProfileStruct.DEFAULT_PROMPT_RECV_TIMEOUT, null); _profileItemColor = new ColorPreferenceItem(builder.DefineStringValue(_profileDefinition, "profileItemColor", "Black", null), KnownColor.Black); _description = builder.DefineStringValue(_profileDefinition, "description", "", null); }
private void OnOK(object sender, EventArgs e) { try { IIntPreferenceItem intitem = _item.AsInt(); IStringPreferenceItem stritem = _item.AsString(); if (intitem != null) { intitem.Value = ParseUtil.ParseInt(_valueBox.Text, intitem.InitialValue); } else { stritem.Value = _valueBox.Text; } } catch (Exception ex) { GUtil.Warning(this, ex.Message); this.DialogResult = DialogResult.None; } }
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { _originalFolder = folder; _adapter = new CoreServicePreferenceAdapter(folder); _adapter.DefineItems(builder); AboutBoxUtil.InitPreference(builder, folder); _windowTemplatePreference = builder.DefineFolderArray(folder, this, "mainwindow"); _windowArrayPreference = folder.FindChildFolderArray("mainwindow"); Debug.Assert(_windowArrayPreference != null); _windowPositionPreference = builder.DefineStringValue(_windowTemplatePreference, "position", "", null); _windowSplitFormatPreference = builder.DefineStringValue(_windowTemplatePreference, "format", "", null); _toolBarFormatPreference = builder.DefineStringValue(_windowTemplatePreference, "toolbar", "", null); _tabRowCountPreference = builder.DefineIntValue(_windowTemplatePreference, "tabrowcount", 1, null); //add listener folder.AddChangeListener(new ChangeListener(_adapter)); }
public PreferenceItemEditor(IPreferenceItem item) { InitializeComponent(); _item = item; StringResource sr = UsabilityPlugin.Strings; this.Text = sr.GetString("Form.PreferenceItemEditor.Text"); _nameLabel.Text = sr.GetString("Form.PreferenceItemEditor._nameLabel") + " " + item.FullQualifiedId; _valueLabel.Text = sr.GetString("Form.PreferenceItemEditor._valueLabel"); _resetButton.Text = sr.GetString("Form.PreferenceItemEditor._resetButton"); _okButton.Text = sr.GetString("Common.OK"); _cancelButton.Text = sr.GetString("Common.Cancel"); //int/stringどちらかの場合をサポート IIntPreferenceItem intitem = item.AsInt(); IStringPreferenceItem stritem = item.AsString(); Debug.Assert(intitem != null || stritem != null); _valueBox.Text = intitem != null?intitem.Value.ToString() : stritem.Value; }
public override void DefineItems(IPreferenceBuilder builder) { //SSH関係 _retainsPassphrase = builder.DefineBoolValue(_folder, "retainPassphrase", false, null); //Note: Validator Required _cipherAlgorithmOrder = builder.DefineStringValue(_folder, "cipherAlgorithmOrder", DEFAULT_CIPHER_ALGORITHM_ORDER, null); _cipherAlgorithmOrderWasChecked = false; _hostKeyAlgorithmOrder = builder.DefineStringValue(_folder, "hostKeyAlgorithmOrder", "DSA;RSA", null); _sshWindowSize = builder.DefineIntValue(_folder, "sshWindowSize", 4096, PreferenceValidatorUtil.PositiveIntegerValidator); _sshCheckMAC = builder.DefineBoolValue(_folder, "sshCheckMAC", true, null); _hostKeyCheckerVerifierTypeName = builder.DefineStringValue(_folder, "hostKeyCheckerVerifierTypeName", "Poderosa.Usability.SSHKnownHosts", null); _logSSHEvents = builder.DefineBoolValue(_folder, "logSSHEvents", false, null); _socketConnectTimeout = builder.DefineIntValue(_folder, "socketConnectTimeout", 3000, PreferenceValidatorUtil.PositiveIntegerValidator); _ipVersionPriority = new EnumPreferenceItem<IPVersionPriority>(builder.DefineStringValue(_folder, "ipVersionPriority", "Both", null), IPVersionPriority.Both); //SOCKS関係 _useSocks = builder.DefineBoolValue(_folder, "useSocks", false, null); _socksServer = builder.DefineStringValue(_folder, "socksServer", "", null); _socksPort = builder.DefineIntValue(_folder, "socksPort", 1080, PreferenceValidatorUtil.PositiveIntegerValidator); _socksAccount = builder.DefineStringValue(_folder, "socksAccount", "", null); _socksPassword = builder.DefineStringValue(_folder, "socksPassword", "", null); _socksNANetworks = builder.DefineStringValue(_folder, "socksNANetworks", "", null); //PreferenceEditorのみ _socketBufferSize = builder.DefineIntValue(_folder, "socketBufferSize", 0x1000, PreferenceValidatorUtil.PositiveIntegerValidator); _readSerializedPassword = builder.DefineBoolValue(_folder, "readSerializedPassword", false, null); _savePassword = builder.DefineBoolValue(_folder, "savePassword", false, null); _savePlainTextPassword = builder.DefineBoolValue(_folder, "savePlainTextPassword", false, null); }
/// <summary> /// <ja>オプション項目定義</ja> /// </summary> public override void DefineItems(IPreferenceBuilder builder) { _useAction = new EnumPreferenceItem<UseAction>(builder.DefineStringValue(_folder, "useAction", "WhenNewLine", null), UseAction.NewLine); _highlightKeyword = builder.DefineStringValue(_folder, "highlightKeyword", DEFAULT_HIGHLIGHT_KEYWORD, null); _showConfirmCheck = builder.DefineBoolValue(_folder, "showConfirmed", false, null); _afterSpecifiedTimePaste = builder.DefineBoolValue(_folder, "afterSpecifiedTimePaste", false, null); _pasteTime = builder.DefineIntValue(_folder, "pasteTime", 0, null); _ChangeDialogSize = builder.DefineBoolValue(_folder, "allowChangeDialogSize", false, null); }
/// <summary> /// <ja>設定ファイルからインポート</ja> /// </summary> public ExtendPasteOptions Import(ExtendPasteOptions src) { _useAction = ConvertItem(src._useAction); _highlightKeyword = ConvertItem(src._highlightKeyword); _showConfirmCheck = ConvertItem(src._showConfirmCheck); _afterSpecifiedTimePaste = ConvertItem(src._afterSpecifiedTimePaste); _pasteTime = ConvertItem(src._pasteTime); _ChangeDialogSize = ConvertItem(src._ChangeDialogSize); return this; }
public override void DefineItems(IPreferenceBuilder builder) { //表示 _fontName = builder.DefineStringValue(_folder, "fontName", "Courier New", null); _cjkFontName = builder.DefineStringValue(_folder, "cjkFontName", "MS ゴシック", null); _fontSize = builder.DefineIntValue(_folder, "fontSize", 10, PreferenceValidatorUtil.PositiveIntegerValidator); //floatにすべきかなあ _useClearType = builder.DefineBoolValue(_folder, "useClearType", true, null); _enableBoldStyle = builder.DefineBoolValue(_folder, "enableBoldStyle", true, null); _forceBoldStyle = builder.DefineBoolValue(_folder, "forceBoldStyle", false, null); _lineSpacing = builder.DefineIntValue(_folder, "lineSpacing", 0, PreferenceValidatorUtil.IntRangeValidator(0, 10)); _bgColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "bgColor", "Window", null), KnownColor.Window); _textColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "textColor", "WindowText", null), KnownColor.WindowText); _backgroundImageFileName = builder.DefineStringValue(_folder, "backgroundImageFileName", "", null); _imageStyle = new EnumPreferenceItem<ImageStyle>(builder.DefineStringValue(_folder, "imageStyle", "Center", null), ImageStyle.Center); _escapeSequenceColorSet = builder.DefineStringValue(_folder, "escapeSequenceColorSet", "", null); _darkenEsColorForBackground = builder.DefineBoolValue(_folder, "darkenEsColorForBackground", true, null); _caretColor = new ColorPreferenceItem(builder.DefineStringValue(_folder, "caretColor", "Empty", null), Color.Empty); _caretType = new EnumPreferenceItem<CaretType>(builder.DefineStringValue(_folder, "caretType", "Box", null), CaretType.Box); _caretBlink = builder.DefineBoolValue(_folder, "caretBlink", true, null); //ターミナル _closeOnDisconnect = builder.DefineBoolValue(_folder, "closeOnDisconnect", true, null); _beepOnBellChar = builder.DefineBoolValue(_folder, "beepOnBellChar", false, null); _askCloseOnExit = builder.DefineBoolValue(_folder, "askCloseOnExit", true, null); _charDecodeErrorBehavior = new EnumPreferenceItem<WarningOption>(builder.DefineStringValue(_folder, "charDecodeErrorBehavior", "MessageBox", null), WarningOption.MessageBox); _disconnectNotification = new EnumPreferenceItem<WarningOption>(builder.DefineStringValue(_folder, "disconnectNotification", "StatusBar", null), WarningOption.StatusBar); _enableComplementForNewConnections = builder.DefineBoolValue(_folder, "enableComplementForNewConnections", false, null); _commandPopupAlwaysOnTop = builder.DefineBoolValue(_folder, "commandPopupAlwaysOnTop", false, null); _commandPopupInTaskBar = builder.DefineBoolValue(_folder, "commandPopupInTaskBar", false, null); //操作 _terminalBufferSize = builder.DefineIntValue(_folder, "terminalBufferSize", 1000, PreferenceValidatorUtil.PositiveIntegerValidator); _send0x7FByDel = builder.DefineBoolValue(_folder, "send0x7FByDel", false, null); _send0x7FByBack = builder.DefineBoolValue(_folder, "send0x7FByBack", false, null); _zone0x1F = new EnumPreferenceItem<KeyboardStyle>(builder.DefineStringValue(_folder, "zone0x1F", "None", null), KeyboardStyle.None); _customKeySettings = builder.DefineStringValue(_folder, "customKeySettings", "", null); _allowsScrollInAppMode = builder.DefineBoolValue(_folder, "allowsScrollInAppMode", false, null); _keepAliveInterval = builder.DefineIntValue(_folder, "keepAliveInterval", 60000, PreferenceValidatorUtil.IntRangeValidator(0, 100 * 60000)); _additionalWordElement = builder.DefineStringValue(_folder, "additionalWordElement", "", null); //マウスとキーボード _wheelAmount = builder.DefineIntValue(_folder, "wheelAmount", 3, PreferenceValidatorUtil.PositiveIntegerValidator); _leftAltKey = new EnumPreferenceItem<AltKeyAction>(builder.DefineStringValue(_folder, "leftAltKey", "Menu", null), AltKeyAction.Menu); _rightAltKey = new EnumPreferenceItem<AltKeyAction>(builder.DefineStringValue(_folder, "rightAltKey", "Menu", null), AltKeyAction.Menu); _rightButtonAction = new EnumPreferenceItem<MouseButtonAction>(builder.DefineStringValue(_folder, "rightButtonAction", "ContextMenu", null), MouseButtonAction.ContextMenu); _middleButtonAction = new EnumPreferenceItem<MouseButtonAction>(builder.DefineStringValue(_folder, "middleButtonAction", "None", null), MouseButtonAction.None); //ログ _defaultLogType = new EnumPreferenceItem<LogType>(builder.DefineStringValue(_folder, "defaultLogType", "None", null), LogType.None); _defaultLogDirectory = builder.DefineStringValue(_folder, "defaultLogDirectory", "", null); // Copy and Paste _alertOnPasteNewLineChar = builder.DefineBoolValue(_folder, "alertOnPasteNewLineChar", true, null); //PreferenceEditorのみ _intelliSenseKey = builder.DefineStringValue(_folder, "intelliSenseKey", "Ctrl+OemPeriod", PreferenceValidatorUtil.KeyWithModifierValidator); _commandPopupKey = builder.DefineStringValue(_folder, "commandPopupKey", "Ctrl+Oemcomma", PreferenceValidatorUtil.KeyWithModifierValidator); _parseKeyRequired = true; _shellHistoryLimitCount = builder.DefineIntValue(_folder, "shellHistoryLimitCount", 100, PreferenceValidatorUtil.PositiveIntegerValidator); }
public override void DefineItems(IPreferenceBuilder builder) { _limitCount = builder.DefineIntValue(_folder, "limitCount", 5, delegate(int value, IPreferenceValidationResult result) { if (value < 0 || value > 100) result.ErrorMessage = "MRU LimitCount Error"; //これちゃんと呼ばれるかな }); }
public override void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { base.InitializePreference(builder, folder); _i = builder.DefineIntValue(folder, "i", 10, new PreferenceItemValidator<int>(ValidateI)); _s = builder.DefineStringValue(folder, "s", "bobo", new PreferenceItemValidator<string>(ValidateS)); }
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { _promptSearchMaxLines = builder.DefineIntValue(folder, "promptSearchMaxLines", DEFAULT_PROMPT_SEARCH_MAX_LINES, PreferenceValidatorUtil.PositiveIntegerValidator); }
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { _modifyCursorKeys = builder.DefineIntValue(folder, "modifyCursorKeys", DEFAULT_MODIFY_CURSOR_KEYS, PreferenceValidatorUtil.PositiveIntegerValidator); }
public TerminalSessionOptions Import(TerminalSessionOptions src) { _askCloseOnExit = ConvertItem(src._askCloseOnExit); _terminalEstablishTimeout = ConvertItem(src._terminalEstablishTimeout); return this; }
protected IIntPreferenceItem ConvertItem(IIntPreferenceItem item) { return(_folder.ChildAt(item.Index).AsItem().AsInt()); }
public TerminalSessionOptions Import(TerminalSessionOptions src) { _askCloseOnExit = ConvertItem(src._askCloseOnExit); _terminalEstablishTimeout = ConvertItem(src._terminalEstablishTimeout); return(this); }
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { _protocolTimeout = builder.DefineIntValue(folder, "protocolTimeout", 5000, PreferenceValidatorUtil.PositiveIntegerValidator); }
public ProtocolOptions Import(ProtocolOptions src) { Debug.Assert(src._folder.Id == _folder.Id); //SSH関係 _retainsPassphrase = ConvertItem(src._retainsPassphrase); _cipherAlgorithmOrder = ConvertItem(src._cipherAlgorithmOrder); _cipherAlgorithmOrderWasChecked = false; _hostKeyAlgorithmOrder = ConvertItem(src._hostKeyAlgorithmOrder); _sshWindowSize = ConvertItem(src._sshWindowSize); _sshCheckMAC = ConvertItem(src._sshCheckMAC); _hostKeyCheckerVerifierTypeName = ConvertItem(src._hostKeyCheckerVerifierTypeName); _logSSHEvents = ConvertItem(src._logSSHEvents); _socketConnectTimeout = ConvertItem(src._socketConnectTimeout); _ipVersionPriority = ConvertItem<IPVersionPriority>(src._ipVersionPriority); //SOCKS関係 _useSocks = ConvertItem(src._useSocks); _socksServer = ConvertItem(src._socksServer); _socksPort = ConvertItem(src._socksPort); _socksAccount = ConvertItem(src._socksAccount); _socksPassword = ConvertItem(src._socksPassword); _socksNANetworks = ConvertItem(src._socksNANetworks); _socketBufferSize = ConvertItem(src._socketBufferSize); _readSerializedPassword = ConvertItem(src._readSerializedPassword); _savePassword = ConvertItem(src._savePassword); _savePlainTextPassword = ConvertItem(src._savePlainTextPassword); return this; }
public TerminalOptions Import(TerminalOptions src) { //表示 _fontName = ConvertItem(src._fontName); _cjkFontName = ConvertItem(src._cjkFontName); _fontSize = ConvertItem(src._fontSize); //floatにすべきかなあ _useClearType = ConvertItem(src._useClearType); _enableBoldStyle = ConvertItem(src._enableBoldStyle); _forceBoldStyle = ConvertItem(src._forceBoldStyle); _lineSpacing = ConvertItem(src._lineSpacing); _bgColor = ConvertItem(src._bgColor); _textColor = ConvertItem(src._textColor); _backgroundImageFileName = ConvertItem(src._backgroundImageFileName); _imageStyle = ConvertItem<ImageStyle>(src._imageStyle); _escapeSequenceColorSet = ConvertItem(src._escapeSequenceColorSet); _darkenEsColorForBackground = ConvertItem(src._darkenEsColorForBackground); _caretColor = ConvertItem(src._caretColor); _caretType = ConvertItem<CaretType>(src._caretType); _caretBlink = ConvertItem(src._caretBlink); //ターミナル _closeOnDisconnect = ConvertItem(src._closeOnDisconnect); _beepOnBellChar = ConvertItem(src._beepOnBellChar); _askCloseOnExit = ConvertItem(src._askCloseOnExit); _charDecodeErrorBehavior = ConvertItem<WarningOption>(src._charDecodeErrorBehavior); _disconnectNotification = ConvertItem<WarningOption>(src._disconnectNotification); _enableComplementForNewConnections = ConvertItem(src._enableComplementForNewConnections); _commandPopupAlwaysOnTop = ConvertItem(src._commandPopupAlwaysOnTop); _commandPopupInTaskBar = ConvertItem(src._commandPopupInTaskBar); //操作 _terminalBufferSize = ConvertItem(src._terminalBufferSize); _send0x7FByDel = ConvertItem(src._send0x7FByDel); _send0x7FByBack = ConvertItem(src._send0x7FByBack); _zone0x1F = ConvertItem<KeyboardStyle>(src._zone0x1F); _customKeySettings = ConvertItem(src._customKeySettings); _allowsScrollInAppMode = ConvertItem(src._allowsScrollInAppMode); _keepAliveInterval = ConvertItem(src._keepAliveInterval); _additionalWordElement = ConvertItem(src._additionalWordElement); //マウスとキーボード _wheelAmount = ConvertItem(src._wheelAmount); _leftAltKey = ConvertItem<AltKeyAction>(src._leftAltKey); _rightAltKey = ConvertItem<AltKeyAction>(src._rightAltKey); _rightButtonAction = ConvertItem<MouseButtonAction>(src._rightButtonAction); _middleButtonAction = ConvertItem<MouseButtonAction>(src._middleButtonAction); //ログ _defaultLogType = ConvertItem<LogType>(src._defaultLogType); _defaultLogDirectory = ConvertItem(src._defaultLogDirectory); // Copy and Paste _alertOnPasteNewLineChar = ConvertItem(src._alertOnPasteNewLineChar); //PreferenceEditorのみ _intelliSenseKey = ConvertItem(src._intelliSenseKey); _commandPopupKey = ConvertItem(src._commandPopupKey); _parseKeyRequired = true; _shellHistoryLimitCount = ConvertItem(src._shellHistoryLimitCount); return this; }
public MRUOptions Import(MRUOptions src) { _limitCount = ConvertItem(src._limitCount); return this; }
public override void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { base.InitializePreference(builder, folder); _i = builder.DefineIntValue(folder, "i", 10, new PreferenceItemValidator <int>(ValidateI)); _s = builder.DefineStringValue(folder, "s", "bobo", new PreferenceItemValidator <string>(ValidateS)); }
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) { IIntPreferenceItem limitCount = builder.DefineIntValue(folder, "limitcount", 5, PreferenceValidatorUtil.PositiveIntegerValidator); //上限値 builder.DefineLooseNode(folder, _mruList, "list"); }
public MRUOptions Import(MRUOptions src) { _limitCount = ConvertItem(src._limitCount); return(this); }
public TerminalOptions Import(TerminalOptions src) { //表示 _fontName = ConvertItem(src._fontName); _cjkFontName = ConvertItem(src._cjkFontName); _fontSize = ConvertItem(src._fontSize); //floatにすべきかなあ _useClearType = ConvertItem(src._useClearType); _enableBoldStyle = ConvertItem(src._enableBoldStyle); _forceBoldStyle = ConvertItem(src._forceBoldStyle); _lineSpacing = ConvertItem(src._lineSpacing); _bgColor = ConvertItem(src._bgColor); _textColor = ConvertItem(src._textColor); _backgroundImageFileName = ConvertItem(src._backgroundImageFileName); _imageStyle = ConvertItem <ImageStyle>(src._imageStyle); _escapeSequenceColorSet = ConvertItem(src._escapeSequenceColorSet); _caretColor = ConvertItem(src._caretColor); _caretType = ConvertItem <CaretType>(src._caretType); _caretBlink = ConvertItem(src._caretBlink); //ターミナル _closeOnDisconnect = ConvertItem(src._closeOnDisconnect); _beepOnBellChar = ConvertItem(src._beepOnBellChar); _askCloseOnExit = ConvertItem(src._askCloseOnExit); _charDecodeErrorBehavior = ConvertItem <WarningOption>(src._charDecodeErrorBehavior); _disconnectNotification = ConvertItem <WarningOption>(src._disconnectNotification); _enableComplementForNewConnections = ConvertItem(src._enableComplementForNewConnections); _commandPopupAlwaysOnTop = ConvertItem(src._commandPopupAlwaysOnTop); _commandPopupInTaskBar = ConvertItem(src._commandPopupInTaskBar); //操作 _terminalBufferSize = ConvertItem(src._terminalBufferSize); _send0x7FByDel = ConvertItem(src._send0x7FByDel); _send0x7FByBack = ConvertItem(src._send0x7FByBack); _zone0x1F = ConvertItem <KeyboardStyle>(src._zone0x1F); _customKeySettings = ConvertItem(src._customKeySettings); _allowsScrollInAppMode = ConvertItem(src._allowsScrollInAppMode); _keepAliveInterval = ConvertItem(src._keepAliveInterval); _additionalWordElement = ConvertItem(src._additionalWordElement); //マウスとキーボード _wheelAmount = ConvertItem(src._wheelAmount); _leftAltKey = ConvertItem <AltKeyAction>(src._leftAltKey); _rightAltKey = ConvertItem <AltKeyAction>(src._rightAltKey); _rightButtonAction = ConvertItem <MouseButtonAction>(src._rightButtonAction); _middleButtonAction = ConvertItem <MouseButtonAction>(src._middleButtonAction); //ログ _defaultLogType = ConvertItem <LogType>(src._defaultLogType); _defaultLogDirectory = ConvertItem(src._defaultLogDirectory); // Copy and Paste _alertOnPasteNewLineChar = ConvertItem(src._alertOnPasteNewLineChar); //PreferenceEditorのみ _intelliSenseKey = ConvertItem(src._intelliSenseKey); _commandPopupKey = ConvertItem(src._commandPopupKey); _parseKeyRequired = true; _shellHistoryLimitCount = ConvertItem(src._shellHistoryLimitCount); return(this); }