GrainSurveyPointStyleSettingDialog.cs 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. using PaintDotNet.Base.CommTool;
  2. using PaintDotNet.Base.SettingModel;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14. namespace PaintDotNet.DedicatedAnalysis.GrainSizeStandard.IntegrationClass
  15. {
  16. public partial class GrainSurveyPointStyleSettingDialog : Form
  17. {
  18. #region 控件
  19. private GroupBox groupBox1;
  20. private Button button2;
  21. private GroupBox groupBox2;
  22. private Label label6;
  23. private Label label5;
  24. private Label label4;
  25. private Label label3;
  26. private Label label2;
  27. private Label label1;
  28. private Panel panel1;
  29. private RadioButton radioButton1;
  30. private RadioButton radioButton2;
  31. private Panel panel2;
  32. private RadioButton radioButton3;
  33. private RadioButton radioButton4;
  34. private Panel panel3;
  35. private GroupBox groupBox3;
  36. private Panel panel4;
  37. private Panel panel5;
  38. private RadioButton radioButton5;
  39. private RadioButton radioButton6;
  40. private Panel panel6;
  41. private RadioButton radioButton7;
  42. private RadioButton radioButton8;
  43. private Label label7;
  44. private Label label8;
  45. private Label label9;
  46. private Label label10;
  47. private Label label11;
  48. private Label label12;
  49. private GroupBox groupBox4;
  50. private Panel panel7;
  51. private Panel panel8;
  52. private RadioButton radioButton9;
  53. private RadioButton radioButton10;
  54. private Panel panel9;
  55. private RadioButton radioButton11;
  56. private RadioButton radioButton12;
  57. private Label label13;
  58. private Label label14;
  59. private Label label15;
  60. private Label label16;
  61. private Label label17;
  62. private Label label18;
  63. private Button button1;
  64. #endregion
  65. /// <summary>
  66. /// 调色板
  67. /// </summary>
  68. PaintDotNet.ColorsForm colorsForm1;
  69. /// <summary>
  70. /// 调色板
  71. /// </summary>
  72. PaintDotNet.ColorsForm colorsForm2;
  73. private TrackBar trackBar9;
  74. private TrackBar trackBar2;
  75. private TrackBar trackBar1;
  76. private TrackBar trackBar5;
  77. private TrackBar trackBar4;
  78. private TrackBar trackBar3;
  79. private TrackBar trackBar8;
  80. private TrackBar trackBar7;
  81. private TrackBar trackBar6;
  82. private TextBox textBox9;
  83. private TextBox textBox2;
  84. private TextBox textBox1;
  85. private TextBox textBox5;
  86. private TextBox textBox3;
  87. private TextBox textBox4;
  88. private TextBox textBox7;
  89. private TextBox textBox8;
  90. private TextBox textBox6;
  91. /// <summary>
  92. /// 调色板
  93. /// </summary>
  94. PaintDotNet.ColorsForm colorsForm3;
  95. public GrainSurveyPointStyleSettingDialog()
  96. {
  97. InitializeComponent();
  98. InitializeLanguageText();
  99. GetFromXml();
  100. //调色板
  101. this.colorsForm1 = new ColorsForm();
  102. this.colorsForm1.StartPosition = FormStartPosition.CenterScreen;
  103. this.colorsForm1.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  104. //调色板
  105. this.colorsForm2 = new ColorsForm();
  106. this.colorsForm2.StartPosition = FormStartPosition.CenterScreen;
  107. this.colorsForm2.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  108. //调色板
  109. this.colorsForm3 = new ColorsForm();
  110. this.colorsForm3.StartPosition = FormStartPosition.CenterScreen;
  111. this.colorsForm3.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  112. }
  113. #region 初始化
  114. private void InitializeLanguageText()
  115. {
  116. this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
  117. this.button2.Text = PdnResources.GetString("CommonAction.Save");
  118. this.button1.Text = PdnResources.GetString("Menu.File.Close.Text");
  119. this.groupBox2.Text = PdnResources.GetString("Menu.0.5sectionstyle.text");
  120. this.radioButton3.Text = PdnResources.GetString("Menu.Square.text");
  121. this.radioButton4.Text = PdnResources.GetString("Menu.circular.Text");
  122. this.radioButton2.Text = PdnResources.GetString("Menu.solid.text");
  123. this.radioButton1.Text = PdnResources.GetString("Menu.Hollow.text");
  124. this.label6.Text = PdnResources.GetString("Menu.shape.text") + ":";
  125. this.label5.Text = PdnResources.GetString("Menu.style.text") + ":";
  126. this.label4.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
  127. this.label3.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
  128. this.label2.Text = PdnResources.GetString("Menu.size.text") + ":";
  129. this.label1.Text = PdnResources.GetString("Menu.color.text") + ":";
  130. this.groupBox3.Text = PdnResources.GetString("Menu.1sectionstyle.text");
  131. this.radioButton5.Text = PdnResources.GetString("Menu.Square.text");
  132. this.radioButton6.Text = PdnResources.GetString("Menu.circular.Text");
  133. this.radioButton7.Text = PdnResources.GetString("Menu.solid.text");
  134. this.radioButton8.Text = PdnResources.GetString("Menu.Hollow.text");
  135. this.label7.Text = PdnResources.GetString("Menu.shape.text") + ":";
  136. this.label8.Text = PdnResources.GetString("Menu.style.text") + ":";
  137. this.label9.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
  138. this.label10.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
  139. this.label11.Text = PdnResources.GetString("Menu.size.text") + ":";
  140. this.label12.Text = PdnResources.GetString("Menu.color.text") + ":";
  141. this.groupBox4.Text = PdnResources.GetString("Menu.1.5/2sectionstyle.text");
  142. this.radioButton9.Text = PdnResources.GetString("Menu.Square.text");
  143. this.radioButton10.Text = PdnResources.GetString("Menu.circular.Text");
  144. this.radioButton11.Text = PdnResources.GetString("Menu.solid.text");
  145. this.radioButton12.Text = PdnResources.GetString("Menu.Hollow.text");
  146. this.label13.Text = PdnResources.GetString("Menu.shape.text") + ":";
  147. this.label14.Text = PdnResources.GetString("Menu.style.text") + ":";
  148. this.label15.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
  149. this.label16.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
  150. this.label17.Text = PdnResources.GetString("Menu.size.text") + ":";
  151. this.label18.Text = PdnResources.GetString("Menu.color.text") + ":";
  152. this.Text = PdnResources.GetString("Menu.sectionsstylesettings.text");
  153. }
  154. private void InitializeComponent()
  155. {
  156. this.groupBox1 = new System.Windows.Forms.GroupBox();
  157. this.button2 = new System.Windows.Forms.Button();
  158. this.button1 = new System.Windows.Forms.Button();
  159. this.groupBox2 = new System.Windows.Forms.GroupBox();
  160. this.textBox9 = new System.Windows.Forms.TextBox();
  161. this.trackBar9 = new System.Windows.Forms.TrackBar();
  162. this.panel3 = new System.Windows.Forms.Panel();
  163. this.panel2 = new System.Windows.Forms.Panel();
  164. this.radioButton3 = new System.Windows.Forms.RadioButton();
  165. this.radioButton4 = new System.Windows.Forms.RadioButton();
  166. this.panel1 = new System.Windows.Forms.Panel();
  167. this.radioButton2 = new System.Windows.Forms.RadioButton();
  168. this.radioButton1 = new System.Windows.Forms.RadioButton();
  169. this.label6 = new System.Windows.Forms.Label();
  170. this.textBox2 = new System.Windows.Forms.TextBox();
  171. this.label5 = new System.Windows.Forms.Label();
  172. this.trackBar2 = new System.Windows.Forms.TrackBar();
  173. this.label4 = new System.Windows.Forms.Label();
  174. this.textBox1 = new System.Windows.Forms.TextBox();
  175. this.trackBar1 = new System.Windows.Forms.TrackBar();
  176. this.label3 = new System.Windows.Forms.Label();
  177. this.label2 = new System.Windows.Forms.Label();
  178. this.label1 = new System.Windows.Forms.Label();
  179. this.groupBox3 = new System.Windows.Forms.GroupBox();
  180. this.panel4 = new System.Windows.Forms.Panel();
  181. this.panel5 = new System.Windows.Forms.Panel();
  182. this.radioButton5 = new System.Windows.Forms.RadioButton();
  183. this.radioButton6 = new System.Windows.Forms.RadioButton();
  184. this.panel6 = new System.Windows.Forms.Panel();
  185. this.radioButton7 = new System.Windows.Forms.RadioButton();
  186. this.radioButton8 = new System.Windows.Forms.RadioButton();
  187. this.textBox5 = new System.Windows.Forms.TextBox();
  188. this.trackBar5 = new System.Windows.Forms.TrackBar();
  189. this.textBox3 = new System.Windows.Forms.TextBox();
  190. this.textBox4 = new System.Windows.Forms.TextBox();
  191. this.trackBar4 = new System.Windows.Forms.TrackBar();
  192. this.trackBar3 = new System.Windows.Forms.TrackBar();
  193. this.label7 = new System.Windows.Forms.Label();
  194. this.label8 = new System.Windows.Forms.Label();
  195. this.label9 = new System.Windows.Forms.Label();
  196. this.label10 = new System.Windows.Forms.Label();
  197. this.label11 = new System.Windows.Forms.Label();
  198. this.label12 = new System.Windows.Forms.Label();
  199. this.groupBox4 = new System.Windows.Forms.GroupBox();
  200. this.textBox7 = new System.Windows.Forms.TextBox();
  201. this.textBox8 = new System.Windows.Forms.TextBox();
  202. this.textBox6 = new System.Windows.Forms.TextBox();
  203. this.trackBar8 = new System.Windows.Forms.TrackBar();
  204. this.trackBar7 = new System.Windows.Forms.TrackBar();
  205. this.trackBar6 = new System.Windows.Forms.TrackBar();
  206. this.panel7 = new System.Windows.Forms.Panel();
  207. this.panel8 = new System.Windows.Forms.Panel();
  208. this.radioButton9 = new System.Windows.Forms.RadioButton();
  209. this.radioButton10 = new System.Windows.Forms.RadioButton();
  210. this.panel9 = new System.Windows.Forms.Panel();
  211. this.radioButton11 = new System.Windows.Forms.RadioButton();
  212. this.radioButton12 = new System.Windows.Forms.RadioButton();
  213. this.label13 = new System.Windows.Forms.Label();
  214. this.label14 = new System.Windows.Forms.Label();
  215. this.label15 = new System.Windows.Forms.Label();
  216. this.label16 = new System.Windows.Forms.Label();
  217. this.label17 = new System.Windows.Forms.Label();
  218. this.label18 = new System.Windows.Forms.Label();
  219. this.groupBox1.SuspendLayout();
  220. this.groupBox2.SuspendLayout();
  221. ((System.ComponentModel.ISupportInitialize)(this.trackBar9)).BeginInit();
  222. this.panel2.SuspendLayout();
  223. this.panel1.SuspendLayout();
  224. ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
  225. ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
  226. this.groupBox3.SuspendLayout();
  227. this.panel5.SuspendLayout();
  228. this.panel6.SuspendLayout();
  229. ((System.ComponentModel.ISupportInitialize)(this.trackBar5)).BeginInit();
  230. ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).BeginInit();
  231. ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();
  232. this.groupBox4.SuspendLayout();
  233. ((System.ComponentModel.ISupportInitialize)(this.trackBar8)).BeginInit();
  234. ((System.ComponentModel.ISupportInitialize)(this.trackBar7)).BeginInit();
  235. ((System.ComponentModel.ISupportInitialize)(this.trackBar6)).BeginInit();
  236. this.panel8.SuspendLayout();
  237. this.panel9.SuspendLayout();
  238. this.SuspendLayout();
  239. //
  240. // groupBox1
  241. //
  242. this.groupBox1.Controls.Add(this.button2);
  243. this.groupBox1.Controls.Add(this.button1);
  244. this.groupBox1.Location = new System.Drawing.Point(12, 12);
  245. this.groupBox1.Name = "groupBox1";
  246. this.groupBox1.Size = new System.Drawing.Size(500, 54);
  247. this.groupBox1.TabIndex = 2;
  248. this.groupBox1.TabStop = false;
  249. //
  250. // button2
  251. //
  252. this.button2.Location = new System.Drawing.Point(414, 16);
  253. this.button2.Name = "button2";
  254. this.button2.Size = new System.Drawing.Size(70, 28);
  255. this.button2.TabIndex = 1;
  256. this.button2.UseVisualStyleBackColor = true;
  257. this.button2.Click += new System.EventHandler(this.button2_Click);
  258. //
  259. // button1
  260. //
  261. this.button1.Location = new System.Drawing.Point(325, 16);
  262. this.button1.Name = "button1";
  263. this.button1.Size = new System.Drawing.Size(70, 28);
  264. this.button1.TabIndex = 0;
  265. this.button1.UseVisualStyleBackColor = true;
  266. this.button1.Click += new System.EventHandler(this.button1_Click);
  267. //
  268. // groupBox2
  269. //
  270. this.groupBox2.Controls.Add(this.textBox9);
  271. this.groupBox2.Controls.Add(this.trackBar9);
  272. this.groupBox2.Controls.Add(this.panel3);
  273. this.groupBox2.Controls.Add(this.panel2);
  274. this.groupBox2.Controls.Add(this.panel1);
  275. this.groupBox2.Controls.Add(this.label6);
  276. this.groupBox2.Controls.Add(this.textBox2);
  277. this.groupBox2.Controls.Add(this.label5);
  278. this.groupBox2.Controls.Add(this.trackBar2);
  279. this.groupBox2.Controls.Add(this.label4);
  280. this.groupBox2.Controls.Add(this.textBox1);
  281. this.groupBox2.Controls.Add(this.trackBar1);
  282. this.groupBox2.Controls.Add(this.label3);
  283. this.groupBox2.Controls.Add(this.label2);
  284. this.groupBox2.Controls.Add(this.label1);
  285. this.groupBox2.Location = new System.Drawing.Point(12, 72);
  286. this.groupBox2.Name = "groupBox2";
  287. this.groupBox2.Size = new System.Drawing.Size(500, 120);
  288. this.groupBox2.TabIndex = 3;
  289. this.groupBox2.TabStop = false;
  290. //
  291. // textBox9
  292. //
  293. this.textBox9.Location = new System.Drawing.Point(129, 67);
  294. this.textBox9.Name = "textBox9";
  295. this.textBox9.Size = new System.Drawing.Size(31, 21);
  296. this.textBox9.TabIndex = 37;
  297. this.textBox9.Text = "1";
  298. this.textBox9.TextChanged += new System.EventHandler(this.textBox9_TextChanged);
  299. //
  300. // trackBar9
  301. //
  302. this.trackBar9.LargeChange = 1;
  303. this.trackBar9.Location = new System.Drawing.Point(55, 68);
  304. this.trackBar9.Maximum = 50;
  305. this.trackBar9.Minimum = 1;
  306. this.trackBar9.Name = "trackBar9";
  307. this.trackBar9.Size = new System.Drawing.Size(78, 45);
  308. this.trackBar9.TabIndex = 37;
  309. this.trackBar9.TickStyle = System.Windows.Forms.TickStyle.None;
  310. this.trackBar9.Value = 1;
  311. this.trackBar9.ValueChanged += new System.EventHandler(this.trackBar9_ValueChanged);
  312. //
  313. // panel3
  314. //
  315. this.panel3.Location = new System.Drawing.Point(62, 24);
  316. this.panel3.Name = "panel3";
  317. this.panel3.Size = new System.Drawing.Size(102, 22);
  318. this.panel3.TabIndex = 25;
  319. this.panel3.Click += new System.EventHandler(this.panel3_Click);
  320. //
  321. // panel2
  322. //
  323. this.panel2.Controls.Add(this.radioButton3);
  324. this.panel2.Controls.Add(this.radioButton4);
  325. this.panel2.Location = new System.Drawing.Point(368, 64);
  326. this.panel2.Name = "panel2";
  327. this.panel2.Size = new System.Drawing.Size(115, 30);
  328. this.panel2.TabIndex = 24;
  329. //
  330. // radioButton3
  331. //
  332. this.radioButton3.AutoSize = true;
  333. this.radioButton3.Location = new System.Drawing.Point(62, 6);
  334. this.radioButton3.Name = "radioButton3";
  335. this.radioButton3.Size = new System.Drawing.Size(47, 16);
  336. this.radioButton3.TabIndex = 1;
  337. this.radioButton3.TabStop = true;
  338. this.radioButton3.UseVisualStyleBackColor = true;
  339. //
  340. // radioButton4
  341. //
  342. this.radioButton4.AutoSize = true;
  343. this.radioButton4.Location = new System.Drawing.Point(9, 6);
  344. this.radioButton4.Name = "radioButton4";
  345. this.radioButton4.Size = new System.Drawing.Size(47, 16);
  346. this.radioButton4.TabIndex = 0;
  347. this.radioButton4.TabStop = true;
  348. this.radioButton4.UseVisualStyleBackColor = true;
  349. //
  350. // panel1
  351. //
  352. this.panel1.Controls.Add(this.radioButton2);
  353. this.panel1.Controls.Add(this.radioButton1);
  354. this.panel1.Location = new System.Drawing.Point(368, 20);
  355. this.panel1.Name = "panel1";
  356. this.panel1.Size = new System.Drawing.Size(115, 30);
  357. this.panel1.TabIndex = 23;
  358. //
  359. // radioButton2
  360. //
  361. this.radioButton2.AutoSize = true;
  362. this.radioButton2.Location = new System.Drawing.Point(62, 6);
  363. this.radioButton2.Name = "radioButton2";
  364. this.radioButton2.Size = new System.Drawing.Size(47, 16);
  365. this.radioButton2.TabIndex = 1;
  366. this.radioButton2.TabStop = true;
  367. this.radioButton2.UseVisualStyleBackColor = true;
  368. //
  369. // radioButton1
  370. //
  371. this.radioButton1.AutoSize = true;
  372. this.radioButton1.Location = new System.Drawing.Point(9, 6);
  373. this.radioButton1.Name = "radioButton1";
  374. this.radioButton1.Size = new System.Drawing.Size(47, 16);
  375. this.radioButton1.TabIndex = 0;
  376. this.radioButton1.TabStop = true;
  377. this.radioButton1.UseVisualStyleBackColor = true;
  378. //
  379. // label6
  380. //
  381. this.label6.AutoSize = true;
  382. this.label6.Location = new System.Drawing.Point(332, 71);
  383. this.label6.Name = "label6";
  384. this.label6.Size = new System.Drawing.Size(41, 12);
  385. this.label6.TabIndex = 22;
  386. //
  387. // textBox2
  388. //
  389. this.textBox2.Location = new System.Drawing.Point(299, 68);
  390. this.textBox2.Name = "textBox2";
  391. this.textBox2.Size = new System.Drawing.Size(31, 21);
  392. this.textBox2.TabIndex = 30;
  393. this.textBox2.Text = "1";
  394. this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
  395. //
  396. // label5
  397. //
  398. this.label5.AutoSize = true;
  399. this.label5.Location = new System.Drawing.Point(332, 28);
  400. this.label5.Name = "label5";
  401. this.label5.Size = new System.Drawing.Size(41, 12);
  402. this.label5.TabIndex = 21;
  403. //
  404. // trackBar2
  405. //
  406. this.trackBar2.LargeChange = 1;
  407. this.trackBar2.Location = new System.Drawing.Point(225, 68);
  408. this.trackBar2.Maximum = 50;
  409. this.trackBar2.Minimum = 1;
  410. this.trackBar2.Name = "trackBar2";
  411. this.trackBar2.Size = new System.Drawing.Size(78, 45);
  412. this.trackBar2.TabIndex = 30;
  413. this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
  414. this.trackBar2.Value = 1;
  415. this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged);
  416. //
  417. // label4
  418. //
  419. this.label4.AutoSize = true;
  420. this.label4.Location = new System.Drawing.Point(170, 71);
  421. this.label4.Name = "label4";
  422. this.label4.Size = new System.Drawing.Size(65, 12);
  423. this.label4.TabIndex = 20;
  424. //
  425. // textBox1
  426. //
  427. this.textBox1.Location = new System.Drawing.Point(299, 24);
  428. this.textBox1.Name = "textBox1";
  429. this.textBox1.Size = new System.Drawing.Size(31, 21);
  430. this.textBox1.TabIndex = 29;
  431. this.textBox1.Text = "1";
  432. this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
  433. //
  434. // trackBar1
  435. //
  436. this.trackBar1.LargeChange = 1;
  437. this.trackBar1.Location = new System.Drawing.Point(225, 24);
  438. this.trackBar1.Maximum = 50;
  439. this.trackBar1.Minimum = 1;
  440. this.trackBar1.Name = "trackBar1";
  441. this.trackBar1.Size = new System.Drawing.Size(78, 45);
  442. this.trackBar1.TabIndex = 29;
  443. this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
  444. this.trackBar1.Value = 1;
  445. this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
  446. //
  447. // label3
  448. //
  449. this.label3.AutoSize = true;
  450. this.label3.Location = new System.Drawing.Point(194, 28);
  451. this.label3.Name = "label3";
  452. this.label3.Size = new System.Drawing.Size(41, 12);
  453. this.label3.TabIndex = 19;
  454. //
  455. // label2
  456. //
  457. this.label2.AutoSize = true;
  458. this.label2.Location = new System.Drawing.Point(23, 71);
  459. this.label2.Name = "label2";
  460. this.label2.Size = new System.Drawing.Size(41, 12);
  461. this.label2.TabIndex = 18;
  462. //
  463. // label1
  464. //
  465. this.label1.AutoSize = true;
  466. this.label1.Location = new System.Drawing.Point(23, 28);
  467. this.label1.Name = "label1";
  468. this.label1.Size = new System.Drawing.Size(41, 12);
  469. this.label1.TabIndex = 17;
  470. //
  471. // groupBox3
  472. //
  473. this.groupBox3.Controls.Add(this.panel4);
  474. this.groupBox3.Controls.Add(this.panel5);
  475. this.groupBox3.Controls.Add(this.panel6);
  476. this.groupBox3.Controls.Add(this.textBox5);
  477. this.groupBox3.Controls.Add(this.trackBar5);
  478. this.groupBox3.Controls.Add(this.textBox3);
  479. this.groupBox3.Controls.Add(this.textBox4);
  480. this.groupBox3.Controls.Add(this.trackBar4);
  481. this.groupBox3.Controls.Add(this.trackBar3);
  482. this.groupBox3.Controls.Add(this.label7);
  483. this.groupBox3.Controls.Add(this.label8);
  484. this.groupBox3.Controls.Add(this.label9);
  485. this.groupBox3.Controls.Add(this.label10);
  486. this.groupBox3.Controls.Add(this.label11);
  487. this.groupBox3.Controls.Add(this.label12);
  488. this.groupBox3.Location = new System.Drawing.Point(12, 198);
  489. this.groupBox3.Name = "groupBox3";
  490. this.groupBox3.Size = new System.Drawing.Size(500, 116);
  491. this.groupBox3.TabIndex = 28;
  492. this.groupBox3.TabStop = false;
  493. //
  494. // panel4
  495. //
  496. this.panel4.Location = new System.Drawing.Point(62, 24);
  497. this.panel4.Name = "panel4";
  498. this.panel4.Size = new System.Drawing.Size(102, 22);
  499. this.panel4.TabIndex = 25;
  500. this.panel4.Click += new System.EventHandler(this.panel4_Click);
  501. //
  502. // panel5
  503. //
  504. this.panel5.Controls.Add(this.radioButton5);
  505. this.panel5.Controls.Add(this.radioButton6);
  506. this.panel5.Location = new System.Drawing.Point(368, 65);
  507. this.panel5.Name = "panel5";
  508. this.panel5.Size = new System.Drawing.Size(115, 30);
  509. this.panel5.TabIndex = 24;
  510. //
  511. // radioButton5
  512. //
  513. this.radioButton5.AutoSize = true;
  514. this.radioButton5.Location = new System.Drawing.Point(62, 6);
  515. this.radioButton5.Name = "radioButton5";
  516. this.radioButton5.Size = new System.Drawing.Size(47, 16);
  517. this.radioButton5.TabIndex = 1;
  518. this.radioButton5.TabStop = true;
  519. this.radioButton5.UseVisualStyleBackColor = true;
  520. //
  521. // radioButton6
  522. //
  523. this.radioButton6.AutoSize = true;
  524. this.radioButton6.Location = new System.Drawing.Point(9, 6);
  525. this.radioButton6.Name = "radioButton6";
  526. this.radioButton6.Size = new System.Drawing.Size(47, 16);
  527. this.radioButton6.TabIndex = 0;
  528. this.radioButton6.TabStop = true;
  529. this.radioButton6.UseVisualStyleBackColor = true;
  530. //
  531. // panel6
  532. //
  533. this.panel6.Controls.Add(this.radioButton7);
  534. this.panel6.Controls.Add(this.radioButton8);
  535. this.panel6.Location = new System.Drawing.Point(368, 20);
  536. this.panel6.Name = "panel6";
  537. this.panel6.Size = new System.Drawing.Size(115, 30);
  538. this.panel6.TabIndex = 23;
  539. //
  540. // radioButton7
  541. //
  542. this.radioButton7.AutoSize = true;
  543. this.radioButton7.Location = new System.Drawing.Point(62, 6);
  544. this.radioButton7.Name = "radioButton7";
  545. this.radioButton7.Size = new System.Drawing.Size(47, 16);
  546. this.radioButton7.TabIndex = 1;
  547. this.radioButton7.TabStop = true;
  548. this.radioButton7.UseVisualStyleBackColor = true;
  549. //
  550. // radioButton8
  551. //
  552. this.radioButton8.AutoSize = true;
  553. this.radioButton8.Location = new System.Drawing.Point(9, 6);
  554. this.radioButton8.Name = "radioButton8";
  555. this.radioButton8.Size = new System.Drawing.Size(47, 16);
  556. this.radioButton8.TabIndex = 0;
  557. this.radioButton8.TabStop = true;
  558. this.radioButton8.UseVisualStyleBackColor = true;
  559. //
  560. // textBox5
  561. //
  562. this.textBox5.Location = new System.Drawing.Point(129, 68);
  563. this.textBox5.Name = "textBox5";
  564. this.textBox5.Size = new System.Drawing.Size(31, 21);
  565. this.textBox5.TabIndex = 33;
  566. this.textBox5.Text = "1";
  567. this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
  568. //
  569. // trackBar5
  570. //
  571. this.trackBar5.LargeChange = 1;
  572. this.trackBar5.Location = new System.Drawing.Point(55, 68);
  573. this.trackBar5.Maximum = 50;
  574. this.trackBar5.Minimum = 1;
  575. this.trackBar5.Name = "trackBar5";
  576. this.trackBar5.Size = new System.Drawing.Size(78, 45);
  577. this.trackBar5.TabIndex = 33;
  578. this.trackBar5.TickStyle = System.Windows.Forms.TickStyle.None;
  579. this.trackBar5.Value = 1;
  580. this.trackBar5.ValueChanged += new System.EventHandler(this.trackBar5_ValueChanged);
  581. //
  582. // textBox3
  583. //
  584. this.textBox3.Location = new System.Drawing.Point(299, 68);
  585. this.textBox3.Name = "textBox3";
  586. this.textBox3.Size = new System.Drawing.Size(31, 21);
  587. this.textBox3.TabIndex = 31;
  588. this.textBox3.Text = "1";
  589. this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
  590. //
  591. // textBox4
  592. //
  593. this.textBox4.Location = new System.Drawing.Point(299, 23);
  594. this.textBox4.Name = "textBox4";
  595. this.textBox4.Size = new System.Drawing.Size(31, 21);
  596. this.textBox4.TabIndex = 32;
  597. this.textBox4.Text = "1";
  598. this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
  599. //
  600. // trackBar4
  601. //
  602. this.trackBar4.LargeChange = 1;
  603. this.trackBar4.Location = new System.Drawing.Point(225, 23);
  604. this.trackBar4.Maximum = 50;
  605. this.trackBar4.Minimum = 1;
  606. this.trackBar4.Name = "trackBar4";
  607. this.trackBar4.Size = new System.Drawing.Size(78, 45);
  608. this.trackBar4.TabIndex = 32;
  609. this.trackBar4.TickStyle = System.Windows.Forms.TickStyle.None;
  610. this.trackBar4.Value = 1;
  611. this.trackBar4.ValueChanged += new System.EventHandler(this.trackBar4_ValueChanged);
  612. //
  613. // trackBar3
  614. //
  615. this.trackBar3.LargeChange = 1;
  616. this.trackBar3.Location = new System.Drawing.Point(225, 68);
  617. this.trackBar3.Maximum = 50;
  618. this.trackBar3.Minimum = 1;
  619. this.trackBar3.Name = "trackBar3";
  620. this.trackBar3.Size = new System.Drawing.Size(78, 45);
  621. this.trackBar3.TabIndex = 31;
  622. this.trackBar3.TickStyle = System.Windows.Forms.TickStyle.None;
  623. this.trackBar3.Value = 1;
  624. this.trackBar3.ValueChanged += new System.EventHandler(this.trackBar3_ValueChanged);
  625. //
  626. // label7
  627. //
  628. this.label7.AutoSize = true;
  629. this.label7.Location = new System.Drawing.Point(332, 72);
  630. this.label7.Name = "label7";
  631. this.label7.Size = new System.Drawing.Size(41, 12);
  632. this.label7.TabIndex = 22;
  633. //
  634. // label8
  635. //
  636. this.label8.AutoSize = true;
  637. this.label8.Location = new System.Drawing.Point(332, 28);
  638. this.label8.Name = "label8";
  639. this.label8.Size = new System.Drawing.Size(41, 12);
  640. this.label8.TabIndex = 21;
  641. //
  642. // label9
  643. //
  644. this.label9.AutoSize = true;
  645. this.label9.Location = new System.Drawing.Point(170, 72);
  646. this.label9.Name = "label9";
  647. this.label9.Size = new System.Drawing.Size(65, 12);
  648. this.label9.TabIndex = 20;
  649. //
  650. // label10
  651. //
  652. this.label10.AutoSize = true;
  653. this.label10.Location = new System.Drawing.Point(194, 28);
  654. this.label10.Name = "label10";
  655. this.label10.Size = new System.Drawing.Size(41, 12);
  656. this.label10.TabIndex = 19;
  657. //
  658. // label11
  659. //
  660. this.label11.AutoSize = true;
  661. this.label11.Location = new System.Drawing.Point(23, 72);
  662. this.label11.Name = "label11";
  663. this.label11.Size = new System.Drawing.Size(41, 12);
  664. this.label11.TabIndex = 18;
  665. //
  666. // label12
  667. //
  668. this.label12.AutoSize = true;
  669. this.label12.Location = new System.Drawing.Point(23, 28);
  670. this.label12.Name = "label12";
  671. this.label12.Size = new System.Drawing.Size(41, 12);
  672. this.label12.TabIndex = 17;
  673. //
  674. // groupBox4
  675. //
  676. this.groupBox4.Controls.Add(this.textBox7);
  677. this.groupBox4.Controls.Add(this.textBox8);
  678. this.groupBox4.Controls.Add(this.textBox6);
  679. this.groupBox4.Controls.Add(this.trackBar8);
  680. this.groupBox4.Controls.Add(this.trackBar7);
  681. this.groupBox4.Controls.Add(this.trackBar6);
  682. this.groupBox4.Controls.Add(this.panel7);
  683. this.groupBox4.Controls.Add(this.panel8);
  684. this.groupBox4.Controls.Add(this.panel9);
  685. this.groupBox4.Controls.Add(this.label13);
  686. this.groupBox4.Controls.Add(this.label14);
  687. this.groupBox4.Controls.Add(this.label15);
  688. this.groupBox4.Controls.Add(this.label16);
  689. this.groupBox4.Controls.Add(this.label17);
  690. this.groupBox4.Controls.Add(this.label18);
  691. this.groupBox4.Location = new System.Drawing.Point(12, 334);
  692. this.groupBox4.Name = "groupBox4";
  693. this.groupBox4.Size = new System.Drawing.Size(500, 119);
  694. this.groupBox4.TabIndex = 28;
  695. this.groupBox4.TabStop = false;
  696. //
  697. // textBox7
  698. //
  699. this.textBox7.Location = new System.Drawing.Point(299, 25);
  700. this.textBox7.Name = "textBox7";
  701. this.textBox7.Size = new System.Drawing.Size(31, 21);
  702. this.textBox7.TabIndex = 35;
  703. this.textBox7.Text = "1";
  704. this.textBox7.TextChanged += new System.EventHandler(this.textBox7_TextChanged);
  705. //
  706. // textBox8
  707. //
  708. this.textBox8.Location = new System.Drawing.Point(129, 68);
  709. this.textBox8.Name = "textBox8";
  710. this.textBox8.Size = new System.Drawing.Size(31, 21);
  711. this.textBox8.TabIndex = 36;
  712. this.textBox8.Text = "1";
  713. this.textBox8.TextChanged += new System.EventHandler(this.textBox8_TextChanged);
  714. //
  715. // textBox6
  716. //
  717. this.textBox6.Location = new System.Drawing.Point(299, 70);
  718. this.textBox6.Name = "textBox6";
  719. this.textBox6.Size = new System.Drawing.Size(31, 21);
  720. this.textBox6.TabIndex = 34;
  721. this.textBox6.Text = "1";
  722. this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
  723. //
  724. // trackBar8
  725. //
  726. this.trackBar8.LargeChange = 1;
  727. this.trackBar8.Location = new System.Drawing.Point(55, 68);
  728. this.trackBar8.Maximum = 50;
  729. this.trackBar8.Minimum = 1;
  730. this.trackBar8.Name = "trackBar8";
  731. this.trackBar8.Size = new System.Drawing.Size(78, 45);
  732. this.trackBar8.TabIndex = 36;
  733. this.trackBar8.TickStyle = System.Windows.Forms.TickStyle.None;
  734. this.trackBar8.Value = 1;
  735. this.trackBar8.ValueChanged += new System.EventHandler(this.trackBar8_ValueChanged);
  736. //
  737. // trackBar7
  738. //
  739. this.trackBar7.LargeChange = 1;
  740. this.trackBar7.Location = new System.Drawing.Point(225, 25);
  741. this.trackBar7.Maximum = 50;
  742. this.trackBar7.Minimum = 1;
  743. this.trackBar7.Name = "trackBar7";
  744. this.trackBar7.Size = new System.Drawing.Size(78, 45);
  745. this.trackBar7.TabIndex = 35;
  746. this.trackBar7.TickStyle = System.Windows.Forms.TickStyle.None;
  747. this.trackBar7.Value = 1;
  748. this.trackBar7.ValueChanged += new System.EventHandler(this.trackBar7_ValueChanged);
  749. //
  750. // trackBar6
  751. //
  752. this.trackBar6.LargeChange = 1;
  753. this.trackBar6.Location = new System.Drawing.Point(225, 69);
  754. this.trackBar6.Maximum = 50;
  755. this.trackBar6.Minimum = 1;
  756. this.trackBar6.Name = "trackBar6";
  757. this.trackBar6.Size = new System.Drawing.Size(78, 45);
  758. this.trackBar6.TabIndex = 34;
  759. this.trackBar6.TickStyle = System.Windows.Forms.TickStyle.None;
  760. this.trackBar6.Value = 1;
  761. this.trackBar6.ValueChanged += new System.EventHandler(this.trackBar6_ValueChanged);
  762. //
  763. // panel7
  764. //
  765. this.panel7.Location = new System.Drawing.Point(62, 24);
  766. this.panel7.Name = "panel7";
  767. this.panel7.Size = new System.Drawing.Size(102, 22);
  768. this.panel7.TabIndex = 25;
  769. this.panel7.Click += new System.EventHandler(this.panel7_Click);
  770. //
  771. // panel8
  772. //
  773. this.panel8.Controls.Add(this.radioButton9);
  774. this.panel8.Controls.Add(this.radioButton10);
  775. this.panel8.Location = new System.Drawing.Point(368, 65);
  776. this.panel8.Name = "panel8";
  777. this.panel8.Size = new System.Drawing.Size(115, 30);
  778. this.panel8.TabIndex = 24;
  779. //
  780. // radioButton9
  781. //
  782. this.radioButton9.AutoSize = true;
  783. this.radioButton9.Location = new System.Drawing.Point(62, 6);
  784. this.radioButton9.Name = "radioButton9";
  785. this.radioButton9.Size = new System.Drawing.Size(47, 16);
  786. this.radioButton9.TabIndex = 1;
  787. this.radioButton9.TabStop = true;
  788. this.radioButton9.UseVisualStyleBackColor = true;
  789. //
  790. // radioButton10
  791. //
  792. this.radioButton10.AutoSize = true;
  793. this.radioButton10.Location = new System.Drawing.Point(9, 6);
  794. this.radioButton10.Name = "radioButton10";
  795. this.radioButton10.Size = new System.Drawing.Size(47, 16);
  796. this.radioButton10.TabIndex = 0;
  797. this.radioButton10.TabStop = true;
  798. this.radioButton10.UseVisualStyleBackColor = true;
  799. //
  800. // panel9
  801. //
  802. this.panel9.Controls.Add(this.radioButton11);
  803. this.panel9.Controls.Add(this.radioButton12);
  804. this.panel9.Location = new System.Drawing.Point(368, 20);
  805. this.panel9.Name = "panel9";
  806. this.panel9.Size = new System.Drawing.Size(115, 30);
  807. this.panel9.TabIndex = 23;
  808. //
  809. // radioButton11
  810. //
  811. this.radioButton11.AutoSize = true;
  812. this.radioButton11.Location = new System.Drawing.Point(62, 6);
  813. this.radioButton11.Name = "radioButton11";
  814. this.radioButton11.Size = new System.Drawing.Size(47, 16);
  815. this.radioButton11.TabIndex = 1;
  816. this.radioButton11.TabStop = true;
  817. this.radioButton11.UseVisualStyleBackColor = true;
  818. //
  819. // radioButton12
  820. //
  821. this.radioButton12.AutoSize = true;
  822. this.radioButton12.Location = new System.Drawing.Point(9, 6);
  823. this.radioButton12.Name = "radioButton12";
  824. this.radioButton12.Size = new System.Drawing.Size(47, 16);
  825. this.radioButton12.TabIndex = 0;
  826. this.radioButton12.TabStop = true;
  827. this.radioButton12.UseVisualStyleBackColor = true;
  828. //
  829. // label13
  830. //
  831. this.label13.AutoSize = true;
  832. this.label13.Location = new System.Drawing.Point(332, 72);
  833. this.label13.Name = "label13";
  834. this.label13.Size = new System.Drawing.Size(41, 12);
  835. this.label13.TabIndex = 22;
  836. //
  837. // label14
  838. //
  839. this.label14.AutoSize = true;
  840. this.label14.Location = new System.Drawing.Point(332, 28);
  841. this.label14.Name = "label14";
  842. this.label14.Size = new System.Drawing.Size(41, 12);
  843. this.label14.TabIndex = 21;
  844. //
  845. // label15
  846. //
  847. this.label15.AutoSize = true;
  848. this.label15.Location = new System.Drawing.Point(170, 72);
  849. this.label15.Name = "label15";
  850. this.label15.Size = new System.Drawing.Size(65, 12);
  851. this.label15.TabIndex = 20;
  852. //
  853. // label16
  854. //
  855. this.label16.AutoSize = true;
  856. this.label16.Location = new System.Drawing.Point(194, 28);
  857. this.label16.Name = "label16";
  858. this.label16.Size = new System.Drawing.Size(41, 12);
  859. this.label16.TabIndex = 19;
  860. //
  861. // label17
  862. //
  863. this.label17.AutoSize = true;
  864. this.label17.Location = new System.Drawing.Point(23, 72);
  865. this.label17.Name = "label17";
  866. this.label17.Size = new System.Drawing.Size(41, 12);
  867. this.label17.TabIndex = 18;
  868. //
  869. // label18
  870. //
  871. this.label18.AutoSize = true;
  872. this.label18.Location = new System.Drawing.Point(23, 28);
  873. this.label18.Name = "label18";
  874. this.label18.Size = new System.Drawing.Size(41, 12);
  875. this.label18.TabIndex = 17;
  876. //
  877. // GrainSurveyPointStyleSettingDialog
  878. //
  879. this.ClientSize = new System.Drawing.Size(522, 459);
  880. this.Controls.Add(this.groupBox4);
  881. this.Controls.Add(this.groupBox3);
  882. this.Controls.Add(this.groupBox2);
  883. this.Controls.Add(this.groupBox1);
  884. this.Name = "GrainSurveyPointStyleSettingDialog";
  885. this.groupBox1.ResumeLayout(false);
  886. this.groupBox2.ResumeLayout(false);
  887. this.groupBox2.PerformLayout();
  888. ((System.ComponentModel.ISupportInitialize)(this.trackBar9)).EndInit();
  889. this.panel2.ResumeLayout(false);
  890. this.panel2.PerformLayout();
  891. this.panel1.ResumeLayout(false);
  892. this.panel1.PerformLayout();
  893. ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
  894. ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
  895. this.groupBox3.ResumeLayout(false);
  896. this.groupBox3.PerformLayout();
  897. this.panel5.ResumeLayout(false);
  898. this.panel5.PerformLayout();
  899. this.panel6.ResumeLayout(false);
  900. this.panel6.PerformLayout();
  901. ((System.ComponentModel.ISupportInitialize)(this.trackBar5)).EndInit();
  902. ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).EndInit();
  903. ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();
  904. this.groupBox4.ResumeLayout(false);
  905. this.groupBox4.PerformLayout();
  906. ((System.ComponentModel.ISupportInitialize)(this.trackBar8)).EndInit();
  907. ((System.ComponentModel.ISupportInitialize)(this.trackBar7)).EndInit();
  908. ((System.ComponentModel.ISupportInitialize)(this.trackBar6)).EndInit();
  909. this.panel8.ResumeLayout(false);
  910. this.panel8.PerformLayout();
  911. this.panel9.ResumeLayout(false);
  912. this.panel9.PerformLayout();
  913. this.ResumeLayout(false);
  914. }
  915. #endregion
  916. /// <summary>
  917. /// Xml获取初始数据
  918. /// </summary>
  919. private void GetFromXml()
  920. {
  921. GrainCutOffPointStyleModel grainCutOffPointStyleModel = XmlSerializeHelper.DESerializer<GrainCutOffPointStyleModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\GrainSizeAnalyze\\GrainCutOffPointStyleModel.xml", FileMode.Open));
  922. if (grainCutOffPointStyleModel.CutOffPointStyle1 != null
  923. && grainCutOffPointStyleModel.CutOffPointStyle2 != null
  924. && grainCutOffPointStyleModel.CutOffPointStyle3 != null)
  925. {
  926. // 0.5截点
  927. this.panel3.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle1.pointColor);
  928. this.trackBar1.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointWidth;
  929. if (grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle == 0)
  930. this.radioButton1.Checked = true;
  931. else
  932. this.radioButton2.Checked = true;
  933. this.trackBar9.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointDiameter;
  934. this.trackBar2.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointError;
  935. if (grainCutOffPointStyleModel.CutOffPointStyle1.pointshape == 0)
  936. this.radioButton4.Checked = true;
  937. else
  938. this.radioButton3.Checked = true;
  939. // 1截点
  940. this.panel4.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle2.pointColor);
  941. this.trackBar4.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointWidth;
  942. if (grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle == 0)
  943. this.radioButton8.Checked = true;
  944. else
  945. this.radioButton7.Checked = true;
  946. this.trackBar5.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointDiameter;
  947. this.trackBar3.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointError;
  948. if (grainCutOffPointStyleModel.CutOffPointStyle2.pointshape == 0)
  949. this.radioButton6.Checked = true;
  950. else
  951. this.radioButton5.Checked = true;
  952. // 1.5/2截点
  953. this.panel7.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle3.pointColor);
  954. this.trackBar7.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointWidth;
  955. if (grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle == 0)
  956. this.radioButton12.Checked = true;
  957. else
  958. this.radioButton11.Checked = true;
  959. this.trackBar8.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointDiameter;
  960. this.trackBar6.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointError;
  961. if (grainCutOffPointStyleModel.CutOffPointStyle3.pointshape == 0)
  962. this.radioButton10.Checked = true;
  963. else
  964. this.radioButton9.Checked = true;
  965. }
  966. }
  967. private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
  968. {
  969. }
  970. private void panel3_Click(object sender, EventArgs e)
  971. {
  972. this.colorsForm1.UserPrimaryColor = ColorBgra.FromColor(this.panel3.BackColor);
  973. this.colorsForm1.setSaveBtn_Click(new System.EventHandler(this.panel3Changed));
  974. this.colorsForm1.ShowDialog();
  975. }
  976. private void panel3Changed(object sender, EventArgs e)
  977. {
  978. this.panel3.BackColor = this.colorsForm1.UserPrimaryColor.ToColor();
  979. this.colorsForm1.Close();
  980. }
  981. private void panel4_Click(object sender, EventArgs e)
  982. {
  983. this.colorsForm2.UserPrimaryColor = ColorBgra.FromColor(this.panel4.BackColor);
  984. this.colorsForm2.setSaveBtn_Click(new System.EventHandler(this.panel4Changed));
  985. this.colorsForm2.ShowDialog();
  986. }
  987. private void panel4Changed(object sender, EventArgs e)
  988. {
  989. this.panel4.BackColor = this.colorsForm2.UserPrimaryColor.ToColor();
  990. this.colorsForm2.Close();
  991. }
  992. private void panel7_Click(object sender, EventArgs e)
  993. {
  994. this.colorsForm3.UserPrimaryColor = ColorBgra.FromColor(this.panel7.BackColor);
  995. this.colorsForm3.setSaveBtn_Click(new System.EventHandler(this.panel7Changed));
  996. this.colorsForm3.ShowDialog();
  997. }
  998. private void panel7Changed(object sender, EventArgs e)
  999. {
  1000. this.panel7.BackColor = this.colorsForm3.UserPrimaryColor.ToColor();
  1001. this.colorsForm3.Close();
  1002. }
  1003. /// <summary>
  1004. /// 关闭按钮
  1005. /// </summary>
  1006. /// <param name="sender"></param>
  1007. /// <param name="e"></param>
  1008. private void button1_Click(object sender, EventArgs e)
  1009. {
  1010. this.Close();
  1011. }
  1012. /// <summary>
  1013. /// 保存按钮
  1014. /// </summary>
  1015. /// <param name="sender"></param>
  1016. /// <param name="e"></param>
  1017. private void button2_Click(object sender, EventArgs e)
  1018. {
  1019. GrainCutOffPointStyleModel grainCutOffPointStyleModel = new GrainCutOffPointStyleModel();
  1020. grainCutOffPointStyleModel.CutOffPointStyle1 = new GrainCutOffPointStyleModel.CutOffPointStyle();
  1021. grainCutOffPointStyleModel.CutOffPointStyle2 = new GrainCutOffPointStyleModel.CutOffPointStyle();
  1022. grainCutOffPointStyleModel.CutOffPointStyle3 = new GrainCutOffPointStyleModel.CutOffPointStyle();
  1023. // 0.5截点
  1024. grainCutOffPointStyleModel.CutOffPointStyle1.pointColor = Convert.ToInt32(this.panel3.BackColor.ToArgb());
  1025. grainCutOffPointStyleModel.CutOffPointStyle1.pointWidth = Convert.ToInt32(this.trackBar1.Value);
  1026. if (this.radioButton1.Checked)
  1027. grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle = 0;
  1028. else if (this.radioButton2.Checked)
  1029. grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle = 1;
  1030. grainCutOffPointStyleModel.CutOffPointStyle1.pointDiameter = Convert.ToInt32(this.trackBar9.Value);
  1031. grainCutOffPointStyleModel.CutOffPointStyle1.pointError = Convert.ToInt32(this.trackBar2.Value);
  1032. if (this.radioButton4.Checked)
  1033. grainCutOffPointStyleModel.CutOffPointStyle1.pointshape = 0;
  1034. else if (this.radioButton3.Checked)
  1035. grainCutOffPointStyleModel.CutOffPointStyle1.pointshape = 1;
  1036. // 1截点
  1037. grainCutOffPointStyleModel.CutOffPointStyle2.pointColor = Convert.ToInt32(this.panel4.BackColor.ToArgb());
  1038. grainCutOffPointStyleModel.CutOffPointStyle2.pointWidth = Convert.ToInt32(this.trackBar4.Value);
  1039. if (this.radioButton8.Checked)
  1040. grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle = 0;
  1041. else if (this.radioButton7.Checked)
  1042. grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle = 1;
  1043. grainCutOffPointStyleModel.CutOffPointStyle2.pointDiameter = Convert.ToInt32(this.trackBar5.Value);
  1044. grainCutOffPointStyleModel.CutOffPointStyle2.pointError = Convert.ToInt32(this.trackBar3.Value);
  1045. if (this.radioButton6.Checked)
  1046. grainCutOffPointStyleModel.CutOffPointStyle2.pointshape = 0;
  1047. else if (this.radioButton5.Checked)
  1048. grainCutOffPointStyleModel.CutOffPointStyle2.pointshape = 1;
  1049. // 1.5/2截点
  1050. grainCutOffPointStyleModel.CutOffPointStyle3.pointColor = Convert.ToInt32(this.panel7.BackColor.ToArgb());
  1051. grainCutOffPointStyleModel.CutOffPointStyle3.pointWidth = Convert.ToInt32(this.trackBar7.Value);
  1052. if (this.radioButton12.Checked)
  1053. grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle = 0;
  1054. else if (this.radioButton11.Checked)
  1055. grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle = 1;
  1056. grainCutOffPointStyleModel.CutOffPointStyle3.pointDiameter = Convert.ToInt32(this.trackBar8.Value);
  1057. grainCutOffPointStyleModel.CutOffPointStyle3.pointError = Convert.ToInt32(this.trackBar6.Value);
  1058. if (this.radioButton10.Checked)
  1059. grainCutOffPointStyleModel.CutOffPointStyle3.pointshape = 0;
  1060. else if (this.radioButton9.Checked)
  1061. grainCutOffPointStyleModel.CutOffPointStyle3.pointshape = 1;
  1062. //以下保存xml文件信息
  1063. string stageModelXml = XmlSerializeHelper.XmlSerialize<GrainCutOffPointStyleModel>(grainCutOffPointStyleModel);
  1064. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\GrainSizeAnalyze\\GrainCutOffPointStyleModel.xml";
  1065. if (FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create))
  1066. {
  1067. MessageBox.Show(PdnResources.GetString("Menu.Successfullysaved.text") + "!");
  1068. }
  1069. if (this.Owner is GBT6394.MethodCutOffDialog)
  1070. {
  1071. GBT6394.MethodCutOffDialog grainSizeDialog = (GBT6394.MethodCutOffDialog)this.Owner;//###
  1072. grainSizeDialog.UpdateCupOffPointStyle();
  1073. }
  1074. else if (this.Owner is E112.MethodCutOffDialog)
  1075. {
  1076. E112.MethodCutOffDialog grainSizeDialog = (E112.MethodCutOffDialog)this.Owner;//###
  1077. grainSizeDialog.UpdateCupOffPointStyle();
  1078. }
  1079. else if (this.Owner is GBT24177.MethodCutOffDialog)
  1080. {
  1081. GBT24177.MethodCutOffDialog grainSizeDialog = (GBT24177.MethodCutOffDialog)this.Owner;//###
  1082. grainSizeDialog.UpdateCupOffPointStyle();
  1083. }
  1084. else if (this.Owner is GBT4335.MethodCutOffDialog)
  1085. {
  1086. GBT4335.MethodCutOffDialog grainSizeDialog = (GBT4335.MethodCutOffDialog)this.Owner;//###
  1087. grainSizeDialog.UpdateCupOffPointStyle();
  1088. }
  1089. else if (this.Owner is ISO643.MethodCutOffDialog)
  1090. {
  1091. ISO643.MethodCutOffDialog grainSizeDialog = (ISO643.MethodCutOffDialog)this.Owner;//###
  1092. grainSizeDialog.UpdateCupOffPointStyle();
  1093. }
  1094. else if (this.Owner is GBT32461.MethodCutOffDialog)
  1095. {
  1096. GBT32461.MethodCutOffDialog grainSizeDialog = (GBT32461.MethodCutOffDialog)this.Owner;//###
  1097. grainSizeDialog.UpdateCupOffPointStyle();
  1098. }
  1099. else if (this.Owner is GBT4296.MethodCutOffDialog)
  1100. {
  1101. GBT4296.MethodCutOffDialog grainSizeDialog = (GBT4296.MethodCutOffDialog)this.Owner;
  1102. grainSizeDialog.UpdateCupOffPointStyle();
  1103. }
  1104. else if (this.Owner is YST347.MethodCutOffDialog)
  1105. {
  1106. YST347.MethodCutOffDialog grainSizeDialog = (YST347.MethodCutOffDialog)this.Owner;
  1107. grainSizeDialog.UpdateCupOffPointStyle();
  1108. }
  1109. }
  1110. private void trackBar1_ValueChanged(object sender, EventArgs e)
  1111. {
  1112. this.textBox1.Text = this.trackBar1.Value.ToString();
  1113. }
  1114. private void trackBar9_ValueChanged(object sender, EventArgs e)
  1115. {
  1116. this.textBox9.Text = this.trackBar9.Value.ToString();//0916###18751
  1117. }
  1118. private void trackBar2_ValueChanged(object sender, EventArgs e)
  1119. {
  1120. this.textBox2.Text = this.trackBar2.Value.ToString();
  1121. }
  1122. private void trackBar4_ValueChanged(object sender, EventArgs e)
  1123. {
  1124. this.textBox4.Text = this.trackBar4.Value.ToString();
  1125. }
  1126. private void trackBar5_ValueChanged(object sender, EventArgs e)
  1127. {
  1128. this.textBox5.Text = this.trackBar5.Value.ToString();
  1129. }
  1130. private void trackBar3_ValueChanged(object sender, EventArgs e)
  1131. {
  1132. this.textBox3.Text = this.trackBar3.Value.ToString();
  1133. }
  1134. private void trackBar7_ValueChanged(object sender, EventArgs e)
  1135. {
  1136. this.textBox7.Text = this.trackBar7.Value.ToString();
  1137. }
  1138. private void trackBar8_ValueChanged(object sender, EventArgs e)
  1139. {
  1140. this.textBox8.Text = this.trackBar8.Value.ToString();
  1141. }
  1142. private void trackBar6_ValueChanged(object sender, EventArgs e)
  1143. {
  1144. this.textBox6.Text = this.trackBar6.Value.ToString();
  1145. }
  1146. private void textBox1_TextChanged(object sender, EventArgs e)
  1147. {
  1148. try
  1149. {
  1150. int val = Convert.ToInt32(this.textBox1.Text);
  1151. if (val >= this.trackBar1.Minimum && val <= this.trackBar1.Maximum)
  1152. {
  1153. this.trackBar1.Value = val;
  1154. }
  1155. else if (val < this.trackBar1.Minimum)
  1156. {
  1157. this.trackBar1.Value = this.trackBar1.Minimum;
  1158. this.textBox1.Text = this.trackBar1.Minimum.ToString();
  1159. }
  1160. else
  1161. {
  1162. this.trackBar1.Value = this.trackBar1.Maximum;
  1163. this.textBox1.Text = this.trackBar1.Maximum.ToString();
  1164. }
  1165. }
  1166. catch (Exception ex)
  1167. {
  1168. this.trackBar1.Value = this.trackBar1.Minimum;
  1169. this.textBox1.Text = this.trackBar1.Minimum.ToString();
  1170. }
  1171. }
  1172. private void textBox9_TextChanged(object sender, EventArgs e)
  1173. {
  1174. try
  1175. {
  1176. int val = Convert.ToInt32(this.textBox9.Text);
  1177. if (val >= this.trackBar9.Minimum && val <= this.trackBar9.Maximum)
  1178. {
  1179. this.trackBar9.Value = val;
  1180. }
  1181. else if (val < this.trackBar9.Minimum)
  1182. {
  1183. this.trackBar9.Value = this.trackBar9.Minimum;
  1184. this.textBox9.Text = this.trackBar9.Minimum.ToString();
  1185. }
  1186. else
  1187. {
  1188. this.trackBar9.Value = this.trackBar9.Maximum;
  1189. this.textBox9.Text = this.trackBar9.Maximum.ToString();
  1190. }
  1191. }
  1192. catch (Exception ex)
  1193. {
  1194. this.trackBar9.Value = this.trackBar9.Minimum;
  1195. this.textBox9.Text = this.trackBar9.Minimum.ToString();
  1196. }
  1197. }
  1198. private void textBox2_TextChanged(object sender, EventArgs e)
  1199. {
  1200. try
  1201. {
  1202. int val = Convert.ToInt32(this.textBox2.Text);
  1203. if (val >= this.trackBar2.Minimum && val <= this.trackBar2.Maximum)
  1204. {
  1205. this.trackBar2.Value = val;
  1206. }
  1207. else if (val < this.trackBar2.Minimum) {
  1208. this.trackBar2.Value = this.trackBar2.Minimum;
  1209. this.textBox2.Text = this.trackBar2.Minimum.ToString();
  1210. } else {
  1211. this.trackBar2.Value = this.trackBar2.Maximum;
  1212. this.textBox2.Text = this.trackBar2.Maximum.ToString();
  1213. }
  1214. }
  1215. catch (Exception ex)
  1216. {
  1217. this.trackBar2.Value = this.trackBar2.Minimum;
  1218. this.textBox2.Text = this.trackBar2.Minimum.ToString();
  1219. }
  1220. }
  1221. private void textBox4_TextChanged(object sender, EventArgs e)
  1222. {
  1223. try
  1224. {
  1225. int val = Convert.ToInt32(this.textBox4.Text);
  1226. if (val >= this.trackBar4.Minimum && val <= this.trackBar4.Maximum)
  1227. {
  1228. this.trackBar4.Value = val;
  1229. }
  1230. else if (val < this.trackBar4.Minimum)
  1231. {
  1232. this.trackBar4.Value = this.trackBar4.Minimum;
  1233. this.textBox4.Text = this.trackBar4.Minimum.ToString();
  1234. }
  1235. else
  1236. {
  1237. this.trackBar4.Value = this.trackBar4.Maximum;
  1238. this.textBox4.Text = this.trackBar4.Maximum.ToString();
  1239. }
  1240. }
  1241. catch (Exception ex)
  1242. {
  1243. this.trackBar4.Value = this.trackBar4.Minimum;
  1244. this.textBox4.Text = this.trackBar4.Minimum.ToString();
  1245. }
  1246. }
  1247. private void textBox5_TextChanged(object sender, EventArgs e)
  1248. {
  1249. try
  1250. {
  1251. int val = Convert.ToInt32(this.textBox5.Text);
  1252. if (val >= this.trackBar5.Minimum && val <= this.trackBar5.Maximum)
  1253. {
  1254. this.trackBar5.Value = val;
  1255. }
  1256. else if (val < this.trackBar5.Minimum)
  1257. {
  1258. this.trackBar5.Value = this.trackBar5.Minimum;
  1259. this.textBox5.Text = this.trackBar5.Minimum.ToString();
  1260. }
  1261. else
  1262. {
  1263. this.trackBar5.Value = this.trackBar5.Maximum;
  1264. this.textBox5.Text = this.trackBar5.Maximum.ToString();
  1265. }
  1266. }
  1267. catch (Exception ex)
  1268. {
  1269. this.trackBar5.Value = this.trackBar5.Minimum;
  1270. this.textBox5.Text = this.trackBar5.Minimum.ToString();
  1271. }
  1272. }
  1273. private void textBox3_TextChanged(object sender, EventArgs e)
  1274. {
  1275. try
  1276. {
  1277. int val = Convert.ToInt32(this.textBox3.Text);
  1278. if (val >= this.trackBar3.Minimum && val <= this.trackBar3.Maximum)
  1279. {
  1280. this.trackBar3.Value = val;
  1281. }
  1282. else if (val < this.trackBar3.Minimum)
  1283. {
  1284. this.trackBar3.Value = this.trackBar3.Minimum;
  1285. this.textBox3.Text = this.trackBar3.Minimum.ToString();
  1286. }
  1287. else
  1288. {
  1289. this.trackBar3.Value = this.trackBar3.Maximum;
  1290. this.textBox3.Text = this.trackBar3.Maximum.ToString();
  1291. }
  1292. }
  1293. catch (Exception ex)
  1294. {
  1295. this.trackBar3.Value = this.trackBar3.Minimum;
  1296. this.textBox3.Text = this.trackBar3.Minimum.ToString();
  1297. }
  1298. }
  1299. private void textBox7_TextChanged(object sender, EventArgs e)
  1300. {
  1301. try
  1302. {
  1303. int val = Convert.ToInt32(this.textBox7.Text);
  1304. if (val >= this.trackBar7.Minimum && val <= this.trackBar7.Maximum)
  1305. {
  1306. this.trackBar7.Value = val;
  1307. }
  1308. else if (val < this.trackBar7.Minimum)
  1309. {
  1310. this.trackBar7.Value = this.trackBar7.Minimum;
  1311. this.textBox7.Text = this.trackBar7.Minimum.ToString();
  1312. }
  1313. else
  1314. {
  1315. this.trackBar7.Value = this.trackBar7.Maximum;
  1316. this.textBox7.Text = this.trackBar7.Maximum.ToString();
  1317. }
  1318. }
  1319. catch (Exception ex)
  1320. {
  1321. this.trackBar7.Value = this.trackBar7.Minimum;
  1322. this.textBox7.Text = this.trackBar7.Minimum.ToString();
  1323. }
  1324. }
  1325. private void textBox8_TextChanged(object sender, EventArgs e)
  1326. {
  1327. try
  1328. {
  1329. int val = Convert.ToInt32(this.textBox8.Text);
  1330. if (val >= this.trackBar8.Minimum && val <= this.trackBar8.Maximum)
  1331. {
  1332. this.trackBar8.Value = val;
  1333. }
  1334. else if (val < this.trackBar8.Minimum)
  1335. {
  1336. this.trackBar8.Value = this.trackBar8.Minimum;
  1337. this.textBox8.Text = this.trackBar8.Minimum.ToString();
  1338. }
  1339. else
  1340. {
  1341. this.trackBar8.Value = this.trackBar8.Maximum;
  1342. this.textBox8.Text = this.trackBar8.Maximum.ToString();
  1343. }
  1344. }
  1345. catch (Exception ex)
  1346. {
  1347. this.trackBar8.Value = this.trackBar8.Minimum;
  1348. this.textBox8.Text = this.trackBar8.Minimum.ToString();
  1349. }
  1350. }
  1351. private void textBox6_TextChanged(object sender, EventArgs e)
  1352. {
  1353. try
  1354. {
  1355. int val = Convert.ToInt32(this.textBox6.Text);
  1356. if (val >= this.trackBar6.Minimum && val <= this.trackBar6.Maximum)
  1357. {
  1358. this.trackBar6.Value = val;
  1359. }
  1360. else if (val < this.trackBar6.Minimum)
  1361. {
  1362. this.trackBar6.Value = this.trackBar6.Minimum;
  1363. this.textBox6.Text = this.trackBar6.Minimum.ToString();
  1364. }
  1365. else
  1366. {
  1367. this.trackBar6.Value = this.trackBar6.Maximum;
  1368. this.textBox6.Text = this.trackBar6.Maximum.ToString();
  1369. }
  1370. }
  1371. catch (Exception ex)
  1372. {
  1373. this.trackBar6.Value = this.trackBar6.Minimum;
  1374. this.textBox6.Text = this.trackBar6.Minimum.ToString();
  1375. }
  1376. }
  1377. }
  1378. }