private void FillText() { StringResource sr = OptionDialogPlugin.Instance.Strings; this._mouseGroup.Text = sr.GetString("Form.OptionDialog._mouseGroup"); this._keyboardGroup.Text = sr.GetString("Form.OptionDialog._keyboardGroup"); this._leftAltKeyLabel.Text = sr.GetString("Form.OptionDialog._leftAltKeyLabel"); this._rightAltKeyLabel.Text = sr.GetString("Form.OptionDialog._rightAltKeyLabel"); this._send0x7FByDel.Text = sr.GetString("Form.OptionDialog._send0x7FByDel"); this._send0x7FByBack.Text = sr.GetString("Form.OptionDialog._send0x7FByBack"); this._autoCopyByLeftButton.Text = sr.GetString("Form.OptionDialog._autoCopyByLeftButton"); this._viewSplitModifierLabel.Text = sr.GetString("Form.OptionDialog._viewSplitModifierLabel"); this._rightButtonActionLabel.Text = sr.GetString("Form.OptionDialog._rightButtonActionLabel"); this._middleButtonActionLabel.Text = sr.GetString("Form.OptionDialog._middleButtonActionLabel"); this._wheelAmountLabel.Text = sr.GetString("Form.OptionDialog._wheelAmountLabel"); this._zone0x1FLabel.Text = sr.GetString("Form.OptionDialog._zone0x1FLabel"); this._autoKeySettingsLabel.Text = sr.GetString("Form.OptionDialog._autoKeySettingsLabel"); this._customKeySettingsLabel.Text = sr.GetString("Form.OptionDialog._customKeySettingsLabel"); _leftAltKeyAction.Items.AddRange(EnumListItem <AltKeyAction> .GetListItems()); _rightAltKeyAction.Items.AddRange(EnumListItem <AltKeyAction> .GetListItems()); _rightButtonAction.Items.AddRange(EnumListItem <MouseButtonAction> .GetListItems()); _middleButtonAction.Items.AddRange(EnumListItem <MouseButtonAction> .GetListItems()); _zone0x1FBox.Items.AddRange(EnumListItem <KeyboardStyle> .GetListItems()); _viewSplitModifierBox.Items.AddRange( new object[] { new ListItem <Keys>(Keys.None, sr.GetString("Caption.KeysNone")), new ListItem <Keys>(Keys.Control, "Ctrl"), new ListItem <Keys>(Keys.Shift, "Shift"), new ListItem <Keys>(Keys.Alt, "Alt"), }); }
/// <summary> /// Localize controls /// </summary> private void Localize() { this._hostLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._hostLabel"); this._portLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._portLabel"); this._autoExecMacroPathLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._autoExecMacroPathLabel"); this._localEchoLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._localEchoLabel"); this._newLineLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._newLineLabel"); this._logFileLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._logFileLabel"); this._encodingLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._encodingLabel"); this._logTypeLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._logTypeLabel"); this._terminalTypeLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._terminalTypeLabel"); this._telnetNewLine.Text = TEnv.Strings.GetString("Form.LoginDialog._telnetNewLine"); this._portBox.Items.Add(DEFAULT_TELNET_PORT); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); this._terminalTypeBox.Items.AddRange(EnumListItem <TerminalType> .GetListItems()); this._encodingBox.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); this._localEchoBox.Items.AddRange(new object[] { new ListItem <bool>(false, TEnv.Strings.GetString("Common.DoNot")), new ListItem <bool>(true, TEnv.Strings.GetString("Common.Do")), }); this._newLineBox.Items.AddRange(EnumListItem <NewLine> .GetListItems()); }
private EncodingType ParseEncodingType(string text, EncodingType defaultValue) { if (text == null || text.Length == 0) { return(defaultValue); } EncodingType enc = defaultValue; if (ParseUtil.TryParseEnum <EncodingType>(text, ref enc)) { return(enc); } // compare with the localized names for the backward compatibility. foreach (EnumListItem <EncodingType> item in EnumListItem <EncodingType> .GetListItems()) { if (text == item.ToString()) { return(item.Value); } } // accept "utf-8" as EncodingType.UTF8 for the backward compatibility. if (text == "utf-8") { return(EncodingType.UTF8); } return(defaultValue); }
private void FillText() { StringResource sr = OptionDialogPlugin.Instance.Strings; this._charDecodeErrorBehaviorLabel.Text = sr.GetString("Form.OptionDialog._charDecodeErrorBehaviorLabel"); this._bufferSizeLabel.Text = sr.GetString("Form.OptionDialog._bufferSizeLabel"); this._disconnectNotificationLabel.Text = sr.GetString("Form.OptionDialog._disconnectNotificationLabel"); this._closeOnDisconnect.Text = sr.GetString("Form.OptionDialog._closeOnDisconnect"); this._beepOnBellChar.Text = sr.GetString("Form.OptionDialog._beepOnBellChar"); this._allowsScrollInAppMode.Text = sr.GetString("Form.OptionDialog._allowsScrollInAppMode"); this._keepAliveCheck.Text = sr.GetString("Form.OptionDialog._keepAliveCheck"); this._keepAliveLabel.Text = sr.GetString("Form.OptionDialog._keepAliveLabel"); this._defaultLogTypeLabel.Text = sr.GetString("Form.OptionDialog._defaultLogTypeLabel"); this._defaultLogDirectoryLabel.Text = sr.GetString("Form.OptionDialog._defaultLogDirectoryLabel"); this._autoLogCheckBox.Text = sr.GetString("Form.OptionDialog._autoLogCheckBox"); this._additionalWordElementLabel.Text = sr.GetString("Form.OptionDialog._additionalWordElementLabel"); this._shellSupportGroup.Text = sr.GetString("Form.OptionDialog._shellSupportGroup"); this._enableComplementForNewConnections.Text = sr.GetString("Form.OptionDialog._enableComplementForNewConnections"); this._commandPopupAlwaysOnTop.Text = sr.GetString("Form.OptionDialog._commandPopupAlwaysOnTop"); this._commandPopupInTaskBar.Text = sr.GetString("Form.OptionDialog._commandPopupInTaskBar"); this._alertOnPasteNewLineCharCheck.Text = sr.GetString("Form.OptionDialog._alertOnPasteNewLineCharCheck"); _charDecodeErrorBehaviorBox.Items.AddRange(EnumListItem <WarningOption> .GetListItems()); _disconnectNotification.Items.AddRange(EnumListItem <WarningOption> .GetListItems()); _defaultLogTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItemsExcept(LogType.None)); }
public EditRenderProfile(RenderProfile prof) { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); StringResource sr = TerminalUIPlugin.Instance.Strings; _imageStyleBox.Items.AddRange(EnumListItem <ImageStyle> .GetListItems()); this._bgColorLabel.Text = sr.GetString("Form.EditRenderProfile._bgColorLabel"); this._textColorLabel.Text = sr.GetString("Form.EditRenderProfile._textColorLabel"); this._fontSelectButton.Text = sr.GetString("Form.EditRenderProfile._fontSelectButton"); this._fontLabel.Text = sr.GetString("Form.EditRenderProfile._fontLabel"); this._backgroundImageLabel.Text = sr.GetString("Form.EditRenderProfile._backgroungImageLabel"); this._imageStyleLabel.Text = sr.GetString("Form.EditRenderProfile._imageStyleLabel"); this._cancelButton.Text = sr.GetString("Common.Cancel"); this._okButton.Text = sr.GetString("Common.OK"); this._setToDefaultButton.Text = sr.GetString("Form.EditRenderProfile._setToDefaultButton"); this._fontSample.Text = sr.GetString("Common.FontSample"); this._editColorEscapeSequence.Text = sr.GetString("Form.EditRenderProfile._editEscapeSequenceColorBox"); this.Text = sr.GetString("Form.EditRenderProfile.Text"); _profile = prof == null?TerminalUIPlugin.Instance.TerminalEmulatorPlugin.TerminalEmulatorOptions.CreateRenderProfile() : (RenderProfile)prof.Clone(); InitUI(); }
public ChangeLog(ITerminalSession session) { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); StringResource sr = TerminalUIPlugin.Instance.Strings; this._logTypeLabel.Text = sr.GetString("Form.ChangeLog._logTypeLabel"); this._fileNameLabel.Text = sr.GetString("Form.ChangeLog._fileNameLabel"); this._cancelButton.Text = sr.GetString("Common.Cancel"); this._okButton.Text = sr.GetString("Common.OK"); this.Text = sr.GetString("Form.ChangeLog.Text"); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); _session = session; ISimpleLogSettings ls = GetSimpleLogSettings(); if (ls != null) { _logTypeBox.SelectedItem = ls.LogType; // select EnumListItem<T> by T if (ls.LogType != LogType.None) { _fileNameBox.Items.Add(ls.LogPath); _fileNameBox.SelectedIndex = 0; } } else { _logTypeBox.SelectedItem = LogType.None; // select EnumListItem<T> by T } AdjustUI(); }
/// <summary> /// Utility method that checks if the specified value is selected on the combobox. /// </summary> /// <typeparam name="T">type of the value</typeparam> /// <param name="comboBox">target combobox</param> /// <param name="value">value to be compared</param> /// <returns>true if the values is selected. otherwise false.</returns> private bool SelectedItemEquals <T>(ComboBox comboBox, T value) { object item = comboBox.SelectedItem; if (item == null) { return(false); } EnumListItem <T> enumListItem = item as EnumListItem <T>; if (enumListItem != null) { return(enumListItem.Equals(value)); } ListItem <T> listItem = item as ListItem <T>; if (listItem != null) { return(listItem.Equals(value)); } return(false); }
public SSHShortcutLoginDialog(IPoderosaMainWindow parent, ISSHLoginParameter param, ITerminalSettings settings) : base(parent) { this.TerminalSettings = settings; // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); this._privateKeyLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._privateKeyLabel"); this._passphraseLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._passphraseLabel"); this._logFileLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._logFileLabel"); this._hostLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._hostLabel"); this._methodLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._methodLabel"); this._accountLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._accountLabel"); this._authenticationTypeLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._authenticationTypeLabel"); this._encodingLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._encodingLabel"); this._logTypeLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._logTypeLabel"); this.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog.Text"); this._autoExecMacroPathLabel.Text = TEnv.Strings.GetString("Form.SSHShortcutLoginDialog._autoExecMacroPathLabel"); this._cancelButton.Text = TEnv.Strings.GetString("Common.Cancel"); this._loginButton.Text = TEnv.Strings.GetString("Common.OK"); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); _sshParam = param; InitUI(); }
public LocalShellLoginDialog(IPoderosaMainWindow parentWindow) : base(parentWindow) { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); // // TODO: InitializeComponent 呼び出しの後に、コンストラクタ コードを追加してください。 // this._loginButton.Text = TEnv.Strings.GetString("Common.OK"); this._cancelButton.Text = TEnv.Strings.GetString("Common.Cancel"); this._homeDirectoryLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._homeDirectoryLabel"); this._lMessage.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._lMessage"); this._advancedOptionCheck.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._advancedOptionCheck"); this._shellLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._shellLabel"); this._logFileLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._logFileLabel"); this._logTypeLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._logTypeLabel"); this._encodingLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._encodingLabel"); this._terminalTypeLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._terminalTypeLabel"); this._cygwinDirLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._cygwinDirLabel"); this._autoExecMacroPathLabel.Text = TEnv.Strings.GetString("Form.CygwinLoginDialog._autoExecMacroPathLabel"); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); this._encodingBox.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); this._terminalTypeBox.Items.AddRange(EnumListItem <TerminalType> .GetListItems()); //作っておく AdjustLoginDialogUISupport("org.poderosa.terminalsessions.loginDialogUISupport", "cygwinLoginDialogUISupport"); }
private void FillText() { StringResource sr = OptionDialogPlugin.Instance.Strings; this._colorFontGroup.Text = sr.GetString("Form.OptionDialog._colorFontGroup"); this._bgColorLabel.Text = sr.GetString("Form.OptionDialog._bgColorLabel"); this._textColorLabel.Text = sr.GetString("Form.OptionDialog._textColorLabel"); this._editColorEscapeSequence.Text = sr.GetString("Form.OptionDialog._editEscapeSequenceColorBox"); this._darkenEsColorForBackground.Text = sr.GetString("Form.OptionDialog._darkenEsColorForBackground"); this._fontLabel.Text = sr.GetString("Form.OptionDialog._fontLabel"); this._fontSample.Text = sr.GetString("Common.FontSample"); this._fontSelectButton.Text = sr.GetString("Form.OptionDialog._fontSelectButton"); this._backgroundImageLabel.Text = sr.GetString("Form.OptionDialog._backgroundImageLabel"); this._imageStyleLabel.Text = sr.GetString("Form.OptionDialog._imageStyleLabel"); this._caretGroup.Text = sr.GetString("Form.OptionDialog._caretGroup"); this._caretStyleLabel.Text = sr.GetString("Form.OptionDialog._caretStyleLabel"); this._caretSpecifyColor.Text = sr.GetString("Form.OptionDialog._caretSpecifyColor"); this._caretColorLabel.Text = sr.GetString("Form.OptionDialog._caretColorLabel"); this._caretBlink.Text = sr.GetString("Form.OptionDialog._caretBlink"); this._lineSpacingLabel.Text = sr.GetString("Form.OptionDialog._lineSpacingLabel"); this._pixelsLabel.Text = sr.GetString("Form.OptionDialog._pixelsLabel"); this._caretStyleBox.Items.AddRange(GetCaretStyleDescriptions()); this._imageStyleBox.Items.AddRange(EnumListItem <ImageStyle> .GetListItems()); }
public void FillEntryPointsList() { object selItem = lstListEntryPoints.SelectedItem; lstListEntryPoints.Items.Clear(); RegistryKey myConnectionKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Siemens\\SINEC\\LogNames"); if (myConnectionKey != null) { lstListEntryPoints.Items.AddRange(myConnectionKey.GetSubKeyNames()); } lstListEntryPoints.SelectedItem = selItem; EnumListItem tmp = (EnumListItem)lstLIBNODAVEConnectionType.SelectedItem; LibNodaveConnectionTypes connTp = 0; if (tmp != null) { connTp = (LibNodaveConnectionTypes)tmp.Value; } if (lstConnectionList.SelectedIndex >= 0 && connTp == LibNodaveConnectionTypes.Use_Step7_DLL) { EnableDestinationWithEntryPointType(); } }
/// <summary> /// オブジェクトの各値を設定 /// </summary> private void InitializeComponentValue() { // テキスト this.Text = ConnectProfilePlugin.Strings.GetString("Caption.AddProfile"); this._accountGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._accountGroup"); this._authTypeLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._authTypeLabel"); this._autoLoginCheck.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._autoLoginCheck"); this._autoLoginGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._autoLoginGroup"); this._basicGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._basicGroup"); this._cancelButton.Text = ConnectProfilePlugin.Strings.GetString("Form.Common._cancelButton"); this._charCodeLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._charCodeLabel"); this._commandSendIntLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._commandSendIntLabel"); this._descriptionLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._descriptionLabel"); this._etcGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._etcGroup"); this._execCommandLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._execCommandLabel"); this._hostNameLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._hostNameLabel"); this._keyFileLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._keyFileLabel"); this._loginPromptLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._loginPromptLabel"); this._newLineTypeLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._newLineTypeLabel"); this._okButton.Text = ConnectProfilePlugin.Strings.GetString("Form.Common._okButton"); this._openKeyFileButton.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._openKeyFileButton"); this._passwordLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._passwordLabel"); this._passwordPromptLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._passwordPromptLabel"); this._portLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._portLabel"); this._profileItemColorLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._profileItemColorLabel"); this._promptRecvTimeoutLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._promptRecvTimeoutLabel"); this._protocolLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._protocolLabel"); this._sshGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._sshGroup"); this._showPasswordCheck.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._showPasswordCheck"); this._suGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suGroup"); this._suPasswordLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suPasswordLabel"); this._suTypeLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suTypeLabel"); this._suTypeRadio1.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suTypeRadio1"); this._suTypeRadio2.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suTypeRadio2"); this._suTypeRadio3.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suTypeRadio3"); this._suTypeRadio4.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suTypeRadio4"); this._suUserNameLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._suUserNameLabel"); this._telnetNewLineCheck.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._telnetNewLineCheck"); this._editRenderButton.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._editRenderButton"); this._editRenderLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._editRenderLabel"); this._terminalGroup.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._terminalGroup"); this._terminalTypeLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._terminalTypeLabel"); this._userNameLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.AddProfile._userNameLabel"); // コンボボックス this._charCodeBox.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); this._authTypeBox.Items.AddRange(EnumListItem <AuthType> .GetListItems()); this._newLineTypeBox.Items.AddRange(EnumListItem <NewLine> .GetListItems()); this._terminalTypeBox.Items.AddRange(EnumListItem <TerminalType> .GetListItems()); this._protocolBox.Items.AddRange(new object[] { new ListItem <ConnectionMethod>(ConnectionMethod.Telnet, ConnectionMethod.Telnet.ToString()), new ListItem <ConnectionMethod>(ConnectionMethod.SSH1, ConnectionMethod.SSH1.ToString()), new ListItem <ConnectionMethod>(ConnectionMethod.SSH2, ConnectionMethod.SSH2.ToString()), }); }
public override void OnChange(ICommandTarget target, int selectedIndex, object selectedItem) { EnumListItem <EncodingType> item = selectedItem as EnumListItem <EncodingType>; if (item != null) { ITerminalControlHost session = TerminalCommandTarget.AsTerminal(target); ITerminalSettings ts = session.TerminalSettings; ts.BeginUpdate(); ts.Encoding = item.Value; ts.EndUpdate(); } }
private void FillText() { StringResource sr = OptionDialogPlugin.Instance.Strings; this._MRUSizeLabel.Text = sr.GetString("Form.OptionDialog._MRUSizeLabel"); this._askCloseOnExit.Text = sr.GetString("Form.OptionDialog._askCloseOnExit"); this._languageLabel.Text = sr.GetString("Form.OptionDialog._languageLabel"); this._showToolBar.Text = sr.GetString("Form.OptionDialog._showToolBar"); this._startupOptionLabel.Text = sr.GetString("Form.OptionDialog._startupOptionLabel"); _languageBox.Items.AddRange(EnumListItem <Language> .GetListItems()); _startupOptionBox.Items.AddRange(EnumListItem <StartupAction> .GetListItems()); }
public SerialLoginDialog() { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); StringResource sr = SerialPortPlugin.Instance.Strings; this._serialGroup.Text = sr.GetString("Form.SerialLoginDialog._serialGroup"); //以下、SerialConfigとテキストを共用 this._portLabel.Text = sr.GetString("Form.SerialConfig._portLabel"); this._baudRateLabel.Text = sr.GetString("Form.SerialConfig._baudRateLabel"); this._dataBitsLabel.Text = sr.GetString("Form.SerialConfig._dataBitsLabel"); this._parityLabel.Text = sr.GetString("Form.SerialConfig._parityLabel"); this._stopBitsLabel.Text = sr.GetString("Form.SerialConfig._stopBitsLabel"); this._flowControlLabel.Text = sr.GetString("Form.SerialConfig._flowControlLabel"); this._transmitDelayPerLineLabel.Text = "Transmit Delay(line)"; this._transmitDelayPerCharLabel.Text = "Transmit Delay(char)"; string bits = sr.GetString("Caption.SerialConfig.Bits"); this._parityBox.Items.AddRange(EnumListItem <Parity> .GetListItems()); this._dataBitsBox.Items.AddRange(new object[] { String.Format("{0}{1}", 7, bits), String.Format("{0}{1}", 8, bits) }); this._stopBitsBox.Items.AddRange(EnumListItem <StopBits> .GetListItems()); this._baudRateBox.Items.AddRange(TerminalUtil.BaudRates); this._flowControlBox.Items.AddRange(EnumListItem <FlowControl> .GetListItems()); this._terminalGroup.Text = sr.GetString("Form.SerialLoginDialog._terminalGroup"); this._localEchoLabel.Text = sr.GetString("Form.SerialLoginDialog._localEchoLabel"); this._newLineLabel.Text = sr.GetString("Form.SerialLoginDialog._newLineLabel"); this._logFileLabel.Text = sr.GetString("Form.SerialLoginDialog._logFileLabel"); this._encodingLabel.Text = sr.GetString("Form.SerialLoginDialog._encodingLabel"); this._logTypeLabel.Text = sr.GetString("Form.SerialLoginDialog._logTypeLabel"); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); this._localEchoBox.Items.AddRange(new object[] { sr.GetString("Common.DoNot"), sr.GetString("Common.Do") }); this._newLineBox.Items.AddRange(EnumListItem <NewLine> .GetListItems()); this._encodingBox.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); this._autoExecMacroPathLabel.Text = sr.GetString("Form.SerialLoginDialog._autoExecMacroPathLabel"); this._loginButton.Text = sr.GetString("Common.OK"); this._cancelButton.Text = sr.GetString("Common.Cancel"); this.Text = sr.GetString("Form.SerialLoginDialog.Text"); InitUI(); }
private void InitUI() { ITCPParameter tcp = (ITCPParameter)_sshParam.GetAdapter(typeof(ITCPParameter)); _hostBox.Text = tcp.Destination; _methodBox.Text = _sshParam.Method.ToString(); //if(_sshParam.Port!=22) _methodBox.Text += String.Format(TEnv.Strings.GetString("Caption.SSHShortcutLoginDialog.NotStandardPort"), _sshParam.Port); _accountBox.Text = _sshParam.Account; _authenticationTypeBox.Text = _sshParam.AuthenticationType.ToString(); //さぼり _encodingBox.Text = EnumListItem <EncodingType> .CreateListItem(this.TerminalSettings.Encoding).Text; _logTypeBox.SelectedItem = LogType.None; // select EnumListItem<T> by T if (_sshParam.AuthenticationType == AuthenticationType.Password) { _privateKeyBox.Enabled = false; _privateKeySelect.Enabled = false; } else if (_sshParam.AuthenticationType == AuthenticationType.PublicKey) { _privateKeyBox.Text = _sshParam.IdentityFileName; } else if (_sshParam.AuthenticationType == AuthenticationType.KeyboardInteractive) { _privateKeyBox.Enabled = false; _privateKeySelect.Enabled = false; _passphraseBox.Enabled = false; } _passphraseBox.Text = ""; if (_sshParam.PasswordOrPassphrase.Length == 0 && TerminalSessionsPlugin.Instance.ProtocolService.ProtocolOptions.RetainsPassphrase) { string p = TerminalSessionsPlugin.Instance.ProtocolService.PassphraseCache.GetOrEmpty(tcp.Destination, _sshParam.Account); _passphraseBox.Text = p; } IAutoExecMacroParameter autoExecParams = _sshParam.GetAdapter(typeof(IAutoExecMacroParameter)) as IAutoExecMacroParameter; if (autoExecParams != null && TelnetSSHPlugin.Instance.MacroEngine != null) { _autoExecMacroPathBox.Text = (autoExecParams.AutoExecMacroPath != null) ? autoExecParams.AutoExecMacroPath : String.Empty; } else { _autoExecMacroPathLabel.Enabled = false; _autoExecMacroPathBox.Enabled = false; _selectAutoExecMacroButton.Enabled = false; } AdjustUI(); }
/// <summary> /// <ja>オブジェクトテキスト初期化</ja> /// </summary> private void FillText() { // テキスト this._extendPasteOptionGroup.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._extendPasteOptionGroup"); this._useActionLabel.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._useActionLabel"); this._highlightKeywordLabel.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._highlightKeywordLabel"); this._showConfirmCheck.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._showConfirmCheck"); this._afterSpecifiedTimePasteCheck.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._afterSpecifiedTimePasteCheck"); this._changeDialogSize.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._changeDialogSize"); this._descriptionLabel.Text = ExtendPastePlugin.Instance.Strings.GetString("Form.ExtendPasteOptionPanel._descriptionLabel"); // コンボボックス this._useActionBox.Items.AddRange(EnumListItem <UseAction> .GetListItems()); }
/// <summary> /// オブジェクトを有効/無効化(オブジェクト共通) /// </summary> private void EnableValidControls(object sender, EventArgs e) { if (_Initialized == true) { ConnectionMethod protocol = ((ListItem <ConnectionMethod>)_protocolBox.SelectedItem).Value; EnumListItem <AuthType> authTypeItem = (EnumListItem <AuthType>)_authTypeBox.SelectedItem; EnumListItem <NewLine> newLineItem = (EnumListItem <NewLine>)_newLineTypeBox.SelectedItem; bool autologin = (_autoLoginCheck.Checked); bool ssh = (protocol == ConnectionMethod.SSH1 || protocol == ConnectionMethod.SSH2); bool pubkey = (authTypeItem != null && authTypeItem.Value == AuthType.PublicKey); bool kbd = (authTypeItem != null && authTypeItem.Value == AuthType.KeyboardInteractive); bool newline = (newLineItem != null && newLineItem.Value == NewLine.CRLF); bool su = (_suUserNameBox.Text != ""); // ユーザ名/パスワード _userNameBox.Enabled = (ssh || autologin); _passwordBox.Enabled = autologin; // 自動ログイン用プロンプト _loginPromptBox.Enabled = (autologin && !ssh); _passwordPromptBox.Enabled = ((autologin && !ssh) || (autologin && su)); // 秘密鍵ファイル _authTypeBox.Enabled = ssh; _keyFileBox.Enabled = (ssh && pubkey); _openKeyFileButton.Enabled = (ssh && pubkey); // 実行コマンド _execCommandBox.Enabled = autologin; // SU _suUserNameBox.Enabled = autologin; _suPasswordBox.Enabled = (su && autologin); _suTypeRadio1.Enabled = (su && autologin); _suTypeRadio2.Enabled = (su && autologin); _suTypeRadio3.Enabled = (su && autologin); _suTypeRadio4.Enabled = (su && autologin); // TelnetNewLine _telnetNewLineCheck.Enabled = (!ssh && newline); // コマンド発行間隔/プロンプト受信タイムアウト _commandSendIntBox.Enabled = autologin; _promptRecvTimeoutBox.Enabled = autologin; // ポート番号 _portBox.Value = ssh ? ConnectProfileStruct.DEFAULT_SSH_PORT : ConnectProfileStruct.DEFAULT_TELNET_PORT; } }
private void FillText() { StringResource sr = OptionDialogPlugin.Instance.Strings; this._useSocks.Text = sr.GetString("Form.OptionDialog._useSocks"); this._socksServerLabel.Text = sr.GetString("Form.OptionDialog._socksServerLabel"); this._socksPortLabel.Text = sr.GetString("Form.OptionDialog._socksPortLabel"); this._socksAccountLabel.Text = sr.GetString("Form.OptionDialog._socksAccountLabel"); this._socksPasswordLabel.Text = sr.GetString("Form.OptionDialog._socksPasswordLabel"); this._socksNANetworksLabel.Text = sr.GetString("Form.OptionDialog._socksNANetworksLabel"); _IPv6Group.Text = sr.GetString("Form.OptionDialog._IPv6Group"); _IPv6PriorityLabel.Text = sr.GetString("Form.OptionDialog._IPv6PriorityLabel"); _IPv6PriorityBox.Items.AddRange(EnumListItem <IPVersionPriority> .GetListItems()); }
/// <summary> /// Localize controls /// </summary> private void Localize() { this._hostLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._hostLabel"); this._portLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._portLabel"); this._privateKeyLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._privateKeyLabel"); this._authenticationLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._authenticationLabel"); this._passphraseLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._passphraseLabel"); this._usernameLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._usernameLabel"); this._autoExecMacroPathLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._autoExecMacroPathLabel"); this._localEchoLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._localEchoLabel"); this._newLineLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._newLineLabel"); this._logFileLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._logFileLabel"); this._encodingLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._encodingLabel"); this._logTypeLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._logTypeLabel"); this._terminalTypeLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._terminalTypeLabel"); this._portBox.Items.Add(DEFAULT_SSH_PORT); this._logTypeBox.Items.AddRange(EnumListItem <LogType> .GetListItems()); this._terminalTypeBox.Items.AddRange(EnumListItem <TerminalType> .GetListItems()); this._encodingBox.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); this._localEchoBox.Items.AddRange(new object[] { new ListItem <bool>(false, TEnv.Strings.GetString("Common.DoNot")), new ListItem <bool>(true, TEnv.Strings.GetString("Common.Do")), }); this._newLineBox.Items.AddRange(EnumListItem <NewLine> .GetListItems()); this._authOptions.Items.AddRange(EnumListItem <AuthType> .GetListItems()); this._useX11ForwardingCheckBox.Text = TEnv.Strings.GetString("Form.LoginDialog._useX11ForwardingCheckBox"); this._x11DisplayLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._x11DisplayLabel"); this._x11DisplayNote.Text = TEnv.Strings.GetString("Form.LoginDialog._x11DisplayNote"); this._toolTip.SetToolTip(this._x11DisplayText, TEnv.Strings.GetString("Form.LoginDialog._x11DisplayText_ToolTip")); this._x11ScreenLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._x11ScreenLabel"); this._toolTip.SetToolTip(this._x11ScreenText, TEnv.Strings.GetString("Form.LoginDialog._x11ScreenText_ToolTip")); this._x11NeedAuthCheckBox.Text = TEnv.Strings.GetString("Form.LoginDialog._x11NeedAuthCheckBox"); this._x11XauthorityLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._x11XauthorityLabel"); this._x11UseCygwinDomainSocketCheckBox.Text = TEnv.Strings.GetString("Form.LoginDialog._x11UseCygwinDomainSocketCheckBox"); this._x11CygwinX11UnixFolderLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._x11CygwinX11UnixFolderLabel"); this._x11CygwinX11UnixFolderExampleLabel.Text = TEnv.Strings.GetString("Form.LoginDialog._x11CygwinX11UnixFolderExampleLabel"); this._x11CygwinX11UnixFolderExampleLabel.Font = new Font(this._x11CygwinX11UnixFolderExampleLabel.Font.FontFamily, 8f); this._useAgentForwardingCheckBox.Text = TEnv.Strings.GetString("Form.LoginDialog._useAgentForwardingCheckBox"); this._agentForwardingConfigButton.Text = TEnv.Strings.GetString("Form.LoginDialog._agentForwardingConfigButton"); }
public OptionDialog() { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); // // TODO: InitializeComponent 呼び出しの後に、コンストラクタ コードを追加してください。 // _tabControl.SelectedIndex = _FIRSTTABPAGE; _optionPreservePlace.Items.AddRange(EnumListItem <OptionPreservePlace> .GetListItems()); _languageBox.Items.AddRange(EnumListItem <Language> .GetListItems()); InitializeText(); //TODO SOCKSとOptionPreservePlaceまわりは未サポート _useSocks.Enabled = false; }
/// <summary> /// Set i18n text. /// </summary> private void SetupControls() { StringResource res = PipePlugin.Instance.Strings; this.Text = res.GetString("Form.OpenPipeDialog.Title"); _radioButtonProcess.Text = res.GetString("Form.OpenPipeDialog._radioButtonProcess"); _radioButtonPipe.Text = res.GetString("Form.OpenPipeDialog._radioButtonPipe"); _groupBoxProcess.Text = res.GetString("Form.OpenPipeDialog._groupBoxProcess"); _groupBoxPipe.Text = res.GetString("Form.OpenPipeDialog._groupBoxPipe"); _labelExePath.Text = res.GetString("Form.OpenPipeDialog._labelExePath"); _labelCommandLineOptions.Text = res.GetString("Form.OpenPipeDialog._labelCommandLineOptions"); _labelInputPath.Text = res.GetString("Form.OpenPipeDialog._labelInputPath"); _labelOutputPath.Text = res.GetString("Form.OpenPipeDialog._labelOutputPath"); _labelLogFile.Text = res.GetString("Form.OpenPipeDialog._labelLogFile"); _labelLogType.Text = res.GetString("Form.OpenPipeDialog._labelLogType"); _labelEncoding.Text = res.GetString("Form.OpenPipeDialog._labelEncoding"); _labelLocalEcho.Text = res.GetString("Form.OpenPipeDialog._labelLocalEcho"); _labelNewLine.Text = res.GetString("Form.OpenPipeDialog._labelNewLine"); _labelTerminalType.Text = res.GetString("Form.OpenPipeDialog._labelTerminalType"); _labelAutoExecMacroPath.Text = res.GetString("Form.OpenPipeDialog._labelAutoExecMacroPath"); _checkBoxBidirectinal.Text = res.GetString("Form.OpenPipeDialog._checkBoxBidirectinal"); _buttonEnvironmentVariables.Text = res.GetString("Form.OpenPipeDialog._buttonEnvironmentVariables"); _buttonOK.Text = res.GetString("Common.OK"); _buttonCancel.Text = res.GetString("Common.Cancel"); _comboBoxLogType.Items.AddRange(EnumListItem <LogType> .GetListItems()); _comboBoxEncoding.Items.AddRange(EnumListItem <EncodingType> .GetListItems()); _comboBoxLocalEcho.Items.AddRange(new object[] { res.GetString("Common.DoNot"), res.GetString("Common.Do") }); _comboBoxNewLine.Items.AddRange(EnumListItem <NewLine> .GetListItems()); _comboBoxTerminalType.Items.AddRange(EnumListItem <TerminalType> .GetListItems()); }
//旧バージョンフォーマットの読み込み private static ShortcutFileContent ParseOldFormat(XmlElement root) { if (root.GetAttribute("type") != "tcp") { throw new FormatException("Unknown File Format"); } //accountの有無でTelnet/SSHを切り替え ITerminalParameter param; ISSHLoginParameter ssh = null; ITCPParameter tcp = null; string account = root.GetAttribute("account"); if (account.Length > 0) { ssh = TerminalSessionsPlugin.Instance.ProtocolService.CreateDefaultSSHParameter(); ssh.Account = account; tcp = (ITCPParameter)ssh.GetAdapter(typeof(ITCPParameter)); } else { tcp = TerminalSessionsPlugin.Instance.ProtocolService.CreateDefaultTelnetParameter(); } param = (ITerminalParameter)tcp.GetAdapter(typeof(ITerminalParameter)); ITerminalSettings settings = TerminalSessionsPlugin.Instance.TerminalEmulatorService.CreateDefaultTerminalSettings("", null); settings.BeginUpdate(); //アトリビュート舐めて設定 foreach (XmlAttribute attr in root.Attributes) { switch (attr.Name) { case "auth": if (ssh != null) { ssh.AuthenticationType = ParseUtil.ParseEnum <AuthenticationType>(attr.Value, AuthenticationType.Password); } break; case "keyfile": if (ssh != null) { ssh.IdentityFileName = attr.Value; } break; case "encoding": settings.Encoding = EncodingType.ISO8859_1; foreach (EnumListItem <EncodingType> item in EnumListItem <EncodingType> .GetListItems()) { if (attr.Value == item.ToString()) { settings.Encoding = item.Value; break; } } break; case "terminal-type": settings.TerminalType = ParseUtil.ParseEnum <TerminalType>(attr.Value, TerminalType.XTerm); param.SetTerminalName(attr.Value); break; case "localecho": settings.LocalEcho = ParseUtil.ParseBool(attr.Value, false); break; case "caption": settings.Caption = attr.Value; break; case "transmit-nl": settings.TransmitNL = ParseUtil.ParseEnum <NewLine>(attr.Value, NewLine.CR); break; case "host": tcp.Destination = attr.Value; break; case "port": tcp.Port = ParseUtil.ParseInt(attr.Value, ssh != null ? 22 : 23); break; case "method": if (ssh != null) { ssh.Method = attr.Value == "SSH1" ? SSHProtocol.SSH1 : SSHProtocol.SSH2; } break; } } //ts.LineFeedRule = ParseUtil.ParseEnum<LineFeedRule>(node.Get("linefeedrule"), LineFeedRule.Normal); settings.EndUpdate(); return(new ShortcutFileContent(settings, param)); }