frmMarkError.cs
上传用户:zili2008
上传日期:2020-12-03
资源大小:477k
文件大小:6k
源码类别:

编辑框

开发平台:

Visual Basic

  1. /// Demo form for marking errors (Scenarios found in transcription - quality check applications)
  2. using System;
  3. using System.Drawing;
  4. using System.Collections;
  5. using System.ComponentModel;
  6. using System.Windows.Forms;
  7. namespace WordInDOTNET
  8. {
  9. /// <summary>
  10. /// Summary description for frmMarkError.
  11. /// </summary>
  12. public class frmMarkError : System.Windows.Forms.Form
  13. {
  14. private System.Windows.Forms.GroupBox grpErrorWeight;
  15. private System.Windows.Forms.RadioButton rbMinor;
  16. private System.Windows.Forms.RadioButton rbMajor;
  17. private System.Windows.Forms.RadioButton rbCritical;
  18. private System.Windows.Forms.Button btnOK;
  19. private System.Windows.Forms.Button btnCancel;
  20. public System.Windows.Forms.TextBox txtChanged;
  21. public System.Windows.Forms.TextBox txtOriginal;
  22. /// <summary>
  23. /// Required designer variable.
  24. /// </summary>
  25. private System.ComponentModel.Container components = null;
  26. public frmMarkError()
  27. {
  28. //
  29. // Required for Windows Form Designer support
  30. //
  31. InitializeComponent();
  32. //
  33. // TODO: Add any constructor code after InitializeComponent call
  34. //
  35. }
  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. #region Windows Form Designer generated code
  51. /// <summary>
  52. /// Required method for Designer support - do not modify
  53. /// the contents of this method with the code editor.
  54. /// </summary>
  55. private void InitializeComponent()
  56. {
  57. this.txtChanged = new System.Windows.Forms.TextBox();
  58. this.txtOriginal = new System.Windows.Forms.TextBox();
  59. this.grpErrorWeight = new System.Windows.Forms.GroupBox();
  60. this.rbCritical = new System.Windows.Forms.RadioButton();
  61. this.rbMajor = new System.Windows.Forms.RadioButton();
  62. this.rbMinor = new System.Windows.Forms.RadioButton();
  63. this.btnOK = new System.Windows.Forms.Button();
  64. this.btnCancel = new System.Windows.Forms.Button();
  65. this.grpErrorWeight.SuspendLayout();
  66. this.SuspendLayout();
  67. // 
  68. // txtChanged
  69. // 
  70. this.txtChanged.Location = new System.Drawing.Point(8, 88);
  71. this.txtChanged.Multiline = true;
  72. this.txtChanged.Name = "txtChanged";
  73. this.txtChanged.Size = new System.Drawing.Size(264, 56);
  74. this.txtChanged.TabIndex = 0;
  75. this.txtChanged.Text = "";
  76. // 
  77. // txtOriginal
  78. // 
  79. this.txtOriginal.Location = new System.Drawing.Point(8, 8);
  80. this.txtOriginal.Multiline = true;
  81. this.txtOriginal.Name = "txtOriginal";
  82. this.txtOriginal.ReadOnly = true;
  83. this.txtOriginal.Size = new System.Drawing.Size(264, 64);
  84. this.txtOriginal.TabIndex = 1;
  85. this.txtOriginal.Text = "";
  86. // 
  87. // grpErrorWeight
  88. // 
  89. this.grpErrorWeight.Controls.Add(this.rbCritical);
  90. this.grpErrorWeight.Controls.Add(this.rbMajor);
  91. this.grpErrorWeight.Controls.Add(this.rbMinor);
  92. this.grpErrorWeight.Location = new System.Drawing.Point(288, 8);
  93. this.grpErrorWeight.Name = "grpErrorWeight";
  94. this.grpErrorWeight.Size = new System.Drawing.Size(120, 112);
  95. this.grpErrorWeight.TabIndex = 2;
  96. this.grpErrorWeight.TabStop = false;
  97. this.grpErrorWeight.Text = "Error Weight";
  98. // 
  99. // rbCritical
  100. // 
  101. this.rbCritical.Location = new System.Drawing.Point(8, 80);
  102. this.rbCritical.Name = "rbCritical";
  103. this.rbCritical.TabIndex = 2;
  104. this.rbCritical.Text = "Critical";
  105. // 
  106. // rbMajor
  107. // 
  108. this.rbMajor.Location = new System.Drawing.Point(8, 48);
  109. this.rbMajor.Name = "rbMajor";
  110. this.rbMajor.TabIndex = 1;
  111. this.rbMajor.Text = "Major";
  112. // 
  113. // rbMinor
  114. // 
  115. this.rbMinor.Checked = true;
  116. this.rbMinor.Location = new System.Drawing.Point(8, 16);
  117. this.rbMinor.Name = "rbMinor";
  118. this.rbMinor.TabIndex = 0;
  119. this.rbMinor.TabStop = true;
  120. this.rbMinor.Text = "Minor";
  121. // 
  122. // btnOK
  123. // 
  124. this.btnOK.Location = new System.Drawing.Point(72, 160);
  125. this.btnOK.Name = "btnOK";
  126. this.btnOK.TabIndex = 3;
  127. this.btnOK.Text = "OK";
  128. this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
  129. // 
  130. // btnCancel
  131. // 
  132. this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  133. this.btnCancel.Location = new System.Drawing.Point(240, 160);
  134. this.btnCancel.Name = "btnCancel";
  135. this.btnCancel.TabIndex = 4;
  136. this.btnCancel.Text = "Cancel";
  137. this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
  138. // 
  139. // frmMarkError
  140. // 
  141. this.AcceptButton = this.btnOK;
  142. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  143. this.CancelButton = this.btnCancel;
  144. this.ClientSize = new System.Drawing.Size(424, 205);
  145. this.Controls.Add(this.btnCancel);
  146. this.Controls.Add(this.btnOK);
  147. this.Controls.Add(this.grpErrorWeight);
  148. this.Controls.Add(this.txtOriginal);
  149. this.Controls.Add(this.txtChanged);
  150. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
  151. this.Name = "frmMarkError";
  152. this.Text = "frmMarkError";
  153. this.Load += new System.EventHandler(this.frmMarkError_Load);
  154. this.grpErrorWeight.ResumeLayout(false);
  155. this.ResumeLayout(false);
  156. }
  157. #endregion
  158. private void btnOK_Click(object sender, System.EventArgs e)
  159. {
  160. this.DialogResult = DialogResult.OK;
  161. }
  162. private void frmMarkError_Load(object sender, System.EventArgs e)
  163. {
  164. }
  165. private void btnCancel_Click(object sender, System.EventArgs e)
  166. {
  167. this.DialogResult = DialogResult.Cancel;
  168. }
  169. }
  170. }