- /*
- * Copyright (c) 2005 Poderosa Project, All Rights Reserved.
- * $Id: LineFeedStyleDialog.cs,v 1.2 2005/04/20 08:45:45 okajima Exp $
- */
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using Poderosa.ConnectionParam;
- using Poderosa.Communication;
- using EnumDescAttributeT = Poderosa.Toolkit.EnumDescAttribute;
- namespace Poderosa.Forms
- {
- /// <summary>
- /// LineFeedStyleDialog 偺奣梫偺愢柧偱偡丅
- /// </summary>
- internal class LineFeedStyleDialog : System.Windows.Forms.Form
- {
- private System.Windows.Forms.Label _lineFeedLabel;
- private System.Windows.Forms.ComboBox _lineFeedBox;
- private System.Windows.Forms.Button _okButton;
- private System.Windows.Forms.Button _cancelButton;
- /// <summary>
- /// 昁梫側僨僓僀僫曄悢偱偡丅
- /// </summary>
- private System.ComponentModel.Container components = null;
- public LineFeedStyleDialog(TerminalConnection con)
- {
- //
- // Windows 僼僅乕儉 僨僓僀僫 僒億乕僩偵昁梫偱偡丅
- //
- InitializeComponent();
- //
- // TODO: InitializeComponent 屇傃弌偟偺屻偵丄僐儞僗僩儔僋僞 僐乕僪傪捛壛偟偰偔偩偝偄丅
- //
- this._cancelButton.Text = GApp.Strings.GetString("Common.Cancel");
- this._okButton.Text = GApp.Strings.GetString("Common.OK");
- this._lineFeedLabel.Text = GApp.Strings.GetString("Form.LineFeedStyleDialog._lineFeedLabel");
- this.Text = GApp.Strings.GetString("Form.LineFeedStyleDialog.Text");
- this._lineFeedBox.Items.AddRange(EnumDescAttributeT.For(typeof(LineFeedRule)).DescriptionCollection());
- this._lineFeedBox.SelectedIndex = (int)con.Param.LineFeedRule;
- }
- public LineFeedRule LineFeedRule {
- get {
- return (LineFeedRule)_lineFeedBox.SelectedIndex;
- }
- }
- /// <summary>
- /// 巊梡偝傟偰偄傞儕僜乕僗偵屻張棟傪幚峴偟傑偡丅
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows 僼僅乕儉 僨僓僀僫偱惗惉偝傟偨僐乕僪
- /// <summary>
- /// 僨僓僀僫 僒億乕僩偵昁梫側儊僜僢僪偱偡丅偙偺儊僜僢僪偺撪梕傪
- /// 僐乕僪 僄僨傿僞偱曄峏偟側偄偱偔偩偝偄丅
- /// </summary>
- private void InitializeComponent()
- {
- this._lineFeedLabel = new System.Windows.Forms.Label();
- this._lineFeedBox = new ComboBox();
- this._okButton = new System.Windows.Forms.Button();
- this._cancelButton = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // _lineFeedLabel
- //
- this._lineFeedLabel.Location = new System.Drawing.Point(8, 16);
- this._lineFeedLabel.Name = "_lineFeedLabel";
- this._lineFeedLabel.TabIndex = 0;
- this._lineFeedLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // _lineFeedBox
- //
- this._lineFeedBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this._lineFeedBox.Location = new System.Drawing.Point(96, 16);
- this._lineFeedBox.Name = "_lineFeedBox";
- this._lineFeedBox.Size = new System.Drawing.Size(152, 20);
- this._lineFeedBox.TabIndex = 1;
- this._lineFeedBox.Text = "comboBox1";
- //
- // _okButton
- //
- this._okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
- this._okButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this._okButton.Location = new System.Drawing.Point(80, 48);
- this._okButton.Name = "_okButton";
- this._okButton.TabIndex = 2;
- //
- // _cancelButton
- //
- this._cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this._cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this._cancelButton.Location = new System.Drawing.Point(168, 48);
- this._cancelButton.Name = "_cancelButton";
- this._cancelButton.TabIndex = 3;
- //
- // LineFeedStyleDialog
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
- this.ClientSize = new System.Drawing.Size(256, 78);
- this.Controls.Add(this._cancelButton);
- this.Controls.Add(this._okButton);
- this.Controls.Add(this._lineFeedBox);
- this.Controls.Add(this._lineFeedLabel);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "LineFeedStyleDialog";
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.AcceptButton = _okButton;
- this.CancelButton = _cancelButton;
- this.ResumeLayout(false);
- }
- #endregion
- }
- }