wfrm_EditUndeliveredText.cs
上传用户:horngjaan
上传日期:2009-12-12
资源大小:2882k
文件大小:6k
源码类别:

Email服务器

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace LumiSoft.MailServer
  7. {
  8. /// <summary>
  9. /// Summary description for wfrm_EditUndeliveredText.
  10. /// </summary>
  11. public class wfrm_EditUndeliveredText : System.Windows.Forms.Form
  12. {
  13. private LumiSoft.UI.Controls.WButton m_pOk;
  14. private LumiSoft.UI.Controls.WEditBox m_pText;
  15. private LumiSoft.UI.Controls.WButton m_pCancel;
  16. /// <summary>
  17. /// Required designer variable.
  18. /// </summary>
  19. private System.ComponentModel.Container components = null;
  20. /// <summary>
  21. /// Default constructor.
  22. /// </summary>
  23. /// <param name="template">Template text.</param>
  24. public wfrm_EditUndeliveredText(string template)
  25. {
  26. //
  27. // Required for Windows Form Designer support
  28. //
  29. InitializeComponent();
  30. //
  31. // TODO: Add any constructor code after InitializeComponent call
  32. //
  33. m_pText.Text = template;
  34. }
  35. #region function Dispose
  36. /// <summary>
  37. /// Clean up any resources being used.
  38. /// </summary>
  39. protected override void Dispose( bool disposing )
  40. {
  41. if( disposing )
  42. {
  43. if(components != null)
  44. {
  45. components.Dispose();
  46. }
  47. }
  48. base.Dispose( disposing );
  49. }
  50. #endregion
  51. #region Windows Form Designer generated code
  52. /// <summary>
  53. /// Required method for Designer support - do not modify
  54. /// the contents of this method with the code editor.
  55. /// </summary>
  56. private void InitializeComponent()
  57. {
  58. this.m_pText = new LumiSoft.UI.Controls.WEditBox();
  59. this.m_pOk = new LumiSoft.UI.Controls.WButton();
  60. this.m_pCancel = new LumiSoft.UI.Controls.WButton();
  61. ((System.ComponentModel.ISupportInitialize)(this.m_pText)).BeginInit();
  62. ((System.ComponentModel.ISupportInitialize)(this.m_pOk)).BeginInit();
  63. ((System.ComponentModel.ISupportInitialize)(this.m_pCancel)).BeginInit();
  64. this.SuspendLayout();
  65. // 
  66. // m_pText
  67. // 
  68. this.m_pText.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
  69. | System.Windows.Forms.AnchorStyles.Left) 
  70. | System.Windows.Forms.AnchorStyles.Right);
  71. this.m_pText.DecimalPlaces = 2;
  72. this.m_pText.DecMaxValue = new System.Decimal(new int[] {
  73. 999999999,
  74. 0,
  75. 0,
  76. 0});
  77. this.m_pText.DecMinValue = new System.Decimal(new int[] {
  78. 999999999,
  79. 0,
  80. 0,
  81. -2147483648});
  82. this.m_pText.Lines = new string[0];
  83. this.m_pText.Mask = LumiSoft.UI.Controls.WEditBox_Mask.Text;
  84. this.m_pText.MaxLength = 32767;
  85. this.m_pText.Multiline = true;
  86. this.m_pText.Name = "m_pText";
  87. this.m_pText.PasswordChar = '';
  88. this.m_pText.ReadOnly = false;
  89. this.m_pText.ScrollBars = System.Windows.Forms.ScrollBars.None;
  90. this.m_pText.Size = new System.Drawing.Size(450, 240);
  91. this.m_pText.TabIndex = 0;
  92. this.m_pText.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
  93. this.m_pText.UseStaticViewStyle = true;
  94. // 
  95. // m_pOk
  96. // 
  97. this.m_pOk.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
  98. this.m_pOk.Location = new System.Drawing.Point(290, 250);
  99. this.m_pOk.Name = "m_pOk";
  100. this.m_pOk.Size = new System.Drawing.Size(72, 24);
  101. this.m_pOk.TabIndex = 1;
  102. this.m_pOk.Text = "OK";
  103. this.m_pOk.UseStaticViewStyle = true;
  104. this.m_pOk.ButtonPressed += new LumiSoft.UI.Controls.ButtonPressedEventHandler(this.m_pOk_ButtonPressed);
  105. // 
  106. // m_pCancel
  107. // 
  108. this.m_pCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
  109. this.m_pCancel.Location = new System.Drawing.Point(370, 250);
  110. this.m_pCancel.Name = "m_pCancel";
  111. this.m_pCancel.Size = new System.Drawing.Size(72, 24);
  112. this.m_pCancel.TabIndex = 2;
  113. this.m_pCancel.Text = "Cancel";
  114. this.m_pCancel.UseStaticViewStyle = true;
  115. this.m_pCancel.ButtonPressed += new LumiSoft.UI.Controls.ButtonPressedEventHandler(this.m_pCancel_ButtonPressed);
  116. // 
  117. // wfrm_EditUndeliveredText
  118. // 
  119. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  120. this.ClientSize = new System.Drawing.Size(450, 279);
  121. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  122.   this.m_pCancel,
  123.   this.m_pOk,
  124.   this.m_pText});
  125. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  126. this.MaximizeBox = false;
  127. this.MinimizeBox = false;
  128. this.Name = "wfrm_EditUndeliveredText";
  129. this.ShowInTaskbar = false;
  130. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  131. this.Text = "Edit template";
  132. ((System.ComponentModel.ISupportInitialize)(this.m_pText)).EndInit();
  133. ((System.ComponentModel.ISupportInitialize)(this.m_pOk)).EndInit();
  134. ((System.ComponentModel.ISupportInitialize)(this.m_pCancel)).EndInit();
  135. this.ResumeLayout(false);
  136. }
  137. #endregion
  138. #region Events handling
  139. private void m_pOk_ButtonPressed(object sender, System.EventArgs e)
  140. {
  141. this.DialogResult = DialogResult.OK;
  142. this.Close();
  143. }
  144. private void m_pCancel_ButtonPressed(object sender, System.EventArgs e)
  145. {
  146. this.DialogResult = DialogResult.Cancel;
  147. this.Close();
  148. }
  149. #endregion
  150. #region Properties Implementation
  151. /// <summary>
  152. /// 
  153. /// </summary>
  154. public string wp_Template
  155. {
  156. get{ return m_pText.Text; }
  157. }
  158. #endregion
  159. }
  160. }