예제 #1
0
        /// <summary>
        /// オブジェクト各値設定
        /// </summary>
        private void InitializeComponentValue()
        {
            // テキスト
            this.Text = ConnectProfilePlugin.Strings.GetString("Caption.ConnectProfile");
            this._addProfileButton.Text         = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._addProfileButton");
            this._autoLoginColumn.Text          = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._autoLoginColumn");
            this._cancelButton.Text             = ConnectProfilePlugin.Strings.GetString("Form.Common._cancelButton");
            this._checkAllOffButton.Text        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._checkAllOffButton");
            this._copyButton.Text               = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._copyButton");
            this._csvExportButton.Text          = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._csvExportButton");
            this._csvImportButton.Text          = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._csvImportButton");
            this._delProfileButton.Text         = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._delProfileButton");
            this._descriptionColumn.Text        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._descriptionColumn");
            this._displaySelectedOnlyCheck.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._displaySelectedOnlyCheck");
            this._editProfileButton.Text        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._editProfileButton");
            this._execCommandColumn.Text        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._execCommandColumn");
            this._filterLabel.Text              = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._filterLabel");
            this._hintLabel.Text                  = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._hintLabel");
            this._hostNameColumn.Text             = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._hostNameColumn");
            this._okButton.Text                   = ConnectProfilePlugin.Strings.GetString("Form.Common._okButton");
            this._openCSVFileDialog.Filter        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._openCSVFileDialog.Filter");
            this._openCSVFileDialog.Title         = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._openCSVFileDialog.Caption");
            this._portColumn.Text                 = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._portColumn");
            this._profileCountLabel.Text          = String.Format(ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._profileCountLabel"), 0);
            this._protocolColumn.Text             = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._protocolColumn");
            this._saveCSVFileDialog.Filter        = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._saveCSVFileDialog.Filter");
            this._saveCSVFileDialog.Title         = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._saveCSVFileDialog.Caption");
            this._selectedProfileCountLabel.Text  = String.Format(ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._selectedProfileCountLabel"), 0);
            this._suSwitchColumn.Text             = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._suSwitchColumn");
            this._terminalDisplayColorColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._terminalDisplayColorColumn");
            this._userNameColumn.Text             = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._userNameColumn");

            // ファイル保存/開くダイアログ設定
            this._saveCSVFileDialog.DefaultExt      = "csv";
            this._saveCSVFileDialog.AddExtension    = true;
            this._openCSVFileDialog.DefaultExt      = "csv";
            this._openCSVFileDialog.CheckFileExists = true;
            this._openCSVFileDialog.Multiselect     = false;

            // プロファイルリストカラム幅
            this._hostNameColumn.Width             = -2;
            this._userNameColumn.Width             = -2;
            this._autoLoginColumn.Width            = -2;
            this._protocolColumn.Width             = -2;
            this._portColumn.Width                 = -2;
            this._suSwitchColumn.Width             = -2;
            this._execCommandColumn.Width          = -1;
            this._terminalDisplayColorColumn.Width = -2;
            this._descriptionColumn.Width          = -2;

            // プロファイルリストソートイベント作成/設定
            _listViewItemSorter             = new ListViewItemComparer();
            _listViewItemSorter.ColumnModes = new ListViewItemComparer.ComparerMode[] {
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.Integer,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
            };
            _profileListView.ListViewItemSorter = _listViewItemSorter;
        }
        /// <summary>
        /// オブジェクト各値設定
        /// </summary>
        private void InitializeComponentValue()
        {
            // テキスト
            this.Text = ConnectProfilePlugin.Strings.GetString("Caption.ConnectProfile");
            this._addProfileButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._addProfileButton");
            this._autoLoginColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._autoLoginColumn");
            this._cancelButton.Text = ConnectProfilePlugin.Strings.GetString("Form.Common._cancelButton");
            this._checkAllOffButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._checkAllOffButton");
            this._copyButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._copyButton");
            this._csvExportButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._csvExportButton");
            this._csvImportButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._csvImportButton");
            this._delProfileButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._delProfileButton");
            this._descriptionColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._descriptionColumn");
            this._displaySelectedOnlyCheck.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._displaySelectedOnlyCheck");
            this._editProfileButton.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._editProfileButton");
            this._execCommandColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._execCommandColumn");
            this._filterLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._filterLabel");
            this._hintLabel.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._hintLabel");
            this._hostNameColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._hostNameColumn");
            this._okButton.Text = ConnectProfilePlugin.Strings.GetString("Form.Common._okButton");
            this._openCSVFileDialog.Filter = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._openCSVFileDialog.Filter");
            this._openCSVFileDialog.Title = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._openCSVFileDialog.Caption");
            this._portColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._portColumn");
            this._profileCountLabel.Text = String.Format(ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._profileCountLabel"), 0);
            this._protocolColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._protocolColumn");
            this._saveCSVFileDialog.Filter = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._saveCSVFileDialog.Filter");
            this._saveCSVFileDialog.Title = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._saveCSVFileDialog.Caption");
            this._selectedProfileCountLabel.Text = String.Format(ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._selectedProfileCountLabel"), 0);
            this._suSwitchColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._suSwitchColumn");
            this._terminalDisplayColorColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._terminalDisplayColorColumn");
            this._userNameColumn.Text = ConnectProfilePlugin.Strings.GetString("Form.ConnectProfile._userNameColumn");

            // ファイル保存/開くダイアログ設定
            this._saveCSVFileDialog.DefaultExt = "csv";
            this._saveCSVFileDialog.AddExtension = true;
            this._openCSVFileDialog.DefaultExt = "csv";
            this._openCSVFileDialog.CheckFileExists = true;
            this._openCSVFileDialog.Multiselect = false;

            // プロファイルリストカラム幅
            this._hostNameColumn.Width = -2;
            this._userNameColumn.Width = -2;
            this._autoLoginColumn.Width = -2;
            this._protocolColumn.Width = -2;
            this._portColumn.Width = -2;
            this._suSwitchColumn.Width = -2;
            this._execCommandColumn.Width = -1;
            this._terminalDisplayColorColumn.Width = -2;
            this._descriptionColumn.Width = -2;

            // プロファイルリストソートイベント作成/設定
            _listViewItemSorter = new ListViewItemComparer();
            _listViewItemSorter.ColumnModes = new ListViewItemComparer.ComparerMode[] {
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.Integer,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
                ListViewItemComparer.ComparerMode.String,
            };
            _profileListView.ListViewItemSorter = _listViewItemSorter;
        }