LineFeedStyleDialog.cs
上传用户:szltgg
上传日期:2019-05-16
资源大小:604k
文件大小:4k
源码类别:

Telnet服务器

开发平台:

C#

  1. /*
  2. * Copyright (c) 2005 Poderosa Project, All Rights Reserved.
  3. * $Id: LineFeedStyleDialog.cs,v 1.2 2005/04/20 08:45:45 okajima Exp $
  4. */
  5. using System;
  6. using System.Drawing;
  7. using System.Collections;
  8. using System.ComponentModel;
  9. using System.Windows.Forms;
  10. using Poderosa.ConnectionParam;
  11. using Poderosa.Communication;
  12. using EnumDescAttributeT = Poderosa.Toolkit.EnumDescAttribute;
  13. namespace Poderosa.Forms
  14. {
  15. /// <summary>
  16. /// LineFeedStyleDialog 偺奣梫偺愢柧偱偡丅
  17. /// </summary>
  18. internal class LineFeedStyleDialog : System.Windows.Forms.Form
  19. {
  20. private System.Windows.Forms.Label _lineFeedLabel;
  21. private System.Windows.Forms.ComboBox _lineFeedBox;
  22. private System.Windows.Forms.Button _okButton;
  23. private System.Windows.Forms.Button _cancelButton;
  24. /// <summary>
  25. /// 昁梫側僨僓僀僫曄悢偱偡丅
  26. /// </summary>
  27. private System.ComponentModel.Container components = null;
  28. public LineFeedStyleDialog(TerminalConnection con)
  29. {
  30. //
  31. // Windows 僼僅乕儉 僨僓僀僫 僒億乕僩偵昁梫偱偡丅
  32. //
  33. InitializeComponent();
  34. //
  35. // TODO: InitializeComponent 屇傃弌偟偺屻偵丄僐儞僗僩儔僋僞 僐乕僪傪捛壛偟偰偔偩偝偄丅
  36. //
  37. this._cancelButton.Text = GApp.Strings.GetString("Common.Cancel");
  38. this._okButton.Text = GApp.Strings.GetString("Common.OK");
  39. this._lineFeedLabel.Text = GApp.Strings.GetString("Form.LineFeedStyleDialog._lineFeedLabel");
  40. this.Text = GApp.Strings.GetString("Form.LineFeedStyleDialog.Text");
  41. this._lineFeedBox.Items.AddRange(EnumDescAttributeT.For(typeof(LineFeedRule)).DescriptionCollection());
  42. this._lineFeedBox.SelectedIndex = (int)con.Param.LineFeedRule;
  43. }
  44. public LineFeedRule LineFeedRule {
  45. get {
  46. return (LineFeedRule)_lineFeedBox.SelectedIndex;
  47. }
  48. }
  49. /// <summary>
  50. /// 巊梡偝傟偰偄傞儕僜乕僗偵屻張棟傪幚峴偟傑偡丅
  51. /// </summary>
  52. protected override void Dispose( bool disposing )
  53. {
  54. if( disposing )
  55. {
  56. if(components != null)
  57. {
  58. components.Dispose();
  59. }
  60. }
  61. base.Dispose( disposing );
  62. }
  63. #region Windows 僼僅乕儉 僨僓僀僫偱惗惉偝傟偨僐乕僪 
  64. /// <summary>
  65. /// 僨僓僀僫 僒億乕僩偵昁梫側儊僜僢僪偱偡丅偙偺儊僜僢僪偺撪梕傪
  66. /// 僐乕僪 僄僨傿僞偱曄峏偟側偄偱偔偩偝偄丅
  67. /// </summary>
  68. private void InitializeComponent()
  69. {
  70. this._lineFeedLabel = new System.Windows.Forms.Label();
  71. this._lineFeedBox = new ComboBox();
  72. this._okButton = new System.Windows.Forms.Button();
  73. this._cancelButton = new System.Windows.Forms.Button();
  74. this.SuspendLayout();
  75. // 
  76. // _lineFeedLabel
  77. // 
  78. this._lineFeedLabel.Location = new System.Drawing.Point(8, 16);
  79. this._lineFeedLabel.Name = "_lineFeedLabel";
  80. this._lineFeedLabel.TabIndex = 0;
  81. this._lineFeedLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  82. // 
  83. // _lineFeedBox
  84. // 
  85. this._lineFeedBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  86. this._lineFeedBox.Location = new System.Drawing.Point(96, 16);
  87. this._lineFeedBox.Name = "_lineFeedBox";
  88. this._lineFeedBox.Size = new System.Drawing.Size(152, 20);
  89. this._lineFeedBox.TabIndex = 1;
  90. this._lineFeedBox.Text = "comboBox1";
  91. // 
  92. // _okButton
  93. // 
  94. this._okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
  95. this._okButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
  96. this._okButton.Location = new System.Drawing.Point(80, 48);
  97. this._okButton.Name = "_okButton";
  98. this._okButton.TabIndex = 2;
  99. // 
  100. // _cancelButton
  101. // 
  102. this._cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  103. this._cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
  104. this._cancelButton.Location = new System.Drawing.Point(168, 48);
  105. this._cancelButton.Name = "_cancelButton";
  106. this._cancelButton.TabIndex = 3;
  107. // 
  108. // LineFeedStyleDialog
  109. // 
  110. this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
  111. this.ClientSize = new System.Drawing.Size(256, 78);
  112. this.Controls.Add(this._cancelButton);
  113. this.Controls.Add(this._okButton);
  114. this.Controls.Add(this._lineFeedBox);
  115. this.Controls.Add(this._lineFeedLabel);
  116. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  117. this.MaximizeBox = false;
  118. this.MinimizeBox = false;
  119. this.Name = "LineFeedStyleDialog";
  120. this.ShowInTaskbar = false;
  121. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  122. this.AcceptButton = _okButton;
  123. this.CancelButton = _cancelButton;
  124. this.ResumeLayout(false);
  125. }
  126. #endregion
  127. }
  128. }