GrainBinaryEditingDialog.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace PaintDotNet.DedicatedAnalysis.GrainSize.GBT6394_2017
  11. {
  12. public partial class GrainBinaryEditingDialog : Form
  13. {
  14. private GroupBox groupBox1;
  15. private GroupBox groupBox2;
  16. private GroupBox groupBox3;
  17. private GroupBox groupBox4;
  18. private Button button2;
  19. private Button button1;
  20. private Button button3;
  21. private Button button4;
  22. private TextBox textBox1;
  23. private Label label1;
  24. private CustomControl.TriangleTrackBar trackBar2;
  25. private Button button8;
  26. private Button button7;
  27. private Button button6;
  28. private Button button5;
  29. private Panel panel1;
  30. private RadioButton radioButton4;
  31. private RadioButton radioButton3;
  32. private RadioButton radioButton2;
  33. private RadioButton radioButton1;
  34. private Label label2;
  35. private Label label3;
  36. private Label label4;
  37. private Panel panel2;
  38. private RadioButton radioButton6;
  39. private RadioButton radioButton5;
  40. private CustomControl.TriangleTrackBar triangleTrackBar1;
  41. private GroupBox groupBox5;
  42. public GrainBinaryEditingDialog()
  43. {
  44. InitializeComponent();
  45. }
  46. private void InitializeComponent()
  47. {
  48. this.groupBox1 = new System.Windows.Forms.GroupBox();
  49. this.button2 = new System.Windows.Forms.Button();
  50. this.button1 = new System.Windows.Forms.Button();
  51. this.groupBox2 = new System.Windows.Forms.GroupBox();
  52. this.trackBar2 = new PaintDotNet.CustomControl.TriangleTrackBar();
  53. this.textBox1 = new System.Windows.Forms.TextBox();
  54. this.label1 = new System.Windows.Forms.Label();
  55. this.button4 = new System.Windows.Forms.Button();
  56. this.button3 = new System.Windows.Forms.Button();
  57. this.groupBox3 = new System.Windows.Forms.GroupBox();
  58. this.button8 = new System.Windows.Forms.Button();
  59. this.button7 = new System.Windows.Forms.Button();
  60. this.button6 = new System.Windows.Forms.Button();
  61. this.button5 = new System.Windows.Forms.Button();
  62. this.groupBox4 = new System.Windows.Forms.GroupBox();
  63. this.panel2 = new System.Windows.Forms.Panel();
  64. this.radioButton6 = new System.Windows.Forms.RadioButton();
  65. this.radioButton5 = new System.Windows.Forms.RadioButton();
  66. this.triangleTrackBar1 = new PaintDotNet.CustomControl.TriangleTrackBar();
  67. this.label4 = new System.Windows.Forms.Label();
  68. this.label3 = new System.Windows.Forms.Label();
  69. this.panel1 = new System.Windows.Forms.Panel();
  70. this.radioButton4 = new System.Windows.Forms.RadioButton();
  71. this.radioButton3 = new System.Windows.Forms.RadioButton();
  72. this.radioButton2 = new System.Windows.Forms.RadioButton();
  73. this.radioButton1 = new System.Windows.Forms.RadioButton();
  74. this.label2 = new System.Windows.Forms.Label();
  75. this.groupBox5 = new System.Windows.Forms.GroupBox();
  76. this.groupBox1.SuspendLayout();
  77. this.groupBox2.SuspendLayout();
  78. this.groupBox3.SuspendLayout();
  79. this.groupBox4.SuspendLayout();
  80. this.panel2.SuspendLayout();
  81. this.panel1.SuspendLayout();
  82. this.SuspendLayout();
  83. //
  84. // groupBox1
  85. //
  86. this.groupBox1.Controls.Add(this.button2);
  87. this.groupBox1.Controls.Add(this.button1);
  88. this.groupBox1.Location = new System.Drawing.Point(12, 12);
  89. this.groupBox1.Name = "groupBox1";
  90. this.groupBox1.Size = new System.Drawing.Size(808, 45);
  91. this.groupBox1.TabIndex = 0;
  92. this.groupBox1.TabStop = false;
  93. this.groupBox1.Text = "操作";
  94. //
  95. // button2
  96. //
  97. this.button2.Location = new System.Drawing.Point(694, 13);
  98. this.button2.Name = "button2";
  99. this.button2.Size = new System.Drawing.Size(91, 26);
  100. this.button2.TabIndex = 1;
  101. this.button2.Text = "关闭";
  102. this.button2.UseVisualStyleBackColor = true;
  103. this.button2.Click += new System.EventHandler(this.button2_Click);
  104. //
  105. // button1
  106. //
  107. this.button1.Location = new System.Drawing.Point(582, 13);
  108. this.button1.Name = "button1";
  109. this.button1.Size = new System.Drawing.Size(91, 26);
  110. this.button1.TabIndex = 0;
  111. this.button1.Text = "确定";
  112. this.button1.UseVisualStyleBackColor = true;
  113. //
  114. // groupBox2
  115. //
  116. this.groupBox2.Controls.Add(this.trackBar2);
  117. this.groupBox2.Controls.Add(this.textBox1);
  118. this.groupBox2.Controls.Add(this.label1);
  119. this.groupBox2.Controls.Add(this.button4);
  120. this.groupBox2.Controls.Add(this.button3);
  121. this.groupBox2.Location = new System.Drawing.Point(12, 63);
  122. this.groupBox2.Name = "groupBox2";
  123. this.groupBox2.Size = new System.Drawing.Size(233, 106);
  124. this.groupBox2.TabIndex = 1;
  125. this.groupBox2.TabStop = false;
  126. this.groupBox2.Text = "添加晶界";
  127. //
  128. // trackBar2
  129. //
  130. this.trackBar2.Location = new System.Drawing.Point(106, 69);
  131. this.trackBar2.Maximum = 10000;
  132. this.trackBar2.Minimum = 0;
  133. this.trackBar2.Name = "trackBar2";
  134. this.trackBar2.Size = new System.Drawing.Size(102, 24);
  135. this.trackBar2.TabIndex = 17;
  136. this.trackBar2.Value = 0;
  137. //
  138. // textBox1
  139. //
  140. this.textBox1.Location = new System.Drawing.Point(66, 69);
  141. this.textBox1.Name = "textBox1";
  142. this.textBox1.Size = new System.Drawing.Size(32, 21);
  143. this.textBox1.TabIndex = 5;
  144. //
  145. // label1
  146. //
  147. this.label1.AutoSize = true;
  148. this.label1.Location = new System.Drawing.Point(26, 73);
  149. this.label1.Name = "label1";
  150. this.label1.Size = new System.Drawing.Size(41, 12);
  151. this.label1.TabIndex = 4;
  152. this.label1.Text = "线宽:";
  153. //
  154. // button4
  155. //
  156. this.button4.Location = new System.Drawing.Point(135, 18);
  157. this.button4.Name = "button4";
  158. this.button4.Size = new System.Drawing.Size(73, 26);
  159. this.button4.TabIndex = 3;
  160. this.button4.Text = "直线添加";
  161. this.button4.UseVisualStyleBackColor = true;
  162. //
  163. // button3
  164. //
  165. this.button3.Location = new System.Drawing.Point(28, 18);
  166. this.button3.Name = "button3";
  167. this.button3.Size = new System.Drawing.Size(73, 26);
  168. this.button3.TabIndex = 2;
  169. this.button3.Text = "曲线添加";
  170. this.button3.UseVisualStyleBackColor = true;
  171. //
  172. // groupBox3
  173. //
  174. this.groupBox3.Controls.Add(this.button8);
  175. this.groupBox3.Controls.Add(this.button7);
  176. this.groupBox3.Controls.Add(this.button6);
  177. this.groupBox3.Controls.Add(this.button5);
  178. this.groupBox3.Location = new System.Drawing.Point(12, 175);
  179. this.groupBox3.Name = "groupBox3";
  180. this.groupBox3.Size = new System.Drawing.Size(233, 106);
  181. this.groupBox3.TabIndex = 1;
  182. this.groupBox3.TabStop = false;
  183. this.groupBox3.Text = "删除晶界";
  184. //
  185. // button8
  186. //
  187. this.button8.Location = new System.Drawing.Point(135, 68);
  188. this.button8.Name = "button8";
  189. this.button8.Size = new System.Drawing.Size(73, 26);
  190. this.button8.TabIndex = 7;
  191. this.button8.Text = "椭圆删除";
  192. this.button8.UseVisualStyleBackColor = true;
  193. //
  194. // button7
  195. //
  196. this.button7.Location = new System.Drawing.Point(28, 68);
  197. this.button7.Name = "button7";
  198. this.button7.Size = new System.Drawing.Size(73, 26);
  199. this.button7.TabIndex = 6;
  200. this.button7.Text = "矩形删除";
  201. this.button7.UseVisualStyleBackColor = true;
  202. //
  203. // button6
  204. //
  205. this.button6.Location = new System.Drawing.Point(135, 24);
  206. this.button6.Name = "button6";
  207. this.button6.Size = new System.Drawing.Size(73, 26);
  208. this.button6.TabIndex = 5;
  209. this.button6.Text = "圆形删除";
  210. this.button6.UseVisualStyleBackColor = true;
  211. //
  212. // button5
  213. //
  214. this.button5.Location = new System.Drawing.Point(28, 24);
  215. this.button5.Name = "button5";
  216. this.button5.Size = new System.Drawing.Size(73, 26);
  217. this.button5.TabIndex = 4;
  218. this.button5.Text = "多边形删除";
  219. this.button5.UseVisualStyleBackColor = true;
  220. //
  221. // groupBox4
  222. //
  223. this.groupBox4.Controls.Add(this.panel2);
  224. this.groupBox4.Controls.Add(this.triangleTrackBar1);
  225. this.groupBox4.Controls.Add(this.label4);
  226. this.groupBox4.Controls.Add(this.label3);
  227. this.groupBox4.Controls.Add(this.panel1);
  228. this.groupBox4.Controls.Add(this.label2);
  229. this.groupBox4.Location = new System.Drawing.Point(12, 287);
  230. this.groupBox4.Name = "groupBox4";
  231. this.groupBox4.Size = new System.Drawing.Size(233, 278);
  232. this.groupBox4.TabIndex = 1;
  233. this.groupBox4.TabStop = false;
  234. this.groupBox4.Text = "颗粒筛选";
  235. //
  236. // panel2
  237. //
  238. this.panel2.Controls.Add(this.radioButton6);
  239. this.panel2.Controls.Add(this.radioButton5);
  240. this.panel2.Location = new System.Drawing.Point(66, 201);
  241. this.panel2.Name = "panel2";
  242. this.panel2.Size = new System.Drawing.Size(127, 30);
  243. this.panel2.TabIndex = 19;
  244. //
  245. // radioButton6
  246. //
  247. this.radioButton6.AutoSize = true;
  248. this.radioButton6.Location = new System.Drawing.Point(60, 7);
  249. this.radioButton6.Name = "radioButton6";
  250. this.radioButton6.Size = new System.Drawing.Size(47, 16);
  251. this.radioButton6.TabIndex = 2;
  252. this.radioButton6.TabStop = true;
  253. this.radioButton6.Text = "像素";
  254. this.radioButton6.UseVisualStyleBackColor = true;
  255. //
  256. // radioButton5
  257. //
  258. this.radioButton5.AutoSize = true;
  259. this.radioButton5.Location = new System.Drawing.Point(7, 7);
  260. this.radioButton5.Name = "radioButton5";
  261. this.radioButton5.Size = new System.Drawing.Size(47, 16);
  262. this.radioButton5.TabIndex = 1;
  263. this.radioButton5.TabStop = true;
  264. this.radioButton5.Text = "微米";
  265. this.radioButton5.UseVisualStyleBackColor = true;
  266. //
  267. // triangleTrackBar1
  268. //
  269. this.triangleTrackBar1.Location = new System.Drawing.Point(66, 164);
  270. this.triangleTrackBar1.Maximum = 10000;
  271. this.triangleTrackBar1.Minimum = 0;
  272. this.triangleTrackBar1.Name = "triangleTrackBar1";
  273. this.triangleTrackBar1.Size = new System.Drawing.Size(102, 24);
  274. this.triangleTrackBar1.TabIndex = 18;
  275. this.triangleTrackBar1.Value = 0;
  276. //
  277. // label4
  278. //
  279. this.label4.AutoSize = true;
  280. this.label4.Location = new System.Drawing.Point(9, 208);
  281. this.label4.Name = "label4";
  282. this.label4.Size = new System.Drawing.Size(65, 12);
  283. this.label4.TabIndex = 3;
  284. this.label4.Text = "筛选单位:";
  285. //
  286. // label3
  287. //
  288. this.label3.AutoSize = true;
  289. this.label3.Location = new System.Drawing.Point(33, 168);
  290. this.label3.Name = "label3";
  291. this.label3.Size = new System.Drawing.Size(41, 12);
  292. this.label3.TabIndex = 2;
  293. this.label3.Text = "范围:";
  294. //
  295. // panel1
  296. //
  297. this.panel1.Controls.Add(this.radioButton4);
  298. this.panel1.Controls.Add(this.radioButton3);
  299. this.panel1.Controls.Add(this.radioButton2);
  300. this.panel1.Controls.Add(this.radioButton1);
  301. this.panel1.Location = new System.Drawing.Point(66, 28);
  302. this.panel1.Name = "panel1";
  303. this.panel1.Size = new System.Drawing.Size(121, 122);
  304. this.panel1.TabIndex = 1;
  305. //
  306. // radioButton4
  307. //
  308. this.radioButton4.AutoSize = true;
  309. this.radioButton4.Location = new System.Drawing.Point(13, 97);
  310. this.radioButton4.Name = "radioButton4";
  311. this.radioButton4.Size = new System.Drawing.Size(59, 16);
  312. this.radioButton4.TabIndex = 3;
  313. this.radioButton4.TabStop = true;
  314. this.radioButton4.Text = "宽高比";
  315. this.radioButton4.UseVisualStyleBackColor = true;
  316. //
  317. // radioButton3
  318. //
  319. this.radioButton3.AutoSize = true;
  320. this.radioButton3.Location = new System.Drawing.Point(13, 67);
  321. this.radioButton3.Name = "radioButton3";
  322. this.radioButton3.Size = new System.Drawing.Size(95, 16);
  323. this.radioButton3.TabIndex = 2;
  324. this.radioButton3.TabStop = true;
  325. this.radioButton3.Text = "最大卡规直径";
  326. this.radioButton3.UseVisualStyleBackColor = true;
  327. //
  328. // radioButton2
  329. //
  330. this.radioButton2.AutoSize = true;
  331. this.radioButton2.Location = new System.Drawing.Point(13, 37);
  332. this.radioButton2.Name = "radioButton2";
  333. this.radioButton2.Size = new System.Drawing.Size(59, 16);
  334. this.radioButton2.TabIndex = 1;
  335. this.radioButton2.TabStop = true;
  336. this.radioButton2.Text = "面积比";
  337. this.radioButton2.UseVisualStyleBackColor = true;
  338. //
  339. // radioButton1
  340. //
  341. this.radioButton1.AutoSize = true;
  342. this.radioButton1.Location = new System.Drawing.Point(13, 7);
  343. this.radioButton1.Name = "radioButton1";
  344. this.radioButton1.Size = new System.Drawing.Size(47, 16);
  345. this.radioButton1.TabIndex = 0;
  346. this.radioButton1.TabStop = true;
  347. this.radioButton1.Text = "面积";
  348. this.radioButton1.UseVisualStyleBackColor = true;
  349. //
  350. // label2
  351. //
  352. this.label2.AutoSize = true;
  353. this.label2.Location = new System.Drawing.Point(9, 35);
  354. this.label2.Name = "label2";
  355. this.label2.Size = new System.Drawing.Size(65, 12);
  356. this.label2.TabIndex = 0;
  357. this.label2.Text = "筛选参数:";
  358. //
  359. // groupBox5
  360. //
  361. this.groupBox5.Location = new System.Drawing.Point(251, 63);
  362. this.groupBox5.Name = "groupBox5";
  363. this.groupBox5.Size = new System.Drawing.Size(569, 502);
  364. this.groupBox5.TabIndex = 1;
  365. this.groupBox5.TabStop = false;
  366. this.groupBox5.Text = "预览";
  367. //
  368. // GrainBinaryEditingDialog
  369. //
  370. this.ClientSize = new System.Drawing.Size(832, 577);
  371. this.Controls.Add(this.groupBox2);
  372. this.Controls.Add(this.groupBox3);
  373. this.Controls.Add(this.groupBox4);
  374. this.Controls.Add(this.groupBox5);
  375. this.Controls.Add(this.groupBox1);
  376. this.Name = "GrainBinaryEditingDialog";
  377. this.Text = "筛选";
  378. this.groupBox1.ResumeLayout(false);
  379. this.groupBox2.ResumeLayout(false);
  380. this.groupBox2.PerformLayout();
  381. this.groupBox3.ResumeLayout(false);
  382. this.groupBox4.ResumeLayout(false);
  383. this.groupBox4.PerformLayout();
  384. this.panel2.ResumeLayout(false);
  385. this.panel2.PerformLayout();
  386. this.panel1.ResumeLayout(false);
  387. this.panel1.PerformLayout();
  388. this.ResumeLayout(false);
  389. }
  390. private void button2_Click(object sender, EventArgs e)
  391. {
  392. this.Close();
  393. }
  394. }
  395. }