12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436 |
- using PaintDotNet.Base.CommTool;
- using PaintDotNet.Base.SettingModel;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace PaintDotNet.DedicatedAnalysis.GrainSizeStandard.IntegrationClass
- {
- public partial class GrainSurveyPointStyleSettingDialog : Form
- {
- #region 控件
- private GroupBox groupBox1;
- private Button button2;
- private GroupBox groupBox2;
- private Label label6;
- private Label label5;
- private Label label4;
- private Label label3;
- private Label label2;
- private Label label1;
- private Panel panel1;
- private RadioButton radioButton1;
- private RadioButton radioButton2;
- private Panel panel2;
- private RadioButton radioButton3;
- private RadioButton radioButton4;
- private Panel panel3;
- private GroupBox groupBox3;
- private Panel panel4;
- private Panel panel5;
- private RadioButton radioButton5;
- private RadioButton radioButton6;
- private Panel panel6;
- private RadioButton radioButton7;
- private RadioButton radioButton8;
- private Label label7;
- private Label label8;
- private Label label9;
- private Label label10;
- private Label label11;
- private Label label12;
- private GroupBox groupBox4;
- private Panel panel7;
- private Panel panel8;
- private RadioButton radioButton9;
- private RadioButton radioButton10;
- private Panel panel9;
- private RadioButton radioButton11;
- private RadioButton radioButton12;
- private Label label13;
- private Label label14;
- private Label label15;
- private Label label16;
- private Label label17;
- private Label label18;
- private Button button1;
- #endregion
- /// <summary>
- /// 调色板
- /// </summary>
- PaintDotNet.ColorsForm colorsForm1;
- /// <summary>
- /// 调色板
- /// </summary>
- PaintDotNet.ColorsForm colorsForm2;
- private TrackBar trackBar9;
- private TrackBar trackBar2;
- private TrackBar trackBar1;
- private TrackBar trackBar5;
- private TrackBar trackBar4;
- private TrackBar trackBar3;
- private TrackBar trackBar8;
- private TrackBar trackBar7;
- private TrackBar trackBar6;
- private TextBox textBox9;
- private TextBox textBox2;
- private TextBox textBox1;
- private TextBox textBox5;
- private TextBox textBox3;
- private TextBox textBox4;
- private TextBox textBox7;
- private TextBox textBox8;
- private TextBox textBox6;
- /// <summary>
- /// 调色板
- /// </summary>
- PaintDotNet.ColorsForm colorsForm3;
- public GrainSurveyPointStyleSettingDialog()
- {
- InitializeComponent();
- InitializeLanguageText();
- GetFromXml();
- //调色板
- this.colorsForm1 = new ColorsForm();
- this.colorsForm1.StartPosition = FormStartPosition.CenterScreen;
- this.colorsForm1.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
- //调色板
- this.colorsForm2 = new ColorsForm();
- this.colorsForm2.StartPosition = FormStartPosition.CenterScreen;
- this.colorsForm2.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
- //调色板
- this.colorsForm3 = new ColorsForm();
- this.colorsForm3.StartPosition = FormStartPosition.CenterScreen;
- this.colorsForm3.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
- }
- #region 初始化
- private void InitializeLanguageText()
- {
- this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
- this.button2.Text = PdnResources.GetString("CommonAction.Save");
- this.button1.Text = PdnResources.GetString("Menu.File.Close.Text");
- this.groupBox2.Text = PdnResources.GetString("Menu.0.5sectionstyle.text");
- this.radioButton3.Text = PdnResources.GetString("Menu.Square.text");
- this.radioButton4.Text = PdnResources.GetString("Menu.circular.Text");
- this.radioButton2.Text = PdnResources.GetString("Menu.solid.text");
- this.radioButton1.Text = PdnResources.GetString("Menu.Hollow.text");
- this.label6.Text = PdnResources.GetString("Menu.shape.text") + ":";
- this.label5.Text = PdnResources.GetString("Menu.style.text") + ":";
- this.label4.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
- this.label3.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
- this.label2.Text = PdnResources.GetString("Menu.size.text") + ":";
- this.label1.Text = PdnResources.GetString("Menu.color.text") + ":";
- this.groupBox3.Text = PdnResources.GetString("Menu.1sectionstyle.text");
- this.radioButton5.Text = PdnResources.GetString("Menu.Square.text");
- this.radioButton6.Text = PdnResources.GetString("Menu.circular.Text");
- this.radioButton7.Text = PdnResources.GetString("Menu.solid.text");
- this.radioButton8.Text = PdnResources.GetString("Menu.Hollow.text");
- this.label7.Text = PdnResources.GetString("Menu.shape.text") + ":";
- this.label8.Text = PdnResources.GetString("Menu.style.text") + ":";
- this.label9.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
- this.label10.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
- this.label11.Text = PdnResources.GetString("Menu.size.text") + ":";
- this.label12.Text = PdnResources.GetString("Menu.color.text") + ":";
- this.groupBox4.Text = PdnResources.GetString("Menu.1.5/2sectionstyle.text");
- this.radioButton9.Text = PdnResources.GetString("Menu.Square.text");
- this.radioButton10.Text = PdnResources.GetString("Menu.circular.Text");
- this.radioButton11.Text = PdnResources.GetString("Menu.solid.text");
- this.radioButton12.Text = PdnResources.GetString("Menu.Hollow.text");
- this.label13.Text = PdnResources.GetString("Menu.shape.text") + ":";
- this.label14.Text = PdnResources.GetString("Menu.style.text") + ":";
- this.label15.Text = PdnResources.GetString("Menu.Intercepterror.text") + ":";
- this.label16.Text = PdnResources.GetString("Menu.Linewidth.text") + ":";
- this.label17.Text = PdnResources.GetString("Menu.size.text") + ":";
- this.label18.Text = PdnResources.GetString("Menu.color.text") + ":";
- this.Text = PdnResources.GetString("Menu.sectionsstylesettings.text");
- }
- private void InitializeComponent()
- {
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.button2 = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.textBox9 = new System.Windows.Forms.TextBox();
- this.trackBar9 = new System.Windows.Forms.TrackBar();
- this.panel3 = new System.Windows.Forms.Panel();
- this.panel2 = new System.Windows.Forms.Panel();
- this.radioButton3 = new System.Windows.Forms.RadioButton();
- this.radioButton4 = new System.Windows.Forms.RadioButton();
- this.panel1 = new System.Windows.Forms.Panel();
- this.radioButton2 = new System.Windows.Forms.RadioButton();
- this.radioButton1 = new System.Windows.Forms.RadioButton();
- this.label6 = new System.Windows.Forms.Label();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.label5 = new System.Windows.Forms.Label();
- this.trackBar2 = new System.Windows.Forms.TrackBar();
- this.label4 = new System.Windows.Forms.Label();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.trackBar1 = new System.Windows.Forms.TrackBar();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.panel4 = new System.Windows.Forms.Panel();
- this.panel5 = new System.Windows.Forms.Panel();
- this.radioButton5 = new System.Windows.Forms.RadioButton();
- this.radioButton6 = new System.Windows.Forms.RadioButton();
- this.panel6 = new System.Windows.Forms.Panel();
- this.radioButton7 = new System.Windows.Forms.RadioButton();
- this.radioButton8 = new System.Windows.Forms.RadioButton();
- this.textBox5 = new System.Windows.Forms.TextBox();
- this.trackBar5 = new System.Windows.Forms.TrackBar();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.textBox4 = new System.Windows.Forms.TextBox();
- this.trackBar4 = new System.Windows.Forms.TrackBar();
- this.trackBar3 = new System.Windows.Forms.TrackBar();
- this.label7 = new System.Windows.Forms.Label();
- this.label8 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label11 = new System.Windows.Forms.Label();
- this.label12 = new System.Windows.Forms.Label();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.textBox7 = new System.Windows.Forms.TextBox();
- this.textBox8 = new System.Windows.Forms.TextBox();
- this.textBox6 = new System.Windows.Forms.TextBox();
- this.trackBar8 = new System.Windows.Forms.TrackBar();
- this.trackBar7 = new System.Windows.Forms.TrackBar();
- this.trackBar6 = new System.Windows.Forms.TrackBar();
- this.panel7 = new System.Windows.Forms.Panel();
- this.panel8 = new System.Windows.Forms.Panel();
- this.radioButton9 = new System.Windows.Forms.RadioButton();
- this.radioButton10 = new System.Windows.Forms.RadioButton();
- this.panel9 = new System.Windows.Forms.Panel();
- this.radioButton11 = new System.Windows.Forms.RadioButton();
- this.radioButton12 = new System.Windows.Forms.RadioButton();
- this.label13 = new System.Windows.Forms.Label();
- this.label14 = new System.Windows.Forms.Label();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.label17 = new System.Windows.Forms.Label();
- this.label18 = new System.Windows.Forms.Label();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar9)).BeginInit();
- this.panel2.SuspendLayout();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
- this.groupBox3.SuspendLayout();
- this.panel5.SuspendLayout();
- this.panel6.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar5)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();
- this.groupBox4.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar8)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar7)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar6)).BeginInit();
- this.panel8.SuspendLayout();
- this.panel9.SuspendLayout();
- this.SuspendLayout();
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.button2);
- this.groupBox1.Controls.Add(this.button1);
- this.groupBox1.Location = new System.Drawing.Point(12, 12);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(500, 54);
- this.groupBox1.TabIndex = 2;
- this.groupBox1.TabStop = false;
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(414, 16);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(70, 28);
- this.button2.TabIndex = 1;
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(325, 16);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(70, 28);
- this.button1.TabIndex = 0;
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.textBox9);
- this.groupBox2.Controls.Add(this.trackBar9);
- this.groupBox2.Controls.Add(this.panel3);
- this.groupBox2.Controls.Add(this.panel2);
- this.groupBox2.Controls.Add(this.panel1);
- this.groupBox2.Controls.Add(this.label6);
- this.groupBox2.Controls.Add(this.textBox2);
- this.groupBox2.Controls.Add(this.label5);
- this.groupBox2.Controls.Add(this.trackBar2);
- this.groupBox2.Controls.Add(this.label4);
- this.groupBox2.Controls.Add(this.textBox1);
- this.groupBox2.Controls.Add(this.trackBar1);
- this.groupBox2.Controls.Add(this.label3);
- this.groupBox2.Controls.Add(this.label2);
- this.groupBox2.Controls.Add(this.label1);
- this.groupBox2.Location = new System.Drawing.Point(12, 72);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(500, 120);
- this.groupBox2.TabIndex = 3;
- this.groupBox2.TabStop = false;
- //
- // textBox9
- //
- this.textBox9.Location = new System.Drawing.Point(129, 67);
- this.textBox9.Name = "textBox9";
- this.textBox9.Size = new System.Drawing.Size(31, 21);
- this.textBox9.TabIndex = 37;
- this.textBox9.Text = "1";
- this.textBox9.TextChanged += new System.EventHandler(this.textBox9_TextChanged);
- //
- // trackBar9
- //
- this.trackBar9.LargeChange = 1;
- this.trackBar9.Location = new System.Drawing.Point(55, 68);
- this.trackBar9.Maximum = 50;
- this.trackBar9.Minimum = 1;
- this.trackBar9.Name = "trackBar9";
- this.trackBar9.Size = new System.Drawing.Size(78, 45);
- this.trackBar9.TabIndex = 37;
- this.trackBar9.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar9.Value = 1;
- this.trackBar9.ValueChanged += new System.EventHandler(this.trackBar9_ValueChanged);
- //
- // panel3
- //
- this.panel3.Location = new System.Drawing.Point(62, 24);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(102, 22);
- this.panel3.TabIndex = 25;
- this.panel3.Click += new System.EventHandler(this.panel3_Click);
- //
- // panel2
- //
- this.panel2.Controls.Add(this.radioButton3);
- this.panel2.Controls.Add(this.radioButton4);
- this.panel2.Location = new System.Drawing.Point(368, 64);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(115, 30);
- this.panel2.TabIndex = 24;
- //
- // radioButton3
- //
- this.radioButton3.AutoSize = true;
- this.radioButton3.Location = new System.Drawing.Point(62, 6);
- this.radioButton3.Name = "radioButton3";
- this.radioButton3.Size = new System.Drawing.Size(47, 16);
- this.radioButton3.TabIndex = 1;
- this.radioButton3.TabStop = true;
- this.radioButton3.UseVisualStyleBackColor = true;
- //
- // radioButton4
- //
- this.radioButton4.AutoSize = true;
- this.radioButton4.Location = new System.Drawing.Point(9, 6);
- this.radioButton4.Name = "radioButton4";
- this.radioButton4.Size = new System.Drawing.Size(47, 16);
- this.radioButton4.TabIndex = 0;
- this.radioButton4.TabStop = true;
- this.radioButton4.UseVisualStyleBackColor = true;
- //
- // panel1
- //
- this.panel1.Controls.Add(this.radioButton2);
- this.panel1.Controls.Add(this.radioButton1);
- this.panel1.Location = new System.Drawing.Point(368, 20);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(115, 30);
- this.panel1.TabIndex = 23;
- //
- // radioButton2
- //
- this.radioButton2.AutoSize = true;
- this.radioButton2.Location = new System.Drawing.Point(62, 6);
- this.radioButton2.Name = "radioButton2";
- this.radioButton2.Size = new System.Drawing.Size(47, 16);
- this.radioButton2.TabIndex = 1;
- this.radioButton2.TabStop = true;
- this.radioButton2.UseVisualStyleBackColor = true;
- //
- // radioButton1
- //
- this.radioButton1.AutoSize = true;
- this.radioButton1.Location = new System.Drawing.Point(9, 6);
- this.radioButton1.Name = "radioButton1";
- this.radioButton1.Size = new System.Drawing.Size(47, 16);
- this.radioButton1.TabIndex = 0;
- this.radioButton1.TabStop = true;
- this.radioButton1.UseVisualStyleBackColor = true;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(332, 71);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(41, 12);
- this.label6.TabIndex = 22;
- //
- // textBox2
- //
- this.textBox2.Location = new System.Drawing.Point(299, 68);
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(31, 21);
- this.textBox2.TabIndex = 30;
- this.textBox2.Text = "1";
- this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(332, 28);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(41, 12);
- this.label5.TabIndex = 21;
- //
- // trackBar2
- //
- this.trackBar2.LargeChange = 1;
- this.trackBar2.Location = new System.Drawing.Point(225, 68);
- this.trackBar2.Maximum = 50;
- this.trackBar2.Minimum = 1;
- this.trackBar2.Name = "trackBar2";
- this.trackBar2.Size = new System.Drawing.Size(78, 45);
- this.trackBar2.TabIndex = 30;
- this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar2.Value = 1;
- this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged);
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(170, 71);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(65, 12);
- this.label4.TabIndex = 20;
- //
- // textBox1
- //
- this.textBox1.Location = new System.Drawing.Point(299, 24);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(31, 21);
- this.textBox1.TabIndex = 29;
- this.textBox1.Text = "1";
- this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
- //
- // trackBar1
- //
- this.trackBar1.LargeChange = 1;
- this.trackBar1.Location = new System.Drawing.Point(225, 24);
- this.trackBar1.Maximum = 50;
- this.trackBar1.Minimum = 1;
- this.trackBar1.Name = "trackBar1";
- this.trackBar1.Size = new System.Drawing.Size(78, 45);
- this.trackBar1.TabIndex = 29;
- this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar1.Value = 1;
- this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(194, 28);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(41, 12);
- this.label3.TabIndex = 19;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(23, 71);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(41, 12);
- this.label2.TabIndex = 18;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(23, 28);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(41, 12);
- this.label1.TabIndex = 17;
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.panel4);
- this.groupBox3.Controls.Add(this.panel5);
- this.groupBox3.Controls.Add(this.panel6);
- this.groupBox3.Controls.Add(this.textBox5);
- this.groupBox3.Controls.Add(this.trackBar5);
- this.groupBox3.Controls.Add(this.textBox3);
- this.groupBox3.Controls.Add(this.textBox4);
- this.groupBox3.Controls.Add(this.trackBar4);
- this.groupBox3.Controls.Add(this.trackBar3);
- this.groupBox3.Controls.Add(this.label7);
- this.groupBox3.Controls.Add(this.label8);
- this.groupBox3.Controls.Add(this.label9);
- this.groupBox3.Controls.Add(this.label10);
- this.groupBox3.Controls.Add(this.label11);
- this.groupBox3.Controls.Add(this.label12);
- this.groupBox3.Location = new System.Drawing.Point(12, 198);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(500, 116);
- this.groupBox3.TabIndex = 28;
- this.groupBox3.TabStop = false;
- //
- // panel4
- //
- this.panel4.Location = new System.Drawing.Point(62, 24);
- this.panel4.Name = "panel4";
- this.panel4.Size = new System.Drawing.Size(102, 22);
- this.panel4.TabIndex = 25;
- this.panel4.Click += new System.EventHandler(this.panel4_Click);
- //
- // panel5
- //
- this.panel5.Controls.Add(this.radioButton5);
- this.panel5.Controls.Add(this.radioButton6);
- this.panel5.Location = new System.Drawing.Point(368, 65);
- this.panel5.Name = "panel5";
- this.panel5.Size = new System.Drawing.Size(115, 30);
- this.panel5.TabIndex = 24;
- //
- // radioButton5
- //
- this.radioButton5.AutoSize = true;
- this.radioButton5.Location = new System.Drawing.Point(62, 6);
- this.radioButton5.Name = "radioButton5";
- this.radioButton5.Size = new System.Drawing.Size(47, 16);
- this.radioButton5.TabIndex = 1;
- this.radioButton5.TabStop = true;
- this.radioButton5.UseVisualStyleBackColor = true;
- //
- // radioButton6
- //
- this.radioButton6.AutoSize = true;
- this.radioButton6.Location = new System.Drawing.Point(9, 6);
- this.radioButton6.Name = "radioButton6";
- this.radioButton6.Size = new System.Drawing.Size(47, 16);
- this.radioButton6.TabIndex = 0;
- this.radioButton6.TabStop = true;
- this.radioButton6.UseVisualStyleBackColor = true;
- //
- // panel6
- //
- this.panel6.Controls.Add(this.radioButton7);
- this.panel6.Controls.Add(this.radioButton8);
- this.panel6.Location = new System.Drawing.Point(368, 20);
- this.panel6.Name = "panel6";
- this.panel6.Size = new System.Drawing.Size(115, 30);
- this.panel6.TabIndex = 23;
- //
- // radioButton7
- //
- this.radioButton7.AutoSize = true;
- this.radioButton7.Location = new System.Drawing.Point(62, 6);
- this.radioButton7.Name = "radioButton7";
- this.radioButton7.Size = new System.Drawing.Size(47, 16);
- this.radioButton7.TabIndex = 1;
- this.radioButton7.TabStop = true;
- this.radioButton7.UseVisualStyleBackColor = true;
- //
- // radioButton8
- //
- this.radioButton8.AutoSize = true;
- this.radioButton8.Location = new System.Drawing.Point(9, 6);
- this.radioButton8.Name = "radioButton8";
- this.radioButton8.Size = new System.Drawing.Size(47, 16);
- this.radioButton8.TabIndex = 0;
- this.radioButton8.TabStop = true;
- this.radioButton8.UseVisualStyleBackColor = true;
- //
- // textBox5
- //
- this.textBox5.Location = new System.Drawing.Point(129, 68);
- this.textBox5.Name = "textBox5";
- this.textBox5.Size = new System.Drawing.Size(31, 21);
- this.textBox5.TabIndex = 33;
- this.textBox5.Text = "1";
- this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
- //
- // trackBar5
- //
- this.trackBar5.LargeChange = 1;
- this.trackBar5.Location = new System.Drawing.Point(55, 68);
- this.trackBar5.Maximum = 50;
- this.trackBar5.Minimum = 1;
- this.trackBar5.Name = "trackBar5";
- this.trackBar5.Size = new System.Drawing.Size(78, 45);
- this.trackBar5.TabIndex = 33;
- this.trackBar5.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar5.Value = 1;
- this.trackBar5.ValueChanged += new System.EventHandler(this.trackBar5_ValueChanged);
- //
- // textBox3
- //
- this.textBox3.Location = new System.Drawing.Point(299, 68);
- this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(31, 21);
- this.textBox3.TabIndex = 31;
- this.textBox3.Text = "1";
- this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
- //
- // textBox4
- //
- this.textBox4.Location = new System.Drawing.Point(299, 23);
- this.textBox4.Name = "textBox4";
- this.textBox4.Size = new System.Drawing.Size(31, 21);
- this.textBox4.TabIndex = 32;
- this.textBox4.Text = "1";
- this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
- //
- // trackBar4
- //
- this.trackBar4.LargeChange = 1;
- this.trackBar4.Location = new System.Drawing.Point(225, 23);
- this.trackBar4.Maximum = 50;
- this.trackBar4.Minimum = 1;
- this.trackBar4.Name = "trackBar4";
- this.trackBar4.Size = new System.Drawing.Size(78, 45);
- this.trackBar4.TabIndex = 32;
- this.trackBar4.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar4.Value = 1;
- this.trackBar4.ValueChanged += new System.EventHandler(this.trackBar4_ValueChanged);
- //
- // trackBar3
- //
- this.trackBar3.LargeChange = 1;
- this.trackBar3.Location = new System.Drawing.Point(225, 68);
- this.trackBar3.Maximum = 50;
- this.trackBar3.Minimum = 1;
- this.trackBar3.Name = "trackBar3";
- this.trackBar3.Size = new System.Drawing.Size(78, 45);
- this.trackBar3.TabIndex = 31;
- this.trackBar3.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar3.Value = 1;
- this.trackBar3.ValueChanged += new System.EventHandler(this.trackBar3_ValueChanged);
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(332, 72);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(41, 12);
- this.label7.TabIndex = 22;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(332, 28);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(41, 12);
- this.label8.TabIndex = 21;
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(170, 72);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(65, 12);
- this.label9.TabIndex = 20;
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(194, 28);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(41, 12);
- this.label10.TabIndex = 19;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(23, 72);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(41, 12);
- this.label11.TabIndex = 18;
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(23, 28);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(41, 12);
- this.label12.TabIndex = 17;
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.textBox7);
- this.groupBox4.Controls.Add(this.textBox8);
- this.groupBox4.Controls.Add(this.textBox6);
- this.groupBox4.Controls.Add(this.trackBar8);
- this.groupBox4.Controls.Add(this.trackBar7);
- this.groupBox4.Controls.Add(this.trackBar6);
- this.groupBox4.Controls.Add(this.panel7);
- this.groupBox4.Controls.Add(this.panel8);
- this.groupBox4.Controls.Add(this.panel9);
- this.groupBox4.Controls.Add(this.label13);
- this.groupBox4.Controls.Add(this.label14);
- this.groupBox4.Controls.Add(this.label15);
- this.groupBox4.Controls.Add(this.label16);
- this.groupBox4.Controls.Add(this.label17);
- this.groupBox4.Controls.Add(this.label18);
- this.groupBox4.Location = new System.Drawing.Point(12, 334);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(500, 119);
- this.groupBox4.TabIndex = 28;
- this.groupBox4.TabStop = false;
- //
- // textBox7
- //
- this.textBox7.Location = new System.Drawing.Point(299, 25);
- this.textBox7.Name = "textBox7";
- this.textBox7.Size = new System.Drawing.Size(31, 21);
- this.textBox7.TabIndex = 35;
- this.textBox7.Text = "1";
- this.textBox7.TextChanged += new System.EventHandler(this.textBox7_TextChanged);
- //
- // textBox8
- //
- this.textBox8.Location = new System.Drawing.Point(129, 68);
- this.textBox8.Name = "textBox8";
- this.textBox8.Size = new System.Drawing.Size(31, 21);
- this.textBox8.TabIndex = 36;
- this.textBox8.Text = "1";
- this.textBox8.TextChanged += new System.EventHandler(this.textBox8_TextChanged);
- //
- // textBox6
- //
- this.textBox6.Location = new System.Drawing.Point(299, 70);
- this.textBox6.Name = "textBox6";
- this.textBox6.Size = new System.Drawing.Size(31, 21);
- this.textBox6.TabIndex = 34;
- this.textBox6.Text = "1";
- this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
- //
- // trackBar8
- //
- this.trackBar8.LargeChange = 1;
- this.trackBar8.Location = new System.Drawing.Point(55, 68);
- this.trackBar8.Maximum = 50;
- this.trackBar8.Minimum = 1;
- this.trackBar8.Name = "trackBar8";
- this.trackBar8.Size = new System.Drawing.Size(78, 45);
- this.trackBar8.TabIndex = 36;
- this.trackBar8.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar8.Value = 1;
- this.trackBar8.ValueChanged += new System.EventHandler(this.trackBar8_ValueChanged);
- //
- // trackBar7
- //
- this.trackBar7.LargeChange = 1;
- this.trackBar7.Location = new System.Drawing.Point(225, 25);
- this.trackBar7.Maximum = 50;
- this.trackBar7.Minimum = 1;
- this.trackBar7.Name = "trackBar7";
- this.trackBar7.Size = new System.Drawing.Size(78, 45);
- this.trackBar7.TabIndex = 35;
- this.trackBar7.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar7.Value = 1;
- this.trackBar7.ValueChanged += new System.EventHandler(this.trackBar7_ValueChanged);
- //
- // trackBar6
- //
- this.trackBar6.LargeChange = 1;
- this.trackBar6.Location = new System.Drawing.Point(225, 69);
- this.trackBar6.Maximum = 50;
- this.trackBar6.Minimum = 1;
- this.trackBar6.Name = "trackBar6";
- this.trackBar6.Size = new System.Drawing.Size(78, 45);
- this.trackBar6.TabIndex = 34;
- this.trackBar6.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackBar6.Value = 1;
- this.trackBar6.ValueChanged += new System.EventHandler(this.trackBar6_ValueChanged);
- //
- // panel7
- //
- this.panel7.Location = new System.Drawing.Point(62, 24);
- this.panel7.Name = "panel7";
- this.panel7.Size = new System.Drawing.Size(102, 22);
- this.panel7.TabIndex = 25;
- this.panel7.Click += new System.EventHandler(this.panel7_Click);
- //
- // panel8
- //
- this.panel8.Controls.Add(this.radioButton9);
- this.panel8.Controls.Add(this.radioButton10);
- this.panel8.Location = new System.Drawing.Point(368, 65);
- this.panel8.Name = "panel8";
- this.panel8.Size = new System.Drawing.Size(115, 30);
- this.panel8.TabIndex = 24;
- //
- // radioButton9
- //
- this.radioButton9.AutoSize = true;
- this.radioButton9.Location = new System.Drawing.Point(62, 6);
- this.radioButton9.Name = "radioButton9";
- this.radioButton9.Size = new System.Drawing.Size(47, 16);
- this.radioButton9.TabIndex = 1;
- this.radioButton9.TabStop = true;
- this.radioButton9.UseVisualStyleBackColor = true;
- //
- // radioButton10
- //
- this.radioButton10.AutoSize = true;
- this.radioButton10.Location = new System.Drawing.Point(9, 6);
- this.radioButton10.Name = "radioButton10";
- this.radioButton10.Size = new System.Drawing.Size(47, 16);
- this.radioButton10.TabIndex = 0;
- this.radioButton10.TabStop = true;
- this.radioButton10.UseVisualStyleBackColor = true;
- //
- // panel9
- //
- this.panel9.Controls.Add(this.radioButton11);
- this.panel9.Controls.Add(this.radioButton12);
- this.panel9.Location = new System.Drawing.Point(368, 20);
- this.panel9.Name = "panel9";
- this.panel9.Size = new System.Drawing.Size(115, 30);
- this.panel9.TabIndex = 23;
- //
- // radioButton11
- //
- this.radioButton11.AutoSize = true;
- this.radioButton11.Location = new System.Drawing.Point(62, 6);
- this.radioButton11.Name = "radioButton11";
- this.radioButton11.Size = new System.Drawing.Size(47, 16);
- this.radioButton11.TabIndex = 1;
- this.radioButton11.TabStop = true;
- this.radioButton11.UseVisualStyleBackColor = true;
- //
- // radioButton12
- //
- this.radioButton12.AutoSize = true;
- this.radioButton12.Location = new System.Drawing.Point(9, 6);
- this.radioButton12.Name = "radioButton12";
- this.radioButton12.Size = new System.Drawing.Size(47, 16);
- this.radioButton12.TabIndex = 0;
- this.radioButton12.TabStop = true;
- this.radioButton12.UseVisualStyleBackColor = true;
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(332, 72);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(41, 12);
- this.label13.TabIndex = 22;
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(332, 28);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(41, 12);
- this.label14.TabIndex = 21;
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(170, 72);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(65, 12);
- this.label15.TabIndex = 20;
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(194, 28);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(41, 12);
- this.label16.TabIndex = 19;
- //
- // label17
- //
- this.label17.AutoSize = true;
- this.label17.Location = new System.Drawing.Point(23, 72);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(41, 12);
- this.label17.TabIndex = 18;
- //
- // label18
- //
- this.label18.AutoSize = true;
- this.label18.Location = new System.Drawing.Point(23, 28);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(41, 12);
- this.label18.TabIndex = 17;
- //
- // GrainSurveyPointStyleSettingDialog
- //
- this.ClientSize = new System.Drawing.Size(522, 459);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.Name = "GrainSurveyPointStyleSettingDialog";
- this.groupBox1.ResumeLayout(false);
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar9)).EndInit();
- this.panel2.ResumeLayout(false);
- this.panel2.PerformLayout();
- this.panel1.ResumeLayout(false);
- this.panel1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.panel5.ResumeLayout(false);
- this.panel5.PerformLayout();
- this.panel6.ResumeLayout(false);
- this.panel6.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar5)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar4)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar8)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar7)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackBar6)).EndInit();
- this.panel8.ResumeLayout(false);
- this.panel8.PerformLayout();
- this.panel9.ResumeLayout(false);
- this.panel9.PerformLayout();
- this.ResumeLayout(false);
- }
- #endregion
- /// <summary>
- /// Xml获取初始数据
- /// </summary>
- private void GetFromXml()
- {
- GrainCutOffPointStyleModel grainCutOffPointStyleModel = XmlSerializeHelper.DESerializer<GrainCutOffPointStyleModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\GrainSizeAnalyze\\GrainCutOffPointStyleModel.xml", FileMode.Open));
- if (grainCutOffPointStyleModel.CutOffPointStyle1 != null
- && grainCutOffPointStyleModel.CutOffPointStyle2 != null
- && grainCutOffPointStyleModel.CutOffPointStyle3 != null)
- {
- // 0.5截点
- this.panel3.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle1.pointColor);
- this.trackBar1.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointWidth;
- if (grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle == 0)
- this.radioButton1.Checked = true;
- else
- this.radioButton2.Checked = true;
- this.trackBar9.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointDiameter;
- this.trackBar2.Value = grainCutOffPointStyleModel.CutOffPointStyle1.pointError;
- if (grainCutOffPointStyleModel.CutOffPointStyle1.pointshape == 0)
- this.radioButton4.Checked = true;
- else
- this.radioButton3.Checked = true;
- // 1截点
- this.panel4.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle2.pointColor);
- this.trackBar4.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointWidth;
- if (grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle == 0)
- this.radioButton8.Checked = true;
- else
- this.radioButton7.Checked = true;
- this.trackBar5.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointDiameter;
- this.trackBar3.Value = grainCutOffPointStyleModel.CutOffPointStyle2.pointError;
- if (grainCutOffPointStyleModel.CutOffPointStyle2.pointshape == 0)
- this.radioButton6.Checked = true;
- else
- this.radioButton5.Checked = true;
- // 1.5/2截点
- this.panel7.BackColor = Color.FromArgb(grainCutOffPointStyleModel.CutOffPointStyle3.pointColor);
- this.trackBar7.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointWidth;
- if (grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle == 0)
- this.radioButton12.Checked = true;
- else
- this.radioButton11.Checked = true;
- this.trackBar8.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointDiameter;
- this.trackBar6.Value = grainCutOffPointStyleModel.CutOffPointStyle3.pointError;
- if (grainCutOffPointStyleModel.CutOffPointStyle3.pointshape == 0)
- this.radioButton10.Checked = true;
- else
- this.radioButton9.Checked = true;
- }
- }
- private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
- {
- }
- private void panel3_Click(object sender, EventArgs e)
- {
- this.colorsForm1.UserPrimaryColor = ColorBgra.FromColor(this.panel3.BackColor);
- this.colorsForm1.setSaveBtn_Click(new System.EventHandler(this.panel3Changed));
- this.colorsForm1.ShowDialog();
- }
- private void panel3Changed(object sender, EventArgs e)
- {
- this.panel3.BackColor = this.colorsForm1.UserPrimaryColor.ToColor();
- this.colorsForm1.Close();
- }
- private void panel4_Click(object sender, EventArgs e)
- {
- this.colorsForm2.UserPrimaryColor = ColorBgra.FromColor(this.panel4.BackColor);
- this.colorsForm2.setSaveBtn_Click(new System.EventHandler(this.panel4Changed));
- this.colorsForm2.ShowDialog();
- }
- private void panel4Changed(object sender, EventArgs e)
- {
- this.panel4.BackColor = this.colorsForm2.UserPrimaryColor.ToColor();
- this.colorsForm2.Close();
- }
- private void panel7_Click(object sender, EventArgs e)
- {
- this.colorsForm3.UserPrimaryColor = ColorBgra.FromColor(this.panel7.BackColor);
- this.colorsForm3.setSaveBtn_Click(new System.EventHandler(this.panel7Changed));
- this.colorsForm3.ShowDialog();
- }
- private void panel7Changed(object sender, EventArgs e)
- {
- this.panel7.BackColor = this.colorsForm3.UserPrimaryColor.ToColor();
- this.colorsForm3.Close();
- }
- /// <summary>
- /// 关闭按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 保存按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void button2_Click(object sender, EventArgs e)
- {
- GrainCutOffPointStyleModel grainCutOffPointStyleModel = new GrainCutOffPointStyleModel();
- grainCutOffPointStyleModel.CutOffPointStyle1 = new GrainCutOffPointStyleModel.CutOffPointStyle();
- grainCutOffPointStyleModel.CutOffPointStyle2 = new GrainCutOffPointStyleModel.CutOffPointStyle();
- grainCutOffPointStyleModel.CutOffPointStyle3 = new GrainCutOffPointStyleModel.CutOffPointStyle();
- // 0.5截点
- grainCutOffPointStyleModel.CutOffPointStyle1.pointColor = Convert.ToInt32(this.panel3.BackColor.ToArgb());
- grainCutOffPointStyleModel.CutOffPointStyle1.pointWidth = Convert.ToInt32(this.trackBar1.Value);
- if (this.radioButton1.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle = 0;
- else if (this.radioButton2.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle1.pointStyle = 1;
- grainCutOffPointStyleModel.CutOffPointStyle1.pointDiameter = Convert.ToInt32(this.trackBar9.Value);
- grainCutOffPointStyleModel.CutOffPointStyle1.pointError = Convert.ToInt32(this.trackBar2.Value);
- if (this.radioButton4.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle1.pointshape = 0;
- else if (this.radioButton3.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle1.pointshape = 1;
- // 1截点
- grainCutOffPointStyleModel.CutOffPointStyle2.pointColor = Convert.ToInt32(this.panel4.BackColor.ToArgb());
- grainCutOffPointStyleModel.CutOffPointStyle2.pointWidth = Convert.ToInt32(this.trackBar4.Value);
- if (this.radioButton8.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle = 0;
- else if (this.radioButton7.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle2.pointStyle = 1;
- grainCutOffPointStyleModel.CutOffPointStyle2.pointDiameter = Convert.ToInt32(this.trackBar5.Value);
- grainCutOffPointStyleModel.CutOffPointStyle2.pointError = Convert.ToInt32(this.trackBar3.Value);
- if (this.radioButton6.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle2.pointshape = 0;
- else if (this.radioButton5.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle2.pointshape = 1;
- // 1.5/2截点
- grainCutOffPointStyleModel.CutOffPointStyle3.pointColor = Convert.ToInt32(this.panel7.BackColor.ToArgb());
- grainCutOffPointStyleModel.CutOffPointStyle3.pointWidth = Convert.ToInt32(this.trackBar7.Value);
- if (this.radioButton12.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle = 0;
- else if (this.radioButton11.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle3.pointStyle = 1;
- grainCutOffPointStyleModel.CutOffPointStyle3.pointDiameter = Convert.ToInt32(this.trackBar8.Value);
- grainCutOffPointStyleModel.CutOffPointStyle3.pointError = Convert.ToInt32(this.trackBar6.Value);
- if (this.radioButton10.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle3.pointshape = 0;
- else if (this.radioButton9.Checked)
- grainCutOffPointStyleModel.CutOffPointStyle3.pointshape = 1;
- //以下保存xml文件信息
- string stageModelXml = XmlSerializeHelper.XmlSerialize<GrainCutOffPointStyleModel>(grainCutOffPointStyleModel);
- string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\GrainSizeAnalyze\\GrainCutOffPointStyleModel.xml";
- if (FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create))
- {
- MessageBox.Show(PdnResources.GetString("Menu.Successfullysaved.text") + "!");
- }
- if (this.Owner is GBT6394.MethodCutOffDialog)
- {
- GBT6394.MethodCutOffDialog grainSizeDialog = (GBT6394.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is E112.MethodCutOffDialog)
- {
- E112.MethodCutOffDialog grainSizeDialog = (E112.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is GBT24177.MethodCutOffDialog)
- {
- GBT24177.MethodCutOffDialog grainSizeDialog = (GBT24177.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is GBT4335.MethodCutOffDialog)
- {
- GBT4335.MethodCutOffDialog grainSizeDialog = (GBT4335.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is ISO643.MethodCutOffDialog)
- {
- ISO643.MethodCutOffDialog grainSizeDialog = (ISO643.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is GBT32461.MethodCutOffDialog)
- {
- GBT32461.MethodCutOffDialog grainSizeDialog = (GBT32461.MethodCutOffDialog)this.Owner;//###
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is GBT4296.MethodCutOffDialog)
- {
- GBT4296.MethodCutOffDialog grainSizeDialog = (GBT4296.MethodCutOffDialog)this.Owner;
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- else if (this.Owner is YST347.MethodCutOffDialog)
- {
- YST347.MethodCutOffDialog grainSizeDialog = (YST347.MethodCutOffDialog)this.Owner;
- grainSizeDialog.UpdateCupOffPointStyle();
- }
- }
- private void trackBar1_ValueChanged(object sender, EventArgs e)
- {
- this.textBox1.Text = this.trackBar1.Value.ToString();
- }
- private void trackBar9_ValueChanged(object sender, EventArgs e)
- {
- this.textBox9.Text = this.trackBar9.Value.ToString();//0916###18751
- }
- private void trackBar2_ValueChanged(object sender, EventArgs e)
- {
- this.textBox2.Text = this.trackBar2.Value.ToString();
- }
- private void trackBar4_ValueChanged(object sender, EventArgs e)
- {
- this.textBox4.Text = this.trackBar4.Value.ToString();
- }
- private void trackBar5_ValueChanged(object sender, EventArgs e)
- {
- this.textBox5.Text = this.trackBar5.Value.ToString();
- }
- private void trackBar3_ValueChanged(object sender, EventArgs e)
- {
- this.textBox3.Text = this.trackBar3.Value.ToString();
- }
- private void trackBar7_ValueChanged(object sender, EventArgs e)
- {
- this.textBox7.Text = this.trackBar7.Value.ToString();
- }
- private void trackBar8_ValueChanged(object sender, EventArgs e)
- {
- this.textBox8.Text = this.trackBar8.Value.ToString();
- }
- private void trackBar6_ValueChanged(object sender, EventArgs e)
- {
- this.textBox6.Text = this.trackBar6.Value.ToString();
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox1.Text);
- if (val >= this.trackBar1.Minimum && val <= this.trackBar1.Maximum)
- {
- this.trackBar1.Value = val;
- }
- else if (val < this.trackBar1.Minimum)
- {
- this.trackBar1.Value = this.trackBar1.Minimum;
- this.textBox1.Text = this.trackBar1.Minimum.ToString();
- }
- else
- {
- this.trackBar1.Value = this.trackBar1.Maximum;
- this.textBox1.Text = this.trackBar1.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar1.Value = this.trackBar1.Minimum;
- this.textBox1.Text = this.trackBar1.Minimum.ToString();
- }
- }
- private void textBox9_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox9.Text);
- if (val >= this.trackBar9.Minimum && val <= this.trackBar9.Maximum)
- {
- this.trackBar9.Value = val;
- }
- else if (val < this.trackBar9.Minimum)
- {
- this.trackBar9.Value = this.trackBar9.Minimum;
- this.textBox9.Text = this.trackBar9.Minimum.ToString();
- }
- else
- {
- this.trackBar9.Value = this.trackBar9.Maximum;
- this.textBox9.Text = this.trackBar9.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar9.Value = this.trackBar9.Minimum;
- this.textBox9.Text = this.trackBar9.Minimum.ToString();
- }
- }
- private void textBox2_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox2.Text);
- if (val >= this.trackBar2.Minimum && val <= this.trackBar2.Maximum)
- {
- this.trackBar2.Value = val;
- }
- else if (val < this.trackBar2.Minimum) {
- this.trackBar2.Value = this.trackBar2.Minimum;
- this.textBox2.Text = this.trackBar2.Minimum.ToString();
- } else {
- this.trackBar2.Value = this.trackBar2.Maximum;
- this.textBox2.Text = this.trackBar2.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar2.Value = this.trackBar2.Minimum;
- this.textBox2.Text = this.trackBar2.Minimum.ToString();
- }
- }
- private void textBox4_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox4.Text);
- if (val >= this.trackBar4.Minimum && val <= this.trackBar4.Maximum)
- {
- this.trackBar4.Value = val;
- }
- else if (val < this.trackBar4.Minimum)
- {
- this.trackBar4.Value = this.trackBar4.Minimum;
- this.textBox4.Text = this.trackBar4.Minimum.ToString();
- }
- else
- {
- this.trackBar4.Value = this.trackBar4.Maximum;
- this.textBox4.Text = this.trackBar4.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar4.Value = this.trackBar4.Minimum;
- this.textBox4.Text = this.trackBar4.Minimum.ToString();
- }
- }
- private void textBox5_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox5.Text);
- if (val >= this.trackBar5.Minimum && val <= this.trackBar5.Maximum)
- {
- this.trackBar5.Value = val;
- }
- else if (val < this.trackBar5.Minimum)
- {
- this.trackBar5.Value = this.trackBar5.Minimum;
- this.textBox5.Text = this.trackBar5.Minimum.ToString();
- }
- else
- {
- this.trackBar5.Value = this.trackBar5.Maximum;
- this.textBox5.Text = this.trackBar5.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar5.Value = this.trackBar5.Minimum;
- this.textBox5.Text = this.trackBar5.Minimum.ToString();
- }
- }
- private void textBox3_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox3.Text);
- if (val >= this.trackBar3.Minimum && val <= this.trackBar3.Maximum)
- {
- this.trackBar3.Value = val;
- }
- else if (val < this.trackBar3.Minimum)
- {
- this.trackBar3.Value = this.trackBar3.Minimum;
- this.textBox3.Text = this.trackBar3.Minimum.ToString();
- }
- else
- {
- this.trackBar3.Value = this.trackBar3.Maximum;
- this.textBox3.Text = this.trackBar3.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar3.Value = this.trackBar3.Minimum;
- this.textBox3.Text = this.trackBar3.Minimum.ToString();
- }
- }
- private void textBox7_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox7.Text);
- if (val >= this.trackBar7.Minimum && val <= this.trackBar7.Maximum)
- {
- this.trackBar7.Value = val;
- }
- else if (val < this.trackBar7.Minimum)
- {
- this.trackBar7.Value = this.trackBar7.Minimum;
- this.textBox7.Text = this.trackBar7.Minimum.ToString();
- }
- else
- {
- this.trackBar7.Value = this.trackBar7.Maximum;
- this.textBox7.Text = this.trackBar7.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar7.Value = this.trackBar7.Minimum;
- this.textBox7.Text = this.trackBar7.Minimum.ToString();
- }
- }
- private void textBox8_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox8.Text);
- if (val >= this.trackBar8.Minimum && val <= this.trackBar8.Maximum)
- {
- this.trackBar8.Value = val;
- }
- else if (val < this.trackBar8.Minimum)
- {
- this.trackBar8.Value = this.trackBar8.Minimum;
- this.textBox8.Text = this.trackBar8.Minimum.ToString();
- }
- else
- {
- this.trackBar8.Value = this.trackBar8.Maximum;
- this.textBox8.Text = this.trackBar8.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar8.Value = this.trackBar8.Minimum;
- this.textBox8.Text = this.trackBar8.Minimum.ToString();
- }
- }
- private void textBox6_TextChanged(object sender, EventArgs e)
- {
- try
- {
- int val = Convert.ToInt32(this.textBox6.Text);
- if (val >= this.trackBar6.Minimum && val <= this.trackBar6.Maximum)
- {
- this.trackBar6.Value = val;
- }
- else if (val < this.trackBar6.Minimum)
- {
- this.trackBar6.Value = this.trackBar6.Minimum;
- this.textBox6.Text = this.trackBar6.Minimum.ToString();
- }
- else
- {
- this.trackBar6.Value = this.trackBar6.Maximum;
- this.textBox6.Text = this.trackBar6.Maximum.ToString();
- }
- }
- catch (Exception ex)
- {
- this.trackBar6.Value = this.trackBar6.Minimum;
- this.textBox6.Text = this.trackBar6.Minimum.ToString();
- }
- }
- }
- }
|