using PaintDotNet.Annotation.Enum; using PaintDotNet.Annotation.relationModel; using PaintDotNet.Base.SettingModel; using PaintDotNet.Base.CommTool; using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Windows.Forms; using PaintDotNet.Annotation; using PaintDotNet.Base; namespace PaintDotNet.Setting { internal class MeasureSettingDialog : PdnBaseForm { /// /// 测量一二级关系 /// private static List list; /// /// 当前选中的二级标注 /// private DrawToolType drawToolType; /// /// 测量的样式 /// private MeasureStyleModel measureStyleModel = Startup.instance.measureStyleModel; /// /// 主配置文件的model /// private ConfigModel configModel = Startup.instance.configModel; /// /// 操作区控件 /// private GroupBox groupBox1; private Label label1; private ComboBox comboBox1; private Button button4; private Button button3; private Button button2; private ListBox listBox1; private GroupBox groupBox3; private ConfigModel config = Startup.instance.configModel; private Button button5; /// /// 字体列表 /// ArrayList fontsItems = new ArrayList(); /// /// 另存为弹出框显示 /// private CreateNameDialog dialog; /// /// 操作样式下拉数据 /// private List files = new List(); /// /// 另存为文件名 /// private string newName; /// /// 选中的测量类型 /// private int selectId; PaintDotNet.ColorsForm colorsForm; PaintDotNet.ColorsForm colorsForm1; PaintDotNet.ColorsForm colorsForm2; PaintDotNet.ColorsForm colorsForm3; PaintDotNet.ColorsForm colorsForm4; PaintDotNet.ColorsForm colorsForm5; private Button button6; private int initflag = 0; private NumericUpDown numericUpDown71; private Label label71; private GroupBox groupBox4; private Panel panel1; private Label label11; private ComboBox comboBox11; private Label label21; private ComboBox comboBox91; private Label label91; private Label label31; private Panel textPanel; private Label label41; private Panel linePanel; private Label label51; private Label label61; private NumericUpDown numericUpDown21; private ComboBox comboBox21; private NumericUpDown numericUpDown11; private Panel panel2; private ComboBox comboBox2; private Label label2; private Panel panel3; private ComboBox comboBox4; private Label label4; private ComboBox comboBox3; private Label label3; private Label label5; private NumericUpDown numericUpDown1; private Label label6; private ComboBox comboBox5; private GroupBox groupBox2; private Label label8; private Label label7; private Label label9; private ComboBox comboBox6; private TextBox textBox2; private TextBox textBox1; private ComboBox comboBox8; private Label label12; private ComboBox comboBox7; private Label label10; private Panel panel5; private Panel panel4; private NumericUpDown numericUpDown2; private ComboBox comboBox9; private Label label19; private Label label17; private Label label16; private Label label15; private GroupBox groupBox5; private NumericUpDown numericUpDown3; private Label label24; private NumericUpDown numericUpDown4; private ComboBox comboBox18; private NumericUpDown numericUpDown5; private Label label28; private Label label29; private Panel panel8; private Label label30; private Panel panel9; private Label label32; private Label label34; private ComboBox comboBox20; private Label label35; private CheckBox checkbox1; private AppWorkspace appWorkspace; public MeasureSettingDialog(AppWorkspace appWorkspace) { if (list == null) { list = InvariantData.GetMeasureRelations(); } this.appWorkspace = appWorkspace; InitializeComponent(); InitializeLanguageText(); InitializeComponent2(); //绑定线样式数据 this.comboBox21.Items.AddRange(InvariantData.dashStyles); this.comboBox18.Items.AddRange(InvariantData.dashStyles); InitializeData(); } private void InitializeLanguageText() { this.label1.Text = PdnResources.GetString("Menu.Currentoperationstyle.text") + ":"; this.button4.Text = PdnResources.GetString("Menu.Edit.Delete.Text"); this.button3.Text = PdnResources.GetString("Menu.File.SaveAs.Text"); this.button2.Text = PdnResources.GetString("Menu.File.Save.Text"); this.groupBox2.Text = PdnResources.GetString("Menu.Setting.Text"); this.groupBox4.Text = PdnResources.GetString("Menu.Setting.Text"); this.label71.Text = PdnResources.GetString("Markpointsize.Text") + ":"; this.label91.Text = PdnResources.GetString("AngleUnit.Text") + ":"; this.label7.Text = PdnResources.GetString("Alias.Text") + ":"; this.label8.Text = PdnResources.GetString("Menu.file.Batchsaving.postfix.text") + ":"; this.label9.Text = PdnResources.GetString("ShowAlias") + ":"; this.label10.Text = PdnResources.GetString("ShowSuffix") + ":"; this.label12.Text = PdnResources.GetString("ShowNumber") + ":"; this.label5.Text = PdnResources.GetString("VerticalLength") + ":"; this.label6.Text = PdnResources.GetString("TextDirection") + ":"; this.comboBox3.Items.AddRange(new object[] { PdnResources.GetString("Menu.Upperleft.text"), PdnResources.GetString("Menu.Uppermiddle.Text"), PdnResources.GetString("Menu.Upperright.text"), PdnResources.GetString("Menu.Lowerleft.text"), PdnResources.GetString("Menu.Themiddleandlower.Text"), PdnResources.GetString("Menu.Lowerright.text")}); this.comboBox91.Items.AddRange(new object[] { PdnResources.GetString("Menu.degree.Text"), PdnResources.GetString("mil")}); this.comboBox4.Items.AddRange(new object[] { PdnResources.GetString("Menu.Upperleft.text"), PdnResources.GetString("Menu.Uppermiddle.Text"), PdnResources.GetString("Menu.Upperright.text"), PdnResources.GetString("Menu.Lowerleft.text"), PdnResources.GetString("Menu.Themiddleandlower.Text"), PdnResources.GetString("Menu.Lowerright.text")}); this.label4.Text = PdnResources.GetString("Menu.Set.Rulersettings.Textposition.text") + "(" + PdnResources.GetString("Menu.Generalanalysis.Integrator.point.text") + "):"; this.label3.Text = PdnResources.GetString("Menu.Textpositionli.Text") + ":"; this.label2.Text = PdnResources.GetString("Menu.Set.Rulersettings.Textposition.text") + ":"; this.label61.Text = PdnResources.GetString("Menu.Linestyle.Text") + ":"; this.label51.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linewidth.text") + ":"; this.label41.Text = PdnResources.GetString("Menu.Set.Rulersettings.Linecolor.text") + ":"; this.label31.Text = PdnResources.GetString("Menu.Textcolor.text") + ":"; this.label21.Text = PdnResources.GetString("Menu.Set.Rulersettings.Fontsize.text") + ":"; this.label11.Text = PdnResources.GetString("Menu.Textfont.text") + ":"; this.button6.Text = PdnResources.GetString("Menu.File.SaveAll.Text"); this.groupBox3.Text = PdnResources.GetString("Menu.Type.text"); this.Text = PdnResources.GetString("Menu.Setting.MeasureSetting.Text"); this.groupBox1.Text = PdnResources.GetString("Menu.operation.text"); this.comboBox5.Items.AddRange(new object[] { PdnResources.GetString("Menu.Setting.MeasureSetting.FollowLine"), PdnResources.GetString("Menu.Level.text")}); this.comboBox8.Items.AddRange(new object[] { PdnResources.GetString("Menu.Yes.text"), PdnResources.GetString("Menu.no.text")}); this.comboBox7.Items.AddRange(new object[] { PdnResources.GetString("Menu.Yes.text"), PdnResources.GetString("Menu.no.text")}); this.comboBox6.Items.AddRange(new object[] { PdnResources.GetString("Menu.Yes.text"), PdnResources.GetString("Menu.no.text")}); } private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label1 = new System.Windows.Forms.Label(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.button4 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button6 = new System.Windows.Forms.Button(); this.listBox1 = new System.Windows.Forms.ListBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.button5 = new System.Windows.Forms.Button(); this.numericUpDown71 = new System.Windows.Forms.NumericUpDown(); this.label71 = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.checkbox1 = new System.Windows.Forms.CheckBox(); this.panel5 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel(); this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); this.comboBox9 = new System.Windows.Forms.ComboBox(); this.label19 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.label11 = new System.Windows.Forms.Label(); this.comboBox11 = new System.Windows.Forms.ComboBox(); this.label21 = new System.Windows.Forms.Label(); this.comboBox91 = new System.Windows.Forms.ComboBox(); this.label91 = new System.Windows.Forms.Label(); this.label31 = new System.Windows.Forms.Label(); this.textPanel = new System.Windows.Forms.Panel(); this.label41 = new System.Windows.Forms.Label(); this.linePanel = new System.Windows.Forms.Panel(); this.label51 = new System.Windows.Forms.Label(); this.label61 = new System.Windows.Forms.Label(); this.numericUpDown21 = new System.Windows.Forms.NumericUpDown(); this.comboBox21 = new System.Windows.Forms.ComboBox(); this.numericUpDown11 = new System.Windows.Forms.NumericUpDown(); this.panel2 = new System.Windows.Forms.Panel(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.label2 = new System.Windows.Forms.Label(); this.panel3 = new System.Windows.Forms.Panel(); this.comboBox4 = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); this.comboBox3 = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.label6 = new System.Windows.Forms.Label(); this.comboBox5 = new System.Windows.Forms.ComboBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.comboBox8 = new System.Windows.Forms.ComboBox(); this.label12 = new System.Windows.Forms.Label(); this.comboBox7 = new System.Windows.Forms.ComboBox(); this.label10 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.comboBox6 = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); this.label24 = new System.Windows.Forms.Label(); this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); this.comboBox18 = new System.Windows.Forms.ComboBox(); this.numericUpDown5 = new System.Windows.Forms.NumericUpDown(); this.label28 = new System.Windows.Forms.Label(); this.label29 = new System.Windows.Forms.Label(); this.panel8 = new System.Windows.Forms.Panel(); this.label30 = new System.Windows.Forms.Label(); this.panel9 = new System.Windows.Forms.Panel(); this.label32 = new System.Windows.Forms.Label(); this.label34 = new System.Windows.Forms.Label(); this.comboBox20 = new System.Windows.Forms.ComboBox(); this.label35 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown71)).BeginInit(); this.groupBox4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown21)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).BeginInit(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.button4); this.groupBox1.Controls.Add(this.button3); this.groupBox1.Controls.Add(this.button2); this.groupBox1.Location = new System.Drawing.Point(137, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(716, 58); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "操作"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(172, 25); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(0, 12); this.label1.TabIndex = 5; // // comboBox1 // this.comboBox1.FormattingEnabled = true; this.comboBox1.Location = new System.Drawing.Point(351, 21); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(116, 20); this.comboBox1.TabIndex = 4; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // button4 // this.button4.Location = new System.Drawing.Point(473, 20); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 23); this.button4.TabIndex = 3; this.button4.Text = "删除"; this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.Button4_Click); // // button3 // this.button3.Location = new System.Drawing.Point(554, 20); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 23); this.button3.TabIndex = 2; this.button3.Text = "另存为"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.Button3_Click); // // button2 // this.button2.Location = new System.Drawing.Point(635, 20); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 1; this.button2.Text = "保存"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.Button2_Click); // // button6 // this.button6.Location = new System.Drawing.Point(778, 76); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(75, 23); this.button6.TabIndex = 17; this.button6.Text = "保存全部"; this.button6.UseVisualStyleBackColor = true; this.button6.Click += new System.EventHandler(this.button6_Click); // // listBox1 // this.listBox1.FormattingEnabled = true; this.listBox1.ItemHeight = 12; this.listBox1.Location = new System.Drawing.Point(6, 20); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(103, 484); this.listBox1.TabIndex = 0; this.listBox1.SelectedValueChanged += new System.EventHandler(this.listBox1_SelectedValueChanged); // // groupBox3 // this.groupBox3.Controls.Add(this.listBox1); this.groupBox3.Location = new System.Drawing.Point(12, 12); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(115, 511); this.groupBox3.TabIndex = 9; this.groupBox3.TabStop = false; this.groupBox3.Text = "类型"; // // button5 // this.button5.Location = new System.Drawing.Point(0, 0); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(75, 23); this.button5.TabIndex = 0; // // numericUpDown71 // this.numericUpDown71.Location = new System.Drawing.Point(136, 23); this.numericUpDown71.Maximum = new decimal(new int[] { 100000, 0, 0, 0}); this.numericUpDown71.Name = "numericUpDown71"; this.numericUpDown71.Size = new System.Drawing.Size(152, 21); this.numericUpDown71.TabIndex = 14; // // label71 // this.label71.Location = new System.Drawing.Point(7, 26); this.label71.Name = "label71"; this.label71.Size = new System.Drawing.Size(125, 13); this.label71.TabIndex = 0; this.label71.Text = "标记点大小:"; this.label71.TextAlign = System.Drawing.ContentAlignment.TopRight; // // groupBox4 // this.groupBox4.Controls.Add(this.checkbox1); this.groupBox4.Controls.Add(this.panel5); this.groupBox4.Controls.Add(this.panel4); this.groupBox4.Controls.Add(this.numericUpDown2); this.groupBox4.Controls.Add(this.comboBox9); this.groupBox4.Controls.Add(this.label19); this.groupBox4.Controls.Add(this.label17); this.groupBox4.Controls.Add(this.label16); this.groupBox4.Controls.Add(this.label15); this.groupBox4.Controls.Add(this.label71); this.groupBox4.Controls.Add(this.numericUpDown71); this.groupBox4.Location = new System.Drawing.Point(137, 76); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(716, 277); this.groupBox4.TabIndex = 6; this.groupBox4.TabStop = false; this.groupBox4.Text = "设置"; this.groupBox4.Visible = false; // // checkbox1 // this.checkbox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.checkbox1.AutoSize = true; this.checkbox1.Location = new System.Drawing.Point(137, 245); this.checkbox1.Name = "checkbox1"; this.checkbox1.Size = new System.Drawing.Size(78, 16); this.checkbox1.TabIndex = 33; this.checkbox1.Text = "跟随缩放 "; this.checkbox1.UseVisualStyleBackColor = true; // // panel5 // this.panel5.BackColor = System.Drawing.SystemColors.Window; this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel5.Location = new System.Drawing.Point(138, 113); this.panel5.Name = "panel5"; this.panel5.Size = new System.Drawing.Size(152, 20); this.panel5.TabIndex = 32; this.panel5.Click += new System.EventHandler(this.panel5Click); // // panel4 // this.panel4.BackColor = System.Drawing.SystemColors.Window; this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel4.Location = new System.Drawing.Point(138, 199); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(152, 20); this.panel4.TabIndex = 31; this.panel4.Click += new System.EventHandler(this.panel4Click); // // numericUpDown2 // this.numericUpDown2.Location = new System.Drawing.Point(138, 154); this.numericUpDown2.Maximum = new decimal(new int[] { 100000, 0, 0, 0}); this.numericUpDown2.Name = "numericUpDown2"; this.numericUpDown2.Size = new System.Drawing.Size(152, 21); this.numericUpDown2.TabIndex = 30; // // comboBox9 // this.comboBox9.FormattingEnabled = true; this.comboBox9.Location = new System.Drawing.Point(138, 67); this.comboBox9.Name = "comboBox9"; this.comboBox9.Size = new System.Drawing.Size(150, 20); this.comboBox9.TabIndex = 29; // // label19 // this.label19.AutoSize = true; this.label19.Location = new System.Drawing.Point(65, 203); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(65, 12); this.label19.TabIndex = 28; this.label19.Text = "填充颜色:"; // // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(65, 158); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(65, 12); this.label17.TabIndex = 27; this.label17.Text = "线条宽度:"; // // label16 // this.label16.AutoSize = true; this.label16.Location = new System.Drawing.Point(67, 117); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(65, 12); this.label16.TabIndex = 26; this.label16.Text = "线条颜色:"; // // label15 // this.label15.AutoSize = true; this.label15.Location = new System.Drawing.Point(55, 71); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(77, 12); this.label15.TabIndex = 25; this.label15.Text = "标记点样式:"; // // panel1 // this.panel1.Location = new System.Drawing.Point(137, 76); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(633, 36); this.panel1.TabIndex = 8; // // label11 // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(13, 23); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(65, 12); this.label11.TabIndex = 0; this.label11.Text = "文字字体:"; // // comboBox11 // this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox11.FormattingEnabled = true; this.comboBox11.Location = new System.Drawing.Point(91, 20); this.comboBox11.Name = "comboBox11"; this.comboBox11.Size = new System.Drawing.Size(152, 20); this.comboBox11.TabIndex = 1; // // label21 // this.label21.AutoSize = true; this.label21.Location = new System.Drawing.Point(13, 50); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(65, 12); this.label21.TabIndex = 2; this.label21.Text = "文字字号:"; // // comboBox91 // this.comboBox91.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox91.FormattingEnabled = true; this.comboBox91.Location = new System.Drawing.Point(91, 179); this.comboBox91.Name = "comboBox91"; this.comboBox91.Size = new System.Drawing.Size(152, 20); this.comboBox91.TabIndex = 15; // // label91 // this.label91.AutoSize = true; this.label91.Location = new System.Drawing.Point(14, 182); this.label91.Name = "label91"; this.label91.Size = new System.Drawing.Size(65, 12); this.label91.TabIndex = 14; this.label91.Text = "角度单位:"; // // label31 // this.label31.AutoSize = true; this.label31.Location = new System.Drawing.Point(13, 76); this.label31.Name = "label31"; this.label31.Size = new System.Drawing.Size(65, 12); this.label31.TabIndex = 4; this.label31.Text = "文字颜色:"; // // textPanel // this.textPanel.BackColor = System.Drawing.SystemColors.Window; this.textPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.textPanel.Location = new System.Drawing.Point(91, 73); this.textPanel.Name = "textPanel"; this.textPanel.Size = new System.Drawing.Size(152, 20); this.textPanel.TabIndex = 5; this.textPanel.Click += new System.EventHandler(this.textColorPanel_Click); // // label41 // this.label41.AutoSize = true; this.label41.Location = new System.Drawing.Point(13, 99); this.label41.Name = "label41"; this.label41.Size = new System.Drawing.Size(65, 12); this.label41.TabIndex = 6; this.label41.Text = "线条颜色:"; // // linePanel // this.linePanel.BackColor = System.Drawing.SystemColors.Window; this.linePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.linePanel.Location = new System.Drawing.Point(91, 99); this.linePanel.Name = "linePanel"; this.linePanel.Size = new System.Drawing.Size(152, 20); this.linePanel.TabIndex = 7; this.linePanel.Click += new System.EventHandler(this.lineColorPanel_Click); // // label51 // this.label51.AutoSize = true; this.label51.Location = new System.Drawing.Point(13, 128); this.label51.Name = "label51"; this.label51.Size = new System.Drawing.Size(65, 12); this.label51.TabIndex = 8; this.label51.Text = "线条宽度:"; // // label61 // this.label61.AutoSize = true; this.label61.Location = new System.Drawing.Point(13, 155); this.label61.Name = "label61"; this.label61.Size = new System.Drawing.Size(65, 12); this.label61.TabIndex = 9; this.label61.Text = "线条样式:"; // // numericUpDown21 // this.numericUpDown21.Location = new System.Drawing.Point(91, 46); this.numericUpDown21.Maximum = new decimal(new int[] { 49000, 0, 0, 0}); this.numericUpDown21.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.numericUpDown21.Name = "numericUpDown21"; this.numericUpDown21.Size = new System.Drawing.Size(152, 21); this.numericUpDown21.TabIndex = 12; this.numericUpDown21.Value = new decimal(new int[] { 1, 0, 0, 0}); // // comboBox21 // this.comboBox21.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox21.FormattingEnabled = true; this.comboBox21.Location = new System.Drawing.Point(91, 151); this.comboBox21.Name = "comboBox21"; this.comboBox21.Size = new System.Drawing.Size(152, 20); this.comboBox21.TabIndex = 13; // // numericUpDown11 // this.numericUpDown11.Location = new System.Drawing.Point(91, 125); this.numericUpDown11.Name = "numericUpDown11"; this.numericUpDown11.Size = new System.Drawing.Size(152, 21); this.numericUpDown11.TabIndex = 14; // // panel2 // this.panel2.Controls.Add(this.comboBox2); this.panel2.Controls.Add(this.label2); this.panel2.Location = new System.Drawing.Point(9, 175); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(236, 57); this.panel2.TabIndex = 15; // // comboBox2 // this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox2.FormattingEnabled = true; this.comboBox2.Location = new System.Drawing.Point(82, 3); this.comboBox2.Name = "comboBox2"; this.comboBox2.Size = new System.Drawing.Size(152, 20); this.comboBox2.TabIndex = 15; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(5, 7); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(0, 12); this.label2.TabIndex = 14; // // panel3 // this.panel3.Controls.Add(this.comboBox4); this.panel3.Controls.Add(this.label4); this.panel3.Controls.Add(this.comboBox3); this.panel3.Controls.Add(this.label3); this.panel3.Location = new System.Drawing.Point(9, 175); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(236, 57); this.panel3.TabIndex = 16; // // comboBox4 // this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox4.FormattingEnabled = true; this.comboBox4.Location = new System.Drawing.Point(112, 30); this.comboBox4.Name = "comboBox4"; this.comboBox4.Size = new System.Drawing.Size(122, 20); this.comboBox4.TabIndex = 17; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(5, 34); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(89, 12); this.label4.TabIndex = 16; this.label4.Text = "文字位置(点):"; // // comboBox3 // this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox3.FormattingEnabled = true; this.comboBox3.Location = new System.Drawing.Point(112, 4); this.comboBox3.Name = "comboBox3"; this.comboBox3.Size = new System.Drawing.Size(122, 20); this.comboBox3.TabIndex = 15; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(5, 7); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(89, 12); this.label3.TabIndex = 14; this.label3.Text = "文字位置(线):"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(266, 155); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(65, 12); this.label5.TabIndex = 17; this.label5.Text = "垂线长度:"; // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point(368, 155); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(152, 21); this.numericUpDown1.TabIndex = 18; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(266, 182); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(65, 12); this.label6.TabIndex = 19; this.label6.Text = "文字方向:"; // // comboBox5 // this.comboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox5.FormattingEnabled = true; this.comboBox5.Location = new System.Drawing.Point(368, 182); this.comboBox5.Name = "comboBox5"; this.comboBox5.Size = new System.Drawing.Size(152, 20); this.comboBox5.TabIndex = 20; // // groupBox2 // this.groupBox2.Controls.Add(this.comboBox8); this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.comboBox7); this.groupBox2.Controls.Add(this.label10); this.groupBox2.Controls.Add(this.textBox2); this.groupBox2.Controls.Add(this.textBox1); this.groupBox2.Controls.Add(this.comboBox6); this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label8); this.groupBox2.Controls.Add(this.label7); this.groupBox2.Controls.Add(this.comboBox5); this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.numericUpDown1); this.groupBox2.Controls.Add(this.label5); this.groupBox2.Controls.Add(this.panel3); this.groupBox2.Controls.Add(this.panel2); this.groupBox2.Controls.Add(this.numericUpDown11); this.groupBox2.Controls.Add(this.comboBox21); this.groupBox2.Controls.Add(this.numericUpDown21); this.groupBox2.Controls.Add(this.label61); this.groupBox2.Controls.Add(this.label51); this.groupBox2.Controls.Add(this.linePanel); this.groupBox2.Controls.Add(this.label41); this.groupBox2.Controls.Add(this.textPanel); this.groupBox2.Controls.Add(this.label31); this.groupBox2.Controls.Add(this.label91); this.groupBox2.Controls.Add(this.comboBox91); this.groupBox2.Controls.Add(this.label21); this.groupBox2.Controls.Add(this.comboBox11); this.groupBox2.Controls.Add(this.label11); this.groupBox2.Location = new System.Drawing.Point(137, 118); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(716, 235); this.groupBox2.TabIndex = 6; this.groupBox2.TabStop = false; this.groupBox2.Text = "设置"; // // comboBox8 // this.comboBox8.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox8.FormattingEnabled = true; this.comboBox8.Location = new System.Drawing.Point(368, 125); this.comboBox8.Name = "comboBox8"; this.comboBox8.Size = new System.Drawing.Size(127, 20); this.comboBox8.TabIndex = 32; // // label12 // this.label12.AutoSize = true; this.label12.Location = new System.Drawing.Point(266, 127); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(89, 12); this.label12.TabIndex = 31; this.label12.Text = "是否展示序号:"; // // comboBox7 // this.comboBox7.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox7.FormattingEnabled = true; this.comboBox7.Location = new System.Drawing.Point(368, 99); this.comboBox7.Name = "comboBox7"; this.comboBox7.Size = new System.Drawing.Size(127, 20); this.comboBox7.TabIndex = 30; // // label10 // this.label10.AutoSize = true; this.label10.Location = new System.Drawing.Point(266, 99); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(89, 12); this.label10.TabIndex = 29; this.label10.Text = "是否展示后缀:"; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(368, 46); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(152, 21); this.textBox2.TabIndex = 28; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(368, 19); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(152, 21); this.textBox1.TabIndex = 27; // // comboBox6 // this.comboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox6.FormattingEnabled = true; this.comboBox6.Location = new System.Drawing.Point(368, 73); this.comboBox6.Name = "comboBox6"; this.comboBox6.Size = new System.Drawing.Size(127, 20); this.comboBox6.TabIndex = 26; // // label9 // this.label9.AutoSize = true; this.label9.Location = new System.Drawing.Point(266, 76); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(89, 12); this.label9.TabIndex = 25; this.label9.Text = "是否展示别名:"; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(266, 50); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(41, 12); this.label8.TabIndex = 22; this.label8.Text = "后缀:"; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(266, 23); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(41, 12); this.label7.TabIndex = 21; this.label7.Text = "别名:"; // // groupBox5 // this.groupBox5.Controls.Add(this.numericUpDown3); this.groupBox5.Controls.Add(this.label24); this.groupBox5.Controls.Add(this.numericUpDown4); this.groupBox5.Controls.Add(this.comboBox18); this.groupBox5.Controls.Add(this.numericUpDown5); this.groupBox5.Controls.Add(this.label28); this.groupBox5.Controls.Add(this.label29); this.groupBox5.Controls.Add(this.panel8); this.groupBox5.Controls.Add(this.label30); this.groupBox5.Controls.Add(this.panel9); this.groupBox5.Controls.Add(this.label32); this.groupBox5.Controls.Add(this.label34); this.groupBox5.Controls.Add(this.comboBox20); this.groupBox5.Controls.Add(this.label35); this.groupBox5.Location = new System.Drawing.Point(137, 358); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(716, 165); this.groupBox5.TabIndex = 18; this.groupBox5.TabStop = false; this.groupBox5.Text = "选中设置"; // // numericUpDown3 // this.numericUpDown3.Location = new System.Drawing.Point(91, 107); this.numericUpDown3.Name = "numericUpDown3"; this.numericUpDown3.Size = new System.Drawing.Size(152, 21); this.numericUpDown3.TabIndex = 18; // // label24 // this.label24.AutoSize = true; this.label24.Location = new System.Drawing.Point(15, 108); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(65, 12); this.label24.TabIndex = 17; this.label24.Text = "垂线长度:"; // // numericUpDown4 // this.numericUpDown4.Location = new System.Drawing.Point(343, 47); this.numericUpDown4.Name = "numericUpDown4"; this.numericUpDown4.Size = new System.Drawing.Size(152, 21); this.numericUpDown4.TabIndex = 14; // // comboBox18 // this.comboBox18.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox18.FormattingEnabled = true; this.comboBox18.Location = new System.Drawing.Point(343, 72); this.comboBox18.Name = "comboBox18"; this.comboBox18.Size = new System.Drawing.Size(152, 20); this.comboBox18.TabIndex = 13; // // numericUpDown5 // this.numericUpDown5.Location = new System.Drawing.Point(91, 46); this.numericUpDown5.Maximum = new decimal(new int[] { 49000, 0, 0, 0}); this.numericUpDown5.Minimum = new decimal(new int[] { 1, 0, 0, 0}); this.numericUpDown5.Name = "numericUpDown5"; this.numericUpDown5.Size = new System.Drawing.Size(152, 21); this.numericUpDown5.TabIndex = 12; this.numericUpDown5.Value = new decimal(new int[] { 1, 0, 0, 0}); // // label28 // this.label28.AutoSize = true; this.label28.Location = new System.Drawing.Point(266, 76); this.label28.Name = "label28"; this.label28.Size = new System.Drawing.Size(65, 12); this.label28.TabIndex = 9; this.label28.Text = "线条样式:"; // // label29 // this.label29.AutoSize = true; this.label29.Location = new System.Drawing.Point(266, 49); this.label29.Name = "label29"; this.label29.Size = new System.Drawing.Size(65, 12); this.label29.TabIndex = 8; this.label29.Text = "线条宽度:"; // // panel8 // this.panel8.BackColor = System.Drawing.SystemColors.Window; this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel8.Location = new System.Drawing.Point(343, 20); this.panel8.Name = "panel8"; this.panel8.Size = new System.Drawing.Size(152, 20); this.panel8.TabIndex = 7; this.panel8.Click += new System.EventHandler(this.panel8Click); // // label30 // this.label30.AutoSize = true; this.label30.Location = new System.Drawing.Point(266, 20); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(65, 12); this.label30.TabIndex = 6; this.label30.Text = "线条颜色:"; // // panel9 // this.panel9.BackColor = System.Drawing.SystemColors.Window; this.panel9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel9.Location = new System.Drawing.Point(91, 73); this.panel9.Name = "panel9"; this.panel9.Size = new System.Drawing.Size(152, 20); this.panel9.TabIndex = 5; this.panel9.Click += new System.EventHandler(this.panel9Click); // // label32 // this.label32.AutoSize = true; this.label32.Location = new System.Drawing.Point(13, 76); this.label32.Name = "label32"; this.label32.Size = new System.Drawing.Size(65, 12); this.label32.TabIndex = 4; this.label32.Text = "文字颜色:"; // // label34 // this.label34.AutoSize = true; this.label34.Location = new System.Drawing.Point(13, 50); this.label34.Name = "label34"; this.label34.Size = new System.Drawing.Size(65, 12); this.label34.TabIndex = 2; this.label34.Text = "文字字号:"; // // comboBox20 // this.comboBox20.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox20.FormattingEnabled = true; this.comboBox20.Location = new System.Drawing.Point(91, 20); this.comboBox20.Name = "comboBox20"; this.comboBox20.Size = new System.Drawing.Size(152, 20); this.comboBox20.TabIndex = 1; // // label35 // this.label35.AutoSize = true; this.label35.Location = new System.Drawing.Point(13, 23); this.label35.Name = "label35"; this.label35.Size = new System.Drawing.Size(65, 12); this.label35.TabIndex = 0; this.label35.Text = "文字字体:"; // // MeasureSettingDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.ClientSize = new System.Drawing.Size(865, 532); this.Controls.Add(this.groupBox5); this.Controls.Add(this.button6); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox2); this.Controls.Add(this.panel1); this.Controls.Add(this.groupBox4); this.Margin = new System.Windows.Forms.Padding(4); this.Name = "MeasureSettingDialog"; this.Text = "测量设置"; this.Controls.SetChildIndex(this.groupBox4, 0); this.Controls.SetChildIndex(this.panel1, 0); this.Controls.SetChildIndex(this.groupBox2, 0); this.Controls.SetChildIndex(this.groupBox1, 0); this.Controls.SetChildIndex(this.groupBox3, 0); this.Controls.SetChildIndex(this.button6, 0); this.Controls.SetChildIndex(this.groupBox5, 0); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown71)).EndInit(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown21)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).EndInit(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit(); this.ResumeLayout(false); } #region InitializeComponent2 /// /// 初始化组件 /// private void InitializeComponent2() { this.colorsForm = new ColorsForm(); this.colorsForm.StartPosition = FormStartPosition.CenterScreen; this.colorsForm.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged); 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); this.colorsForm4 = new ColorsForm(); this.colorsForm4.StartPosition = FormStartPosition.CenterScreen; this.colorsForm4.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged); this.colorsForm5 = new ColorsForm(); this.colorsForm5.StartPosition = FormStartPosition.CenterScreen; this.colorsForm5.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged); } #endregion /// /// 初始化数据 /// private void InitializeData() { this.listBox1.Items.Clear(); //绑定左侧listbox数据 foreach (MeasureRelationModel model in list) { if(model.id>0) this.listBox1.Items.Add(model.name); } this.listBox1.SelectedIndex = 0; this.fontsItems.Clear(); //绑定字体数据 System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection(); foreach (FontFamily fontFamily in fonts.Families) { fontsItems.Add(fontFamily.Name); } this.comboBox11.DataSource = fontsItems; this.comboBox20.DataSource = fontsItems; //绑定样式默认数据 this.comboBox11.Text = this.measureStyleModel.measureLine.font; this.numericUpDown21.Value = this.measureStyleModel.measureLine.fontSize; this.textPanel.BackColor = Color.FromArgb(this.measureStyleModel.measureLine.textColor); this.linePanel.BackColor = Color.FromArgb(this.measureStyleModel.measureLine.lineColor); this.numericUpDown11.Value = this.measureStyleModel.measureLine.lineWidth; this.comboBox21.SelectedIndex = this.measureStyleModel.measureLine.lineStyle; this.comboBox2.SelectedIndex = this.measureStyleModel.measureLine.linePosition; this.numericUpDown1.Value = this.measureStyleModel.measureLine.vLineLength; #region [选中样式] this.comboBox20.Text = this.measureStyleModel.measureLine.chooseStyle == null ? "" : this.measureStyleModel.measureLine.chooseStyle.font; this.numericUpDown4.Value = this.measureStyleModel.measureLine.chooseStyle == null ? 1 : this.measureStyleModel.measureLine.chooseStyle.lineWidth; this.numericUpDown5.Value = this.measureStyleModel.measureLine.chooseStyle == null ? 1 : this.measureStyleModel.measureLine.chooseStyle.fontSize; this.panel9.BackColor = this.measureStyleModel.measureLine.chooseStyle == null ? Color.Black : Color.FromArgb(this.measureStyleModel.measureLine.chooseStyle.textColor); this.numericUpDown3.Value = this.measureStyleModel.measureLine.chooseStyle == null ? 0 : this.measureStyleModel.measureLine.chooseStyle.vLineLength; this.panel8.BackColor = this.measureStyleModel.measureLine.chooseStyle == null ? Color.Black : Color.FromArgb(this.measureStyleModel.measureLine.chooseStyle.lineColor); this.comboBox18.SelectedIndex = this.measureStyleModel.measureLine.chooseStyle == null ? 0 : this.measureStyleModel.measureLine.chooseStyle.lineStyle; #endregion #region [标记点相关] this.comboBox9.Items.Add("正方形"); this.comboBox9.Items.Add("圆形"); this.comboBox9.Items.Add("三角形"); this.numericUpDown71.Value = this.config.MarkpointWidth; this.comboBox9.SelectedIndex = this.config.MarkpointStyle; this.panel5.BackColor = Color.FromArgb(this.config.MarkpointLineColor); this.numericUpDown2.Value = this.config.MarkpointLineWidth; this.panel4.BackColor = Color.FromArgb(this.config.MarkpointAreaColor); this.checkbox1.Checked = this.config.isFollow; #endregion this.textBox1.Text = this.measureStyleModel.measureLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureLine.showSerial ? 0 : 1; //绑定样式下拉 todo if (initflag++ == 0) { InitializeStyleName(); } } /// /// 左侧listbox选择事件 /// /// /// private void listBox1_SelectedValueChanged(object sender, EventArgs e) { //首先更新右侧分类部分 UpdateRightCatalog(); //更新右侧设置界面 UpdateRightSettingUI(); //刷新右侧预览 UpdateRightPreview(); } /// /// 更新右侧分类 /// private void UpdateRightCatalog() { this.panel1.Controls.Clear(); MeasureRelationModel model = list[this.listBox1.SelectedIndex + 1]; this.selectId = model.id; if (this.selectId == 10) { groupBox2.Visible = false; groupBox5.Visible = false; groupBox4.Visible = true; panel1.Visible = false; button6.Visible = false; comboBox1.Visible = false; button4.Visible = false; button3.Visible = false; label1.Visible = false; } else { groupBox2.Visible = true; groupBox5.Visible = true; groupBox4.Visible = false; panel1.Visible = true; button6.Visible = true; comboBox1.Visible = true; button4.Visible = true; button3.Visible = true; label1.Visible = true; } int postion = 0; foreach (MeasureRelationModel.ChildLabel child in model.childLabel) { if((int)child.drawToolType > 0) { Button button = new Button(); button.Size = new Size(75, 23); button.Location = new Point(postion * 75 + 5, 0); button.Text = child.name; button.Tag = child; button.Click += new EventHandler(ChildButton_Click); this.panel1.Controls.Add(button); if (postion == 0) { this.drawToolType = child.drawToolType; button.Focus(); } postion++; } } } /// /// 二级分类按钮点击事件 /// /// /// private void ChildButton_Click(object sender, EventArgs e) { Button button = (Button)sender; MeasureRelationModel.ChildLabel child = (MeasureRelationModel.ChildLabel)button.Tag; this.drawToolType = child.drawToolType; this.UpdateRightSettingUI(); } # region 更新右侧设置 /// /// 更新右侧设置 /// private void UpdateRightSettingUI() { switch (this.drawToolType) { case DrawToolType.MeasureLine: //长度测量直线 MeasureStyleModel.MeasureLine measureLine = this.measureStyleModel.measureLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = true; this.label6.Visible = true; this.comboBox5.Visible = true; this.numericUpDown1.Visible = true; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureLine.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureLine.font, measureLine.fontSize, measureLine.textColor, measureLine.lineColor, measureLine.lineWidth, measureLine.lineStyle, measureLine.linePosition, 0, 0, measureLine.vLineLength,measureLine.chooseStyle,measureLine.followLine); break; case DrawToolType.MeasureDistanceLine: //长度测量距离 MeasureStyleModel.MeasureDistanceLine measureDistanceLine = this.measureStyleModel.measureDistanceLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureDistanceLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureDistanceLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureDistanceLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureDistanceLine.font, measureDistanceLine.fontSize, measureDistanceLine.textColor, measureDistanceLine.lineColor, measureDistanceLine.lineWidth, measureDistanceLine.lineStyle, measureDistanceLine.linePosition, 0, 0, -1, measureDistanceLine.chooseStyle); break; case DrawToolType.MeasureLength: //长度测量->长度 MeasureStyleModel.MeasureLength measureLength = this.measureStyleModel.measureLength; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureLength.aliasName; this.textBox2.Text = this.measureStyleModel.measureLength.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureLength.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureLength.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureLength.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureLength.font, measureLength.fontSize, measureLength.textColor, measureLength.lineColor, measureLength.lineWidth, measureLength.lineStyle, measureLength.linePosition, 0, 0, -1, measureLength.chooseStyle); break; case DrawToolType.MeasureHLine: //长度测量->水平线 MeasureStyleModel.MeasureHLine measureHLine = this.measureStyleModel.measureHLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureHLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureHLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureHLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureHLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureHLine.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureHLine.font, measureHLine.fontSize, measureHLine.textColor, measureHLine.lineColor, measureHLine.lineWidth, measureHLine.lineStyle, measureHLine.linePosition, 0, 0, measureHLine.vLineLength, measureHLine.chooseStyle); break; case DrawToolType.MeasureVLine: //长度测量->垂线 MeasureStyleModel.MeasureVLine measureVLine = this.measureStyleModel.measureVLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = true; this.comboBox5.Visible = true; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureVLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureVLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureVLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureVLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureVLine.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureVLine.font, measureVLine.fontSize, measureVLine.textColor, measureVLine.lineColor, measureVLine.lineWidth, measureVLine.lineStyle, measureVLine.linePosition, 0, 0, measureVLine.vLineLength, measureVLine.chooseStyle, measureVLine.followLine); break; case DrawToolType.MeasureMulLine: //多点线段->多点直线 MeasureStyleModel.MeasureMulLine measureMulLine = this.measureStyleModel.measureMulLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulLine.font, measureMulLine.fontSize, measureMulLine.textColor, measureMulLine.lineColor, measureMulLine.lineWidth, measureMulLine.lineStyle, 0, measureMulLine.linePositionL, measureMulLine.linePositionP, measureMulLine.vLineLength, measureMulLine.chooseStyle); break; case DrawToolType.MeasureMulHVLine: //多点线段->多点水平线 MeasureStyleModel.MeasureMulHVLine measureMulHVLine = this.measureStyleModel.measureMulHVLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulHVLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulHVLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulHVLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulHVLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulHVLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulHVLine.font, measureMulHVLine.fontSize, measureMulHVLine.textColor, measureMulHVLine.lineColor, measureMulHVLine.lineWidth, measureMulHVLine.lineStyle, 0, measureMulHVLine.linePositionL, measureMulHVLine.linePositionP, measureMulHVLine.vLineLength, measureMulHVLine.chooseStyle); break; case DrawToolType.MeasureMulSegment: //多点线段->多点线段 MeasureStyleModel.MeasureMulSegment measureMulSegment = this.measureStyleModel.measureMulSegment; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulSegment.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulSegment.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulSegment.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulSegment.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulSegment.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulSegment.font, measureMulSegment.fontSize, measureMulSegment.textColor, measureMulSegment.lineColor, measureMulSegment.lineWidth, measureMulSegment.lineStyle, 0, measureMulSegment.linePositionL, measureMulSegment.linePositionP, measureMulSegment.vLineLength, measureMulSegment.chooseStyle); break; case DrawToolType.MeasureMulVLine: //多点线段->多点垂直线 MeasureStyleModel.MeasureMulVLine measureMulVLine = this.measureStyleModel.measureMulVLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = true; this.numericUpDown1.Visible = true; this.label6.Visible = true; this.comboBox5.Visible = true; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulVLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulVLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulVLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulVLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulVLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulVLine.font, measureMulVLine.fontSize, measureMulVLine.textColor, measureMulVLine.lineColor, measureMulVLine.lineWidth, measureMulVLine.lineStyle, 0, measureMulVLine.linePositionL, measureMulVLine.linePositionP, measureMulVLine.vLineLength, measureMulVLine.chooseStyle,measureMulVLine.followLine); break; case DrawToolType.MeasureBrokenLine: //曲线长度->折线 MeasureStyleModel.MeasureBrokenLine measureBrokenLine = this.measureStyleModel.measureBrokenLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureBrokenLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureBrokenLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureBrokenLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureBrokenLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureBrokenLine.showSerial ? 0 : 1; UpdataFontPosition(true); this.UpdateMeasureStyleData(measureBrokenLine.font, measureBrokenLine.fontSize, measureBrokenLine.textColor, measureBrokenLine.lineColor, measureBrokenLine.lineWidth, measureBrokenLine.lineStyle, measureBrokenLine.linePosition, 0, 0, -1, measureBrokenLine.chooseStyle); break; case DrawToolType.MeasureTraceCurve: //曲线长度->轨迹曲线 MeasureStyleModel.MeasureTraceCurve measureTraceCurve = this.measureStyleModel.measureTraceCurve; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureTraceCurve.aliasName; this.textBox2.Text = this.measureStyleModel.measureTraceCurve.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureTraceCurve.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureTraceCurve.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureTraceCurve.showSerial ? 0 : 1; UpdataFontPosition(true); this.UpdateMeasureStyleData(measureTraceCurve.font, measureTraceCurve.fontSize, measureTraceCurve.textColor, measureTraceCurve.lineColor, measureTraceCurve.lineWidth, measureTraceCurve.lineStyle, measureTraceCurve.linePosition, 0, 0, -1, measureTraceCurve.chooseStyle); break; case DrawToolType.MeasureCurveLine: //曲线长度->曲线 MeasureStyleModel.MeasureCurveLine measureCurveLine = this.measureStyleModel.measureCurveLine; this.panel2.Visible = true; this.panel3.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureCurveLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureCurveLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureCurveLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureCurveLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureCurveLine.showSerial ? 0 : 1; UpdataFontPosition(true); this.UpdateMeasureStyleData(measureCurveLine.font, measureCurveLine.fontSize, measureCurveLine.textColor, measureCurveLine.lineColor, measureCurveLine.lineWidth, measureCurveLine.lineStyle, measureCurveLine.linePosition, 0, 0, -1, measureCurveLine.chooseStyle); break; case DrawToolType.MeasurePLine: //点垂线->点垂线 MeasureStyleModel.MeasurePLine measurePLine = this.measureStyleModel.measurePLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePLine.aliasName; this.textBox2.Text = this.measureStyleModel.measurePLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePLine.font, measurePLine.fontSize, measurePLine.textColor, measurePLine.lineColor, measurePLine.lineWidth, measurePLine.lineStyle, 0, measurePLine.linePositionL, measurePLine.linePositionP, -1, measurePLine.chooseStyle); break; case DrawToolType.MeasureMulPLine: //点垂线->多点垂线 MeasureStyleModel.MeasureMulPLine measureMulPLine = this.measureStyleModel.measureMulPLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulPLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulPLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulPLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulPLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulPLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulPLine.font, measureMulPLine.fontSize, measureMulPLine.textColor, measureMulPLine.lineColor, measureMulPLine.lineWidth, measureMulPLine.lineStyle, 0, measureMulPLine.linePositionL, measureMulPLine.linePositionP, -1, measureMulPLine.chooseStyle); break; case DrawToolType.MeasureHMulPLine: //点垂线->水平多点垂线 MeasureStyleModel.MeasureHMulPLine measureHMulPLine = this.measureStyleModel.measureHMulPLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureHMulPLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureHMulPLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureHMulPLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureHMulPLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureHMulPLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureHMulPLine.font, measureHMulPLine.fontSize, measureHMulPLine.textColor, measureHMulPLine.lineColor, measureHMulPLine.lineWidth, measureHMulPLine.lineStyle, 0, measureHMulPLine.linePositionL, measureHMulPLine.linePositionP, -1, measureHMulPLine.chooseStyle); break; case DrawToolType.MeasureVMulPLine: //点垂线->垂直多点垂线 MeasureStyleModel.MeasureVMulPLine measureVMulPLine = this.measureStyleModel.measureVMulPLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureVMulPLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureVMulPLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureVMulPLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureVMulPLine.font, measureVMulPLine.fontSize, measureVMulPLine.textColor, measureVMulPLine.lineColor, measureVMulPLine.lineWidth, measureVMulPLine.lineStyle, 0, measureVMulPLine.linePositionL, measureVMulPLine.linePositionP, -1, measureVMulPLine.chooseStyle); break; case DrawToolType.MeasurePointHLine: //点垂线->点到水平线距离 MeasureStyleModel.MeasurePointHLine measurePointHLine = this.measureStyleModel.measurePointHLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePointHLine.aliasName; this.textBox2.Text = this.measureStyleModel.measurePointHLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointHLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointHLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointHLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePointHLine.font, measurePointHLine.fontSize, measurePointHLine.textColor, measurePointHLine.lineColor, measurePointHLine.lineWidth, measurePointHLine.lineStyle, 0, measurePointHLine.linePositionL, measurePointHLine.linePositionP, -1, measurePointHLine.chooseStyle); break; case DrawToolType.MeasureParallelLine: //平行线测量->平行线 MeasureStyleModel.MeasureParallelLine measureParallelLine = this.measureStyleModel.measureParallelLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = true; this.comboBox5.Visible = true; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureParallelLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureParallelLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureParallelLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureParallelLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureParallelLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureParallelLine.font, measureParallelLine.fontSize, measureParallelLine.textColor, measureParallelLine.lineColor, measureParallelLine.lineWidth, measureParallelLine.lineStyle, 0, measureParallelLine.linePositionL, measureParallelLine.linePositionP, -1, measureParallelLine.chooseStyle, measureParallelLine.followLine); break; case DrawToolType.MeasureMulParallelLine: //平行线测量->多点平行线 MeasureStyleModel.MeasureMulParallelLine measureMulParallelLine = this.measureStyleModel.measureMulParallelLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureMulParallelLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureMulParallelLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureMulParallelLine.font, measureMulParallelLine.fontSize, measureMulParallelLine.textColor, measureMulParallelLine.lineColor, measureMulParallelLine.lineWidth, measureMulParallelLine.lineStyle, 0, measureMulParallelLine.linePositionL, measureMulParallelLine.linePositionP, -1, measureMulParallelLine.chooseStyle); break; case DrawToolType.MeasureVMulParallelLine: //平行线测量->垂直多点平行线 MeasureStyleModel.MeasureVMulParallelLine measureVMulParallelLine = this.measureStyleModel.measureVMulParallelLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureVMulParallelLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureVMulParallelLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureVMulParallelLine.font, measureVMulParallelLine.fontSize, measureVMulParallelLine.textColor, measureVMulParallelLine.lineColor, measureVMulParallelLine.lineWidth, measureVMulParallelLine.lineStyle, 0, measureVMulParallelLine.linePositionL, measureVMulParallelLine.linePositionP, -1, measureVMulParallelLine.chooseStyle); break; case DrawToolType.MeasureHMulParallelLine: //平行线测量->水平多点平行线 MeasureStyleModel.MeasureHMulParallelLine measureHMulParallelLine = this.measureStyleModel.measureHMulParallelLine; this.panel3.Visible = true; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureHMulParallelLine.aliasName; this.textBox2.Text = this.measureStyleModel.measureHMulParallelLine.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureHMulParallelLine.font, measureHMulParallelLine.fontSize, measureHMulParallelLine.textColor, measureHMulParallelLine.lineColor, measureHMulParallelLine.lineWidth, measureHMulParallelLine.lineStyle, 0, measureHMulParallelLine.linePositionL, measureHMulParallelLine.linePositionP, -1, measureHMulParallelLine.chooseStyle); break; case DrawToolType.MeasureClosedCurve: //多边形测量->闭合曲线 MeasureStyleModel.MeasureClosedCurve measureClosedCurve = this.measureStyleModel.measureClosedCurve; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureClosedCurve.aliasName; this.textBox2.Text = this.measureStyleModel.measureClosedCurve.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureClosedCurve.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureClosedCurve.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureClosedCurve.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureClosedCurve.font, measureClosedCurve.fontSize, measureClosedCurve.textColor, measureClosedCurve.lineColor, measureClosedCurve.lineWidth, measureClosedCurve.lineStyle, 0, 0, 0, -1, measureClosedCurve.chooseStyle); break; case DrawToolType.MeasurePolygon: //多边形测量->多边形 MeasureStyleModel.MeasurePolygon measurePolygon = this.measureStyleModel.measurePolygon; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePolygon.aliasName; this.textBox2.Text = this.measureStyleModel.measurePolygon.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePolygon.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePolygon.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePolygon.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePolygon.font, measurePolygon.fontSize, measurePolygon.textColor, measurePolygon.lineColor, measurePolygon.lineWidth, measurePolygon.lineStyle, 0, 0, 0, -1, measurePolygon.chooseStyle); break; case DrawToolType.MeasureRectangle: //多边形测量->矩形 MeasureStyleModel.MeasureRectangle measureRectangle = this.measureStyleModel.measureRectangle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureRectangle.aliasName; this.textBox2.Text = this.measureStyleModel.measureRectangle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureRectangle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureRectangle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureRectangle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureRectangle.font, measureRectangle.fontSize, measureRectangle.textColor, measureRectangle.lineColor, measureRectangle.lineWidth, measureRectangle.lineStyle, 0, 0, 0, -1, measureRectangle.chooseStyle); break; case DrawToolType.MeasureRandRectangle: //多边形测量->任意矩形 MeasureStyleModel.MeasureRandRectangle measureRandRectangle = this.measureStyleModel.measureRandRectangle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureRandRectangle.aliasName; this.textBox2.Text = this.measureStyleModel.measureRandRectangle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureRandRectangle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureRandRectangle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureRandRectangle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureRandRectangle.font, measureRandRectangle.fontSize, measureRandRectangle.textColor, measureRandRectangle.lineColor, measureRandRectangle.lineWidth, measureRandRectangle.lineStyle, 0, 0, 0, -1, measureRandRectangle.chooseStyle); break; case DrawToolType.MeasureSquare: //多边形测量->正方形 MeasureStyleModel.MeasureSquare measureSquare = this.measureStyleModel.measureSquare; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureSquare.aliasName; this.textBox2.Text = this.measureStyleModel.measureSquare.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureSquare.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureSquare.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureSquare.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureSquare.font, measureSquare.fontSize, measureSquare.textColor, measureSquare.lineColor, measureSquare.lineWidth, measureSquare.lineStyle, 0, 0, 0, -1, measureSquare.chooseStyle); break; case DrawToolType.MeasureRandSquare: //多边形测量->任意正方形 MeasureStyleModel.MeasureRandSquare measureRandSquare = this.measureStyleModel.measureRandSquare; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureRandSquare.aliasName; this.textBox2.Text = this.measureStyleModel.measureRandSquare.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureRandSquare.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureRandSquare.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureRandSquare.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureRandSquare.font, measureRandSquare.fontSize, measureRandSquare.textColor, measureRandSquare.lineColor, measureRandSquare.lineWidth, measureRandSquare.lineStyle, 0, 0, 0, -1, measureRandSquare.chooseStyle); break; case DrawToolType.MeasureTracePolygon: //多边形测量->轨迹多边形 MeasureStyleModel.MeasureTracePolygon measureTracePolygon = this.measureStyleModel.measureTracePolygon; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureTracePolygon.aliasName; this.textBox2.Text = this.measureStyleModel.measureTracePolygon.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureTracePolygon.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureTracePolygon.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureTracePolygon.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureTracePolygon.font, measureTracePolygon.fontSize, measureTracePolygon.textColor, measureTracePolygon.lineColor, measureTracePolygon.lineWidth, measureTracePolygon.lineStyle, 0, 0, 0, -1, measureTracePolygon.chooseStyle); break; case DrawToolType.MeasureCircle: //圆形测量->三点圆 MeasureStyleModel.MeasureCircle measureCircle = this.measureStyleModel.measureCircle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureCircle.aliasName; this.textBox2.Text = this.measureStyleModel.measureCircle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureCircle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureCircle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureCircle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureCircle.font, measureCircle.fontSize, measureCircle.textColor, measureCircle.lineColor, measureCircle.lineWidth, measureCircle.lineStyle, 0, 0, 0, -1, measureCircle.chooseStyle); break; case DrawToolType.MeasureInnerCircle: //圆形测量->向内画圆 MeasureStyleModel.MeasureInnerCircle measureInnerCircle = this.measureStyleModel.measureInnerCircle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureInnerCircle.aliasName; this.textBox2.Text = this.measureStyleModel.measureInnerCircle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureInnerCircle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureInnerCircle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureInnerCircle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureInnerCircle.font, measureInnerCircle.fontSize, measureInnerCircle.textColor, measureInnerCircle.lineColor, measureInnerCircle.lineWidth, measureInnerCircle.lineStyle, 0, 0, 0, -1, measureInnerCircle.chooseStyle); break; case DrawToolType.MeasureOuterCircle: //圆形测量->向外画圆 MeasureStyleModel.MeasureOuterCircle measureOuterCircle = this.measureStyleModel.measureOuterCircle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureOuterCircle.aliasName; this.textBox2.Text = this.measureStyleModel.measureOuterCircle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureOuterCircle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureOuterCircle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureOuterCircle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureOuterCircle.font, measureOuterCircle.fontSize, measureOuterCircle.textColor, measureOuterCircle.lineColor, measureOuterCircle.lineWidth, measureOuterCircle.lineStyle, 0, 0, 0, -1, measureOuterCircle.chooseStyle); break; case DrawToolType.MeasureDiameterCircle: //圆形测量->直径画圆 MeasureStyleModel.MeasureDiameterCircle measureDiameterCircle = this.measureStyleModel.measureDiameterCircle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureDiameterCircle.aliasName; this.textBox2.Text = this.measureStyleModel.measureDiameterCircle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureDiameterCircle.font, measureDiameterCircle.fontSize, measureDiameterCircle.textColor, measureDiameterCircle.lineColor, measureDiameterCircle.lineWidth, measureDiameterCircle.lineStyle, 0, 0, 0, -1, measureDiameterCircle.chooseStyle); break; case DrawToolType.MeasurePointEdgeSize: //圆形测量->点到圆距离 MeasureStyleModel.MeasurePointEdgeSize measurePointEdgeSize = this.measureStyleModel.measurePointEdgeSize; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePointEdgeSize.aliasName; this.textBox2.Text = this.measureStyleModel.measurePointEdgeSize.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePointEdgeSize.font, measurePointEdgeSize.fontSize, measurePointEdgeSize.textColor, measurePointEdgeSize.lineColor, measurePointEdgeSize.lineWidth, measurePointEdgeSize.lineStyle, 0, 0, 0, -1, measurePointEdgeSize.chooseStyle); break; case DrawToolType.MeasurePointCenterSize: //圆形测量->点到圆心距离 MeasureStyleModel.MeasurePointCenterSize measurePointCenterSize = this.measureStyleModel.measurePointCenterSize; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePointCenterSize.aliasName; this.textBox2.Text = this.measureStyleModel.measurePointCenterSize.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePointCenterSize.font, measurePointCenterSize.fontSize, measurePointCenterSize.textColor, measurePointCenterSize.lineColor, measurePointCenterSize.lineWidth, measurePointCenterSize.lineStyle, 0, 0, 0, -1, measurePointCenterSize.chooseStyle); break; case DrawToolType.MeasurePointArcSize: //圆形测量->点到圆弧距离 MeasureStyleModel.MeasurePointArcSize measurePointArcSize = this.measureStyleModel.measurePointArcSize; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measurePointArcSize.aliasName; this.textBox2.Text = this.measureStyleModel.measurePointArcSize.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointArcSize.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointArcSize.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointArcSize.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measurePointArcSize.font, measurePointArcSize.fontSize, measurePointArcSize.textColor, measurePointArcSize.lineColor, measurePointArcSize.lineWidth, measurePointArcSize.lineStyle, 0, 0, 0, -1, measurePointArcSize.chooseStyle); break; case DrawToolType.MeasureThreePointAngle: //角度测量->三点角度 MeasureStyleModel.MeasureThreePointAngle measureThreePointAngle = this.measureStyleModel.measureThreePointAngle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = true; this.comboBox91.Visible = true; this.textBox1.Text = this.measureStyleModel.measureThreePointAngle.aliasName; this.textBox2.Text = this.measureStyleModel.measureThreePointAngle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureThreePointAngle.font, measureThreePointAngle.fontSize, measureThreePointAngle.textColor, measureThreePointAngle.lineColor, measureThreePointAngle.lineWidth, measureThreePointAngle.lineStyle, 0, 0, 0, -1, measureThreePointAngle.chooseStyle, false, measureThreePointAngle.isAngle); break; case DrawToolType.MeasureFourPointAngle: //角度测量->四点角度 MeasureStyleModel.MeasureFourPointAngle measureFourPointAngle = this.measureStyleModel.measureFourPointAngle; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = true; this.comboBox91.Visible = true; this.textBox1.Text = this.measureStyleModel.measureFourPointAngle.aliasName; this.textBox2.Text = this.measureStyleModel.measureFourPointAngle.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureFourPointAngle.font, measureFourPointAngle.fontSize, measureFourPointAngle.textColor, measureFourPointAngle.lineColor, measureFourPointAngle.lineWidth, measureFourPointAngle.lineStyle, 0, 0, 0, -1, measureFourPointAngle.chooseStyle, false, measureFourPointAngle.isAngle); break; case DrawToolType.MeasureThreePointArc: //角度测量->三点弧 MeasureStyleModel.MeasureThreePointArc measureThreePointArc = this.measureStyleModel.measureThreePointArc; this.panel3.Visible = false; this.panel2.Visible = false; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = true; this.comboBox91.Visible = true; this.textBox1.Text = this.measureStyleModel.measureThreePointArc.aliasName; this.textBox2.Text = this.measureStyleModel.measureThreePointArc.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureThreePointArc.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureThreePointArc.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureThreePointArc.showSerial ? 0 : 1; this.UpdateMeasureStyleData(measureThreePointArc.font, measureThreePointArc.fontSize, measureThreePointArc.textColor, measureThreePointArc.lineColor, measureThreePointArc.lineWidth, measureThreePointArc.lineStyle, 0, 0, 0, -1, measureThreePointArc.chooseStyle, false, measureThreePointArc.isAngle); break; case DrawToolType.MeasureCenterCenterSize: //对准度测量->圆心到圆心距离 MeasureStyleModel.MeasureCenterCenterSize measureCenterCenterSize = this.measureStyleModel.measureCenterCenterSize; this.panel3.Visible = false; this.panel2.Visible = true; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureCenterCenterSize.aliasName; this.textBox2.Text = this.measureStyleModel.measureCenterCenterSize.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureCenterCenterSize.font, measureCenterCenterSize.fontSize, measureCenterCenterSize.textColor, measureCenterCenterSize.lineColor, measureCenterCenterSize.lineWidth, measureCenterCenterSize.lineStyle, measureCenterCenterSize.linePosition, 0, 0, -1, measureCenterCenterSize.chooseStyle); break; case DrawToolType.MeasureTwoLineVLDistance: //对准度测量->两线中垂线距离 MeasureStyleModel.MeasureTwoLineVLDistance measureTwoLineVLDistance = this.measureStyleModel.measureTwoLineVLDistance; this.panel3.Visible = false; this.panel2.Visible = true; this.label5.Visible = false; this.numericUpDown1.Visible = false; this.label6.Visible = false; this.comboBox5.Visible = false; this.label91.Visible = false; this.comboBox91.Visible = false; this.textBox1.Text = this.measureStyleModel.measureTwoLineVLDistance.aliasName; this.textBox2.Text = this.measureStyleModel.measureTwoLineVLDistance.suffixName; this.comboBox6.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showAlias ? 0 : 1; this.comboBox7.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showSuffix ? 0 : 1; this.comboBox8.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showSerial ? 0 : 1; UpdataFontPosition(false); this.UpdateMeasureStyleData(measureTwoLineVLDistance.font, measureTwoLineVLDistance.fontSize, measureTwoLineVLDistance.textColor, measureTwoLineVLDistance.lineColor, measureTwoLineVLDistance.lineWidth, measureTwoLineVLDistance.lineStyle, measureTwoLineVLDistance.linePosition, 0, 0, -1, measureTwoLineVLDistance.chooseStyle); break; } } #endregion private void UpdataFontPosition(bool curve) { List position = new List { PdnResources.GetString("Menu.Upperleft.text") , PdnResources.GetString("Menu.Uppermiddle.Text") , PdnResources.GetString("Menu.Upperright.text") , PdnResources.GetString("Menu.Lowerleft.text") , PdnResources.GetString("Menu.Themiddleandlower.Text") , PdnResources.GetString("Menu.Lowerright.text")}; List position1 = new List { PdnResources.GetString("Menu.hestartingpoint.Text") , PdnResources.GetString("Menu.Theendpoint.Text") }; this.comboBox2.DataSource = null; if (curve) this.comboBox2.DataSource = position1; else this.comboBox2.DataSource = position; } /// /// 刷新右侧预览图 /// private void UpdateRightPreview() { } /// /// 更新显示区域控件的数值 /// /// /// /// /// /// /// private void UpdateMeasureStyleData(string font,int fontSize,int textColor,int lineColor,int lineWidth,int lineStyle, int linePosition, int linePositionL, int linePositionP, int vLineLength, chooseStyleModel chooseStyleModel,bool followLine = false,bool isAngle = false) { #region [选中样式] this.comboBox20.Text = chooseStyleModel == null ? "" : chooseStyleModel.font; this.numericUpDown4.Value = chooseStyleModel == null ? 1 : chooseStyleModel.lineWidth; this.numericUpDown5.Value = chooseStyleModel == null ? 1 : chooseStyleModel.fontSize; this.panel9.BackColor = chooseStyleModel == null ? Color.Black : Color.FromArgb(chooseStyleModel.textColor); this.numericUpDown3.Value = chooseStyleModel == null ? 0 : chooseStyleModel.vLineLength; this.panel8.BackColor = chooseStyleModel == null ? Color.Black : Color.FromArgb(chooseStyleModel.lineColor); this.comboBox18.SelectedIndex = chooseStyleModel == null ? 0 : chooseStyleModel.lineStyle; #endregion //绑定样式默认数据 this.comboBox11.Text = font; this.numericUpDown21.Value = fontSize; this.textPanel.BackColor = Color.FromArgb( textColor); this.linePanel.BackColor = Color.FromArgb( lineColor); this.numericUpDown11.Value = lineWidth; this.comboBox21.SelectedIndex = lineStyle; if(this.comboBox2.Items.Count > 0) this.comboBox2.SelectedIndex = linePosition; if (this.comboBox3.Items.Count > 0) this.comboBox3.SelectedIndex = linePositionL; if (this.comboBox4.Items.Count > 0) this.comboBox4.SelectedIndex = linePositionP; if(vLineLength > -1) this.numericUpDown1.Value = vLineLength; if (followLine) { this.comboBox5.SelectedIndex = 0; } else { this.comboBox5.SelectedIndex = 1; } this.comboBox91.SelectedIndex = isAngle ? 1 : 0; } /// /// 保存按钮 /// /// /// private void Button2_Click(object sender, EventArgs e) { //调用检查类型 this.checkSaveModel(); //以下保存xml文件信息 string stageModelXml = XmlSerializeHelper.XmlSerialize(this.measureStyleModel); string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.Text + ".xml"; FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create); this.config.MarkpointWidth = Convert.ToInt32(this.numericUpDown71.Value); this.config.MarkpointStyle = this.comboBox9.SelectedIndex; this.config.MarkpointLineColor = this.panel5.BackColor.ToArgb(); this.config.MarkpointLineWidth = Convert.ToInt32(this.numericUpDown2.Value); this.config.MarkpointAreaColor = this.panel4.BackColor.ToArgb(); this.config.isFollow = this.checkbox1.Checked; string configModelXml = XmlSerializeHelper.XmlSerialize(config); FileOperationHelper.WriteStringToFile(configModelXml, Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml", FileMode.Create); MarkPointRect.markPointRectWidth = configModel.MarkpointWidth; //if (this.appWorkspace.DocumentWorkspaces != null) //{ // foreach (var item in this.appWorkspace.DocumentWorkspaces) // { // if (item != null && item.GraphicsList != null) // foreach (var graObject in item.GraphicsList.graphicsList) // { // graObject.smallRectangleWidth = this.config.MarkpointWidth; // } // item.Refresh(); // } //} DrawObject.smallRectangleWidth = this.config.MarkpointWidth; DrawObject.MarkpointStyle = this.config.MarkpointStyle; DrawObject.MarkpointLineColor = this.config.MarkpointLineColor; DrawObject.MarkpointLineWidth = this.config.MarkpointLineWidth; DrawObject.MarkpointAreaColor = this.config.MarkpointAreaColor; DrawObject.isFollow = this.checkbox1.Checked; ApplicationSetting(); } /// ///另存为按钮点击 /// /// /// private void Button3_Click(object sender, EventArgs e) { dialog = new CreateNameDialog(this); dialog.Text = PdnResources.GetString("Menu.Set.Watermarksettings.Newstyle.text"); dialog.StartPosition = FormStartPosition.CenterParent; dialog.ShowDialog(); } /// /// 当前操作样式 /// /// /// private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { measureStyleModel = XmlSerializeHelper.DESerializer(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.SelectedItem.ToString() + ".xml", FileMode.Open)); InitializeData(); } /// /// 绑定样式下拉 /// private void InitializeStyleName() { List fileNames = FileOperationHelper.GetFileList(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\"); files.Clear(); foreach (string fileName in fileNames) { string name = fileName.Substring(0, fileName.LastIndexOf(".")); files.Add(name); } this.comboBox1.SelectedIndexChanged -= this.comboBox1_SelectedIndexChanged; this.comboBox1.DataSource = null; this.comboBox1.DataSource = files; string nowModelName = Startup.instance.configModel.Watermark.Substring(0, Startup.instance.configModel.Watermark.LastIndexOf(".")); this.comboBox1.SelectedIndex = files.FindIndex(a => a.Equals(nowModelName)); measureStyleModel = XmlSerializeHelper.DESerializer(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.SelectedItem.ToString() + ".xml", FileMode.Open)); // InitializeData(); this.comboBox1.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged); } /// /// 删除按钮 /// /// /// private void Button4_Click(object sender, EventArgs e) { if ("Default".Equals(this.comboBox1.Text)) { MessageBox.Show(PdnResources.GetString("Menu.efaultstylecannotbedelete.Text"), PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } DialogResult dr = MessageBox.Show(PdnResources.GetString("Menu.nfirmthedeleti.Text"), PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); if (dr == DialogResult.OK) { int newIndex = 0; int selectIndex = this.comboBox1.SelectedIndex; int tall = files.Count - 1; if (selectIndex < tall) { newIndex = selectIndex; } string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.Text + ".xml"; FileInfo fileInfo = new FileInfo(filePath); fileInfo.Delete(); InitializeStyleName(); this.comboBox1.SelectedIndex = newIndex; measureStyleModel = XmlSerializeHelper.DESerializer(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.SelectedItem.ToString() + ".xml", FileMode.Open)); InitializeData(); } else if (dr == DialogResult.Cancel) { } } /// /// 弹出另存为框点击保存效果 /// /// public override void GetCreateName(string name) { string currentcomboBox = this.comboBox1.Text; this.newName = name; if (files.Contains(this.newName)) { MessageBox.Show(PdnResources.GetString("Menu.Stylenamecannotberepeated.text"), PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } CopyConfigAndRename(); InitializeStyleName(); this.comboBox1.Text = currentcomboBox; dialog.Close(); } /// /// 另存配置文件 /// private void CopyConfigAndRename() { /*if (this.checkBox1.Checked) { this.watermarkModel.bold = 1; } else { this.watermarkModel.bold = 2; } if (this.checkBox2.Checked) { this.watermarkModel.italic = 1; } else { this.watermarkModel.italic = 2; } this.watermarkModel.position = this.comboBox2.SelectedIndex + 1; this.watermarkModel.typeface = this.comboBox3.Text; this.watermarkModel.fontSize = Int32.Parse(this.comboBox4.Text);*/ //检查保存类型 this.checkSaveModel(); //另存为 string stageModelXml = XmlSerializeHelper.XmlSerialize(this.measureStyleModel); string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.newName + ".xml"; FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create); } /// /// 应用按钮 /// /// /// private void ApplicationSetting() { //修改缓存中的样式数据 Startup.instance.measureStyleModel = this.measureStyleModel; //修改主配置文件中的值 this.appWorkspace.RefreshAliasName(); configModel.MeasurementStyle = this.comboBox1.Text + ".xml"; //修改主配置文件的xml string configModelXml = XmlSerializeHelper.XmlSerialize(this.configModel); string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml"; FileOperationHelper.WriteStringToFile(configModelXml, filePath, FileMode.Create); MessageBox.Show(PdnResources.GetString("Menu.Successfullysaved.text")); } private void textColorPanel_Click(object sender, EventArgs e) { this.colorsForm.UserPrimaryColor = ColorBgra.FromColor(this.textPanel.BackColor); this.colorsForm.setSaveBtn_Click(new System.EventHandler(this.textColorChanged)); this.colorsForm.ShowDialog(); } private void textColorChanged(object sender, EventArgs e) { this.textPanel.BackColor = this.colorsForm.UserPrimaryColor.ToColor(); //this.measureStyleModel.backColor = this.colorsForm.UserPrimaryColor.ToColor().ToArgb(); this.colorsForm.Close(); } private void lineColorPanel_Click(object sender, EventArgs e) { this.colorsForm1.UserPrimaryColor = ColorBgra.FromColor(this.linePanel.BackColor); this.colorsForm1.setSaveBtn_Click(new System.EventHandler(this.lineColorChanged)); this.colorsForm1.ShowDialog(); } private void lineColorChanged(object sender, EventArgs e) { this.linePanel.BackColor = this.colorsForm1.UserPrimaryColor.ToColor(); // this.measureStyleModel.backColor = this.colorsForm.UserPrimaryColor.ToColor().ToArgb(); this.colorsForm1.Close(); } private void panel5Click(object sender, EventArgs e) { this.colorsForm2.UserPrimaryColor = ColorBgra.FromColor(this.panel5.BackColor); this.colorsForm2.setSaveBtn_Click(new System.EventHandler(this.panel5Changed)); this.colorsForm2.ShowDialog(); } private void panel5Changed(object sender, EventArgs e) { this.panel5.BackColor = this.colorsForm2.UserPrimaryColor.ToColor(); this.colorsForm2.Close(); } private void panel4Click(object sender, EventArgs e) { this.colorsForm3.UserPrimaryColor = ColorBgra.FromColor(this.panel4.BackColor); this.colorsForm3.setSaveBtn_Click(new System.EventHandler(this.panel4Changed)); this.colorsForm3.ShowDialog(); } private void panel4Changed(object sender, EventArgs e) { this.panel4.BackColor = this.colorsForm3.UserPrimaryColor.ToColor(); this.colorsForm3.Close(); } private void panel8Click(object sender, EventArgs e) { this.colorsForm4.UserPrimaryColor = ColorBgra.FromColor(this.panel8.BackColor); this.colorsForm4.setSaveBtn_Click(new System.EventHandler(this.panel8Changed)); this.colorsForm4.ShowDialog(); } private void panel8Changed(object sender, EventArgs e) { this.panel8.BackColor = this.colorsForm4.UserPrimaryColor.ToColor(); this.colorsForm4.Close(); } private void panel9Click(object sender, EventArgs e) { this.colorsForm5.UserPrimaryColor = ColorBgra.FromColor(this.panel9.BackColor); this.colorsForm5.setSaveBtn_Click(new System.EventHandler(this.panel9Changed)); this.colorsForm5.ShowDialog(); } private void panel9Changed(object sender, EventArgs e) { this.panel9.BackColor = this.colorsForm5.UserPrimaryColor.ToColor(); this.colorsForm5.Close(); } private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce) { } /// /// 检查保存类型 /// private void checkSaveModel() { chooseStyleModel chooseStyle = new chooseStyleModel(); chooseStyle.font = this.comboBox20.Text; chooseStyle.fontSize = (int)this.numericUpDown5.Value; chooseStyle.textColor = this.panel9.BackColor.ToArgb(); chooseStyle.vLineLength = (int)this.numericUpDown3.Value; chooseStyle.lineColor = this.panel8.BackColor.ToArgb(); chooseStyle.lineStyle = this.comboBox18.SelectedIndex; chooseStyle.lineWidth = (int)this.numericUpDown4.Value; string font = comboBox11.Text; int fontSize = Convert.ToInt32(numericUpDown21.Value); int textColor = Convert.ToInt32(this.textPanel.BackColor.ToArgb()); int lineColor = Convert.ToInt32(this.linePanel.BackColor.ToArgb()); int lineWidth = Convert.ToInt32(numericUpDown11.Value); int lineStyle = this.comboBox21.SelectedIndex; int linePosition = this.comboBox2.SelectedIndex; int linePositionL = this.comboBox3.SelectedIndex; int linePositionP = this.comboBox4.SelectedIndex; int vLineLength = Convert.ToInt32(this.numericUpDown1.Value); bool isAngle = comboBox91.SelectedIndex == 0 ? false : true; string aliasName = textBox1.Text; string suffixName = textBox2.Text; bool showAlias = this.comboBox6.SelectedIndex == 0 ? true : false; bool showSuffix = this.comboBox7.SelectedIndex == 0 ? true : false; bool showSerial = this.comboBox8.SelectedIndex == 0 ? true : false; switch (this.drawToolType) { case DrawToolType.MeasureLine: //长度测量直线 this.measureStyleModel.measureLine.font = font; this.measureStyleModel.measureLine.fontSize = fontSize; this.measureStyleModel.measureLine.textColor = textColor; this.measureStyleModel.measureLine.lineColor = lineColor; this.measureStyleModel.measureLine.lineWidth = lineWidth; this.measureStyleModel.measureLine.lineStyle = lineStyle; this.measureStyleModel.measureLine.linePosition = linePosition; this.measureStyleModel.measureLine.vLineLength = vLineLength; this.measureStyleModel.measureLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureLine.aliasName = aliasName; this.measureStyleModel.measureLine.suffixName = suffixName; this.measureStyleModel.measureLine.showAlias = showAlias; this.measureStyleModel.measureLine.showSuffix = showSuffix; this.measureStyleModel.measureLine.showSerial = showSerial; this.measureStyleModel.measureLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureDistanceLine: //距离 this.measureStyleModel.measureDistanceLine.font = font; this.measureStyleModel.measureDistanceLine.fontSize = fontSize; this.measureStyleModel.measureDistanceLine.textColor = textColor; this.measureStyleModel.measureDistanceLine.lineColor = lineColor; this.measureStyleModel.measureDistanceLine.lineWidth = lineWidth; this.measureStyleModel.measureDistanceLine.lineStyle = lineStyle; this.measureStyleModel.measureDistanceLine.linePosition = linePosition; this.measureStyleModel.measureDistanceLine.aliasName = aliasName; this.measureStyleModel.measureDistanceLine.suffixName = suffixName; this.measureStyleModel.measureDistanceLine.showAlias = showAlias; this.measureStyleModel.measureDistanceLine.showSuffix = showSuffix; this.measureStyleModel.measureDistanceLine.showSerial = showSerial; this.measureStyleModel.measureDistanceLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureLength: //长度测量->长度 this.measureStyleModel.measureLength.font = font; this.measureStyleModel.measureLength.fontSize = fontSize; this.measureStyleModel.measureLength.textColor = textColor; this.measureStyleModel.measureLength.lineColor = lineColor; this.measureStyleModel.measureLength.lineWidth = lineWidth; this.measureStyleModel.measureLength.lineStyle = lineStyle; this.measureStyleModel.measureLength.linePosition = linePosition; this.measureStyleModel.measureLength.aliasName = aliasName; this.measureStyleModel.measureLength.suffixName = suffixName; this.measureStyleModel.measureLength.showAlias = showAlias; this.measureStyleModel.measureLength.showSuffix = showSuffix; this.measureStyleModel.measureLength.showSerial = showSerial; this.measureStyleModel.measureLength.chooseStyle = chooseStyle; break; case DrawToolType.MeasureHLine: //长度测量->水平线 this.measureStyleModel.measureHLine.font = font; this.measureStyleModel.measureHLine.fontSize = fontSize; this.measureStyleModel.measureHLine.textColor = textColor; this.measureStyleModel.measureHLine.lineColor = lineColor; this.measureStyleModel.measureHLine.lineWidth = lineWidth; this.measureStyleModel.measureHLine.lineStyle = lineStyle; this.measureStyleModel.measureHLine.linePosition = linePosition; this.measureStyleModel.measureHLine.vLineLength = vLineLength; this.measureStyleModel.measureHLine.aliasName = aliasName; this.measureStyleModel.measureHLine.suffixName = suffixName; this.measureStyleModel.measureHLine.showAlias = showAlias; this.measureStyleModel.measureHLine.showSuffix = showSuffix; this.measureStyleModel.measureHLine.showSerial = showSerial; this.measureStyleModel.measureHLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureVLine: //长度测量->垂线 this.measureStyleModel.measureVLine.font = font; this.measureStyleModel.measureVLine.fontSize = fontSize; this.measureStyleModel.measureVLine.textColor = textColor; this.measureStyleModel.measureVLine.lineColor = lineColor; this.measureStyleModel.measureVLine.lineWidth = lineWidth; this.measureStyleModel.measureVLine.lineStyle = lineStyle; this.measureStyleModel.measureVLine.linePosition = linePosition; this.measureStyleModel.measureVLine.vLineLength = vLineLength; this.measureStyleModel.measureVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureVLine.aliasName = aliasName; this.measureStyleModel.measureVLine.suffixName = suffixName; this.measureStyleModel.measureVLine.showAlias = showAlias; this.measureStyleModel.measureVLine.showSuffix = showSuffix; this.measureStyleModel.measureVLine.showSerial = showSerial; this.measureStyleModel.measureVLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulLine: //多点线段->多点直线 this.measureStyleModel.measureMulLine.font = font; this.measureStyleModel.measureMulLine.fontSize = fontSize; this.measureStyleModel.measureMulLine.textColor = textColor; this.measureStyleModel.measureMulLine.lineColor = lineColor; this.measureStyleModel.measureMulLine.lineWidth = lineWidth; this.measureStyleModel.measureMulLine.lineStyle = lineStyle; this.measureStyleModel.measureMulLine.linePositionL = linePositionL; this.measureStyleModel.measureMulLine.linePositionP = linePositionP; this.measureStyleModel.measureMulLine.vLineLength = vLineLength; this.measureStyleModel.measureMulLine.aliasName = aliasName; this.measureStyleModel.measureMulLine.suffixName = suffixName; this.measureStyleModel.measureMulLine.showAlias = showAlias; this.measureStyleModel.measureMulLine.showSuffix = showSuffix; this.measureStyleModel.measureMulLine.showSerial = showSerial; this.measureStyleModel.measureMulLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulHVLine: //多点线段->多点水平线 this.measureStyleModel.measureMulHVLine.font = font; this.measureStyleModel.measureMulHVLine.fontSize = fontSize; this.measureStyleModel.measureMulHVLine.textColor = textColor; this.measureStyleModel.measureMulHVLine.lineColor = lineColor; this.measureStyleModel.measureMulHVLine.lineWidth = lineWidth; this.measureStyleModel.measureMulHVLine.lineStyle = lineStyle; this.measureStyleModel.measureMulHVLine.linePositionL = linePositionL; this.measureStyleModel.measureMulHVLine.linePositionP = linePositionP; this.measureStyleModel.measureMulHVLine.vLineLength = vLineLength; this.measureStyleModel.measureMulHVLine.aliasName = aliasName; this.measureStyleModel.measureMulHVLine.suffixName = suffixName; this.measureStyleModel.measureMulHVLine.showAlias = showAlias; this.measureStyleModel.measureMulHVLine.showSuffix = showSuffix; this.measureStyleModel.measureMulHVLine.showSerial = showSerial; this.measureStyleModel.measureMulHVLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulSegment: //多点线段->多点线段 this.measureStyleModel.measureMulSegment.font = font; this.measureStyleModel.measureMulSegment.fontSize = fontSize; this.measureStyleModel.measureMulSegment.textColor = textColor; this.measureStyleModel.measureMulSegment.lineColor = lineColor; this.measureStyleModel.measureMulSegment.lineWidth = lineWidth; this.measureStyleModel.measureMulSegment.lineStyle = lineStyle; this.measureStyleModel.measureMulSegment.linePositionL = linePositionL; this.measureStyleModel.measureMulSegment.linePositionP = linePositionP; this.measureStyleModel.measureMulSegment.vLineLength = vLineLength; this.measureStyleModel.measureMulSegment.aliasName = aliasName; this.measureStyleModel.measureMulSegment.suffixName = suffixName; this.measureStyleModel.measureMulSegment.showAlias = showAlias; this.measureStyleModel.measureMulSegment.showSuffix = showSuffix; this.measureStyleModel.measureMulSegment.showSerial = showSerial; this.measureStyleModel.measureMulSegment.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulVLine: //多点线段->多点垂直线 this.measureStyleModel.measureMulVLine.font = font; this.measureStyleModel.measureMulVLine.fontSize = fontSize; this.measureStyleModel.measureMulVLine.textColor = textColor; this.measureStyleModel.measureMulVLine.lineColor = lineColor; this.measureStyleModel.measureMulVLine.lineWidth = lineWidth; this.measureStyleModel.measureMulVLine.lineStyle = lineStyle; this.measureStyleModel.measureMulVLine.linePositionL = linePositionL; this.measureStyleModel.measureMulVLine.linePositionP = linePositionP; this.measureStyleModel.measureMulVLine.vLineLength = vLineLength; this.measureStyleModel.measureMulVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureMulVLine.aliasName = aliasName; this.measureStyleModel.measureMulVLine.suffixName = suffixName; this.measureStyleModel.measureMulVLine.showAlias = showAlias; this.measureStyleModel.measureMulVLine.showSuffix = showSuffix; this.measureStyleModel.measureMulVLine.showSerial = showSerial; this.measureStyleModel.measureMulVLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureBrokenLine: //曲线长度->折线 this.measureStyleModel.measureBrokenLine.font = font; this.measureStyleModel.measureBrokenLine.fontSize = fontSize; this.measureStyleModel.measureBrokenLine.textColor = textColor; this.measureStyleModel.measureBrokenLine.lineColor = lineColor; this.measureStyleModel.measureBrokenLine.lineWidth = lineWidth; this.measureStyleModel.measureBrokenLine.lineStyle = lineStyle; this.measureStyleModel.measureBrokenLine.linePosition = linePosition; this.measureStyleModel.measureBrokenLine.aliasName = aliasName; this.measureStyleModel.measureBrokenLine.suffixName = suffixName; this.measureStyleModel.measureBrokenLine.showAlias = showAlias; this.measureStyleModel.measureBrokenLine.showSuffix = showSuffix; this.measureStyleModel.measureBrokenLine.showSerial = showSerial; this.measureStyleModel.measureBrokenLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureTraceCurve: //曲线长度->轨迹曲线 this.measureStyleModel.measureTraceCurve.font = font; this.measureStyleModel.measureTraceCurve.fontSize = fontSize; this.measureStyleModel.measureTraceCurve.textColor = textColor; this.measureStyleModel.measureTraceCurve.lineColor = lineColor; this.measureStyleModel.measureTraceCurve.lineWidth = lineWidth; this.measureStyleModel.measureTraceCurve.lineStyle = lineStyle; this.measureStyleModel.measureTraceCurve.linePosition = linePosition; this.measureStyleModel.measureTraceCurve.aliasName = aliasName; this.measureStyleModel.measureTraceCurve.suffixName = suffixName; this.measureStyleModel.measureTraceCurve.showAlias = showAlias; this.measureStyleModel.measureTraceCurve.showSuffix = showSuffix; this.measureStyleModel.measureTraceCurve.showSerial = showSerial; this.measureStyleModel.measureTraceCurve.chooseStyle = chooseStyle; break; case DrawToolType.MeasureCurveLine: //曲线长度->曲线 this.measureStyleModel.measureCurveLine.font = font; this.measureStyleModel.measureCurveLine.fontSize = fontSize; this.measureStyleModel.measureCurveLine.textColor = textColor; this.measureStyleModel.measureCurveLine.lineColor = lineColor; this.measureStyleModel.measureCurveLine.lineWidth = lineWidth; this.measureStyleModel.measureCurveLine.lineStyle = lineStyle; this.measureStyleModel.measureCurveLine.linePosition = linePosition; this.measureStyleModel.measureCurveLine.aliasName = aliasName; this.measureStyleModel.measureCurveLine.suffixName = suffixName; this.measureStyleModel.measureCurveLine.showAlias = showAlias; this.measureStyleModel.measureCurveLine.showSuffix = showSuffix; this.measureStyleModel.measureCurveLine.showSerial = showSerial; this.measureStyleModel.measureCurveLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePLine: //点垂线->点垂线 this.measureStyleModel.measurePLine.font = font; this.measureStyleModel.measurePLine.fontSize = fontSize; this.measureStyleModel.measurePLine.textColor = textColor; this.measureStyleModel.measurePLine.lineColor = lineColor; this.measureStyleModel.measurePLine.lineWidth = lineWidth; this.measureStyleModel.measurePLine.lineStyle = lineStyle; this.measureStyleModel.measurePLine.linePositionL = linePositionL; this.measureStyleModel.measurePLine.linePositionP = linePositionP; this.measureStyleModel.measurePLine.aliasName = aliasName; this.measureStyleModel.measurePLine.suffixName = suffixName; this.measureStyleModel.measurePLine.showAlias = showAlias; this.measureStyleModel.measurePLine.showSuffix = showSuffix; this.measureStyleModel.measurePLine.showSerial = showSerial; this.measureStyleModel.measurePLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulPLine: //点垂线->多点垂线 this.measureStyleModel.measureMulPLine.font = font; this.measureStyleModel.measureMulPLine.fontSize = fontSize; this.measureStyleModel.measureMulPLine.textColor = textColor; this.measureStyleModel.measureMulPLine.lineColor = lineColor; this.measureStyleModel.measureMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureMulPLine.aliasName = aliasName; this.measureStyleModel.measureMulPLine.suffixName = suffixName; this.measureStyleModel.measureMulPLine.showAlias = showAlias; this.measureStyleModel.measureMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureMulPLine.showSerial = showSerial; this.measureStyleModel.measureMulPLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureHMulPLine: //点垂线->水平多点垂线 this.measureStyleModel.measureHMulPLine.font = font; this.measureStyleModel.measureHMulPLine.fontSize = fontSize; this.measureStyleModel.measureHMulPLine.textColor = textColor; this.measureStyleModel.measureHMulPLine.lineColor = lineColor; this.measureStyleModel.measureHMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureHMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureHMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureHMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureHMulPLine.aliasName = aliasName; this.measureStyleModel.measureHMulPLine.suffixName = suffixName; this.measureStyleModel.measureHMulPLine.showAlias = showAlias; this.measureStyleModel.measureHMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureHMulPLine.showSerial = showSerial; this.measureStyleModel.measureHMulPLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureVMulPLine: //点垂线->垂直多点垂线 this.measureStyleModel.measureVMulPLine.font = font; this.measureStyleModel.measureVMulPLine.fontSize = fontSize; this.measureStyleModel.measureVMulPLine.textColor = textColor; this.measureStyleModel.measureVMulPLine.lineColor = lineColor; this.measureStyleModel.measureVMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureVMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureVMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureVMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureVMulPLine.aliasName = aliasName; this.measureStyleModel.measureVMulPLine.suffixName = suffixName; this.measureStyleModel.measureVMulPLine.showAlias = showAlias; this.measureStyleModel.measureVMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureVMulPLine.showSerial = showSerial; this.measureStyleModel.measureVMulPLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePointHLine: //点垂线->点到水平线距离 this.measureStyleModel.measurePointHLine.font = font; this.measureStyleModel.measurePointHLine.fontSize = fontSize; this.measureStyleModel.measurePointHLine.textColor = textColor; this.measureStyleModel.measurePointHLine.lineColor = lineColor; this.measureStyleModel.measurePointHLine.lineWidth = lineWidth; this.measureStyleModel.measurePointHLine.lineStyle = lineStyle; this.measureStyleModel.measurePointHLine.linePositionL = linePositionL; this.measureStyleModel.measurePointHLine.linePositionP = linePositionP; this.measureStyleModel.measurePointHLine.aliasName = aliasName; this.measureStyleModel.measurePointHLine.suffixName = suffixName; this.measureStyleModel.measurePointHLine.showAlias = showAlias; this.measureStyleModel.measurePointHLine.showSuffix = showSuffix; this.measureStyleModel.measurePointHLine.showSerial = showSerial; this.measureStyleModel.measurePointHLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureParallelLine: //平行线测量->平行线 this.measureStyleModel.measureParallelLine.font = font; this.measureStyleModel.measureParallelLine.fontSize = fontSize; this.measureStyleModel.measureParallelLine.textColor = textColor; this.measureStyleModel.measureParallelLine.lineColor = lineColor; this.measureStyleModel.measureParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureParallelLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureParallelLine.aliasName = aliasName; this.measureStyleModel.measureParallelLine.suffixName = suffixName; this.measureStyleModel.measureParallelLine.showAlias = showAlias; this.measureStyleModel.measureParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureParallelLine.showSerial = showSerial; this.measureStyleModel.measureParallelLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureMulParallelLine: //平行线测量->多点平行线 this.measureStyleModel.measureMulParallelLine.font = font; this.measureStyleModel.measureMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureMulParallelLine.textColor = textColor; this.measureStyleModel.measureMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureMulParallelLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureVMulParallelLine: //平行线测量->垂直多点平行线 this.measureStyleModel.measureVMulParallelLine.font = font; this.measureStyleModel.measureVMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureVMulParallelLine.textColor = textColor; this.measureStyleModel.measureVMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureVMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureVMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureVMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureVMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureVMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureVMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureVMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureVMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureVMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureVMulParallelLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureHMulParallelLine: //平行线测量->水平多点平行线 this.measureStyleModel.measureHMulParallelLine.font = font; this.measureStyleModel.measureHMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureHMulParallelLine.textColor = textColor; this.measureStyleModel.measureHMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureHMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureHMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureHMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureHMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureHMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureHMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureHMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureHMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureHMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureHMulParallelLine.chooseStyle = chooseStyle; break; case DrawToolType.MeasureClosedCurve: //多边形测量->闭合曲线 this.measureStyleModel.measureClosedCurve.font = font; this.measureStyleModel.measureClosedCurve.fontSize = fontSize; this.measureStyleModel.measureClosedCurve.textColor = textColor; this.measureStyleModel.measureClosedCurve.lineColor = lineColor; this.measureStyleModel.measureClosedCurve.lineWidth = lineWidth; this.measureStyleModel.measureClosedCurve.lineStyle = lineStyle; this.measureStyleModel.measureClosedCurve.aliasName = aliasName; this.measureStyleModel.measureClosedCurve.suffixName = suffixName; this.measureStyleModel.measureClosedCurve.showAlias = showAlias; this.measureStyleModel.measureClosedCurve.showSuffix = showSuffix; this.measureStyleModel.measureClosedCurve.showSerial = showSerial; this.measureStyleModel.measureClosedCurve.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePolygon: //多边形测量->多边形 this.measureStyleModel.measurePolygon.font = font; this.measureStyleModel.measurePolygon.fontSize = fontSize; this.measureStyleModel.measurePolygon.textColor = textColor; this.measureStyleModel.measurePolygon.lineColor = lineColor; this.measureStyleModel.measurePolygon.lineWidth = lineWidth; this.measureStyleModel.measurePolygon.lineStyle = lineStyle; this.measureStyleModel.measurePolygon.aliasName = aliasName; this.measureStyleModel.measurePolygon.suffixName = suffixName; this.measureStyleModel.measurePolygon.showAlias = showAlias; this.measureStyleModel.measurePolygon.showSuffix = showSuffix; this.measureStyleModel.measurePolygon.showSerial = showSerial; this.measureStyleModel.measurePolygon.chooseStyle = chooseStyle; break; case DrawToolType.MeasureRectangle: //多边形测量->矩形 this.measureStyleModel.measureRectangle.font = font; this.measureStyleModel.measureRectangle.fontSize = fontSize; this.measureStyleModel.measureRectangle.textColor = textColor; this.measureStyleModel.measureRectangle.lineColor = lineColor; this.measureStyleModel.measureRectangle.lineWidth = lineWidth; this.measureStyleModel.measureRectangle.lineStyle = lineStyle; this.measureStyleModel.measureRectangle.aliasName = aliasName; this.measureStyleModel.measureRectangle.suffixName = suffixName; this.measureStyleModel.measureRectangle.showAlias = showAlias; this.measureStyleModel.measureRectangle.showSuffix = showSuffix; this.measureStyleModel.measureRectangle.showSerial = showSerial; this.measureStyleModel.measureRectangle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureRandRectangle: //多边形测量->任意矩形 this.measureStyleModel.measureRandRectangle.font = font; this.measureStyleModel.measureRandRectangle.fontSize = fontSize; this.measureStyleModel.measureRandRectangle.textColor = textColor; this.measureStyleModel.measureRandRectangle.lineColor = lineColor; this.measureStyleModel.measureRandRectangle.lineWidth = lineWidth; this.measureStyleModel.measureRandRectangle.lineStyle = lineStyle; this.measureStyleModel.measureRandRectangle.aliasName = aliasName; this.measureStyleModel.measureRandRectangle.suffixName = suffixName; this.measureStyleModel.measureRandRectangle.showAlias = showAlias; this.measureStyleModel.measureRandRectangle.showSuffix = showSuffix; this.measureStyleModel.measureRandRectangle.showSerial = showSerial; this.measureStyleModel.measureRandRectangle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureSquare: //多边形测量->正方形 this.measureStyleModel.measureSquare.font = font; this.measureStyleModel.measureSquare.fontSize = fontSize; this.measureStyleModel.measureSquare.textColor = textColor; this.measureStyleModel.measureSquare.lineColor = lineColor; this.measureStyleModel.measureSquare.lineWidth = lineWidth; this.measureStyleModel.measureSquare.lineStyle = lineStyle; this.measureStyleModel.measureSquare.aliasName = aliasName; this.measureStyleModel.measureSquare.suffixName = suffixName; this.measureStyleModel.measureSquare.showAlias = showAlias; this.measureStyleModel.measureSquare.showSuffix = showSuffix; this.measureStyleModel.measureSquare.showSerial = showSerial; this.measureStyleModel.measureSquare.chooseStyle = chooseStyle; break; case DrawToolType.MeasureRandSquare: //多边形测量->任意正方形 this.measureStyleModel.measureRandSquare.font = font; this.measureStyleModel.measureRandSquare.fontSize = fontSize; this.measureStyleModel.measureRandSquare.textColor = textColor; this.measureStyleModel.measureRandSquare.lineColor = lineColor; this.measureStyleModel.measureRandSquare.lineWidth = lineWidth; this.measureStyleModel.measureRandSquare.lineStyle = lineStyle; this.measureStyleModel.measureRandSquare.aliasName = aliasName; this.measureStyleModel.measureRandSquare.suffixName = suffixName; this.measureStyleModel.measureRandSquare.showAlias = showAlias; this.measureStyleModel.measureRandSquare.showSuffix = showSuffix; this.measureStyleModel.measureRandSquare.showSerial = showSerial; this.measureStyleModel.measureRandSquare.chooseStyle = chooseStyle; break; case DrawToolType.MeasureTracePolygon: //多边形测量->轨迹多边形 this.measureStyleModel.measureTracePolygon.font = font; this.measureStyleModel.measureTracePolygon.fontSize = fontSize; this.measureStyleModel.measureTracePolygon.textColor = textColor; this.measureStyleModel.measureTracePolygon.lineColor = lineColor; this.measureStyleModel.measureTracePolygon.lineWidth = lineWidth; this.measureStyleModel.measureTracePolygon.lineStyle = lineStyle; this.measureStyleModel.measureTracePolygon.aliasName = aliasName; this.measureStyleModel.measureTracePolygon.suffixName = suffixName; this.measureStyleModel.measureTracePolygon.showAlias = showAlias; this.measureStyleModel.measureTracePolygon.showSuffix = showSuffix; this.measureStyleModel.measureTracePolygon.showSerial = showSerial; this.measureStyleModel.measureTracePolygon.chooseStyle = chooseStyle; break; case DrawToolType.MeasureCircle: //圆形测量->三点圆 this.measureStyleModel.measureCircle.font = font; this.measureStyleModel.measureCircle.fontSize = fontSize; this.measureStyleModel.measureCircle.textColor = textColor; this.measureStyleModel.measureCircle.lineColor = lineColor; this.measureStyleModel.measureCircle.lineWidth = lineWidth; this.measureStyleModel.measureCircle.lineStyle = lineStyle; this.measureStyleModel.measureCircle.aliasName = aliasName; this.measureStyleModel.measureCircle.suffixName = suffixName; this.measureStyleModel.measureCircle.showAlias = showAlias; this.measureStyleModel.measureCircle.showSuffix = showSuffix; this.measureStyleModel.measureCircle.showSerial = showSerial; this.measureStyleModel.measureCircle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureInnerCircle: //圆形测量->向内画圆 this.measureStyleModel.measureInnerCircle.font = font; this.measureStyleModel.measureInnerCircle.fontSize = fontSize; this.measureStyleModel.measureInnerCircle.textColor = textColor; this.measureStyleModel.measureInnerCircle.lineColor = lineColor; this.measureStyleModel.measureInnerCircle.lineWidth = lineWidth; this.measureStyleModel.measureInnerCircle.lineStyle = lineStyle; this.measureStyleModel.measureInnerCircle.aliasName = aliasName; this.measureStyleModel.measureInnerCircle.suffixName = suffixName; this.measureStyleModel.measureInnerCircle.showAlias = showAlias; this.measureStyleModel.measureInnerCircle.showSuffix = showSuffix; this.measureStyleModel.measureInnerCircle.showSerial = showSerial; this.measureStyleModel.measureInnerCircle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureOuterCircle: //圆形测量->向外画圆 this.measureStyleModel.measureOuterCircle.font = font; this.measureStyleModel.measureOuterCircle.fontSize = fontSize; this.measureStyleModel.measureOuterCircle.textColor = textColor; this.measureStyleModel.measureOuterCircle.lineColor = lineColor; this.measureStyleModel.measureOuterCircle.lineWidth = lineWidth; this.measureStyleModel.measureOuterCircle.lineStyle = lineStyle; this.measureStyleModel.measureOuterCircle.aliasName = aliasName; this.measureStyleModel.measureOuterCircle.suffixName = suffixName; this.measureStyleModel.measureOuterCircle.showAlias = showAlias; this.measureStyleModel.measureOuterCircle.showSuffix = showSuffix; this.measureStyleModel.measureOuterCircle.showSerial = showSerial; this.measureStyleModel.measureOuterCircle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureDiameterCircle: //圆形测量->直径画圆 this.measureStyleModel.measureDiameterCircle.font = font; this.measureStyleModel.measureDiameterCircle.fontSize = fontSize; this.measureStyleModel.measureDiameterCircle.textColor = textColor; this.measureStyleModel.measureDiameterCircle.lineColor = lineColor; this.measureStyleModel.measureDiameterCircle.lineWidth = lineWidth; this.measureStyleModel.measureDiameterCircle.lineStyle = lineStyle; this.measureStyleModel.measureDiameterCircle.aliasName = aliasName; this.measureStyleModel.measureDiameterCircle.suffixName = suffixName; this.measureStyleModel.measureDiameterCircle.showAlias = showAlias; this.measureStyleModel.measureDiameterCircle.showSuffix = showSuffix; this.measureStyleModel.measureDiameterCircle.showSerial = showSerial; this.measureStyleModel.measureDiameterCircle.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePointEdgeSize: //圆形测量->点到圆距离 this.measureStyleModel.measurePointEdgeSize.font = font; this.measureStyleModel.measurePointEdgeSize.fontSize = fontSize; this.measureStyleModel.measurePointEdgeSize.textColor = textColor; this.measureStyleModel.measurePointEdgeSize.lineColor = lineColor; this.measureStyleModel.measurePointEdgeSize.lineWidth = lineWidth; this.measureStyleModel.measurePointEdgeSize.lineStyle = lineStyle; this.measureStyleModel.measurePointEdgeSize.aliasName = aliasName; this.measureStyleModel.measurePointEdgeSize.suffixName = suffixName; this.measureStyleModel.measurePointEdgeSize.showAlias = showAlias; this.measureStyleModel.measurePointEdgeSize.showSuffix = showSuffix; this.measureStyleModel.measurePointEdgeSize.showSerial = showSerial; this.measureStyleModel.measurePointEdgeSize.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePointCenterSize: //圆形测量->点到圆心距离 this.measureStyleModel.measurePointCenterSize.font = font; this.measureStyleModel.measurePointCenterSize.fontSize = fontSize; this.measureStyleModel.measurePointCenterSize.textColor = textColor; this.measureStyleModel.measurePointCenterSize.lineColor = lineColor; this.measureStyleModel.measurePointCenterSize.lineWidth = lineWidth; this.measureStyleModel.measurePointCenterSize.lineStyle = lineStyle; this.measureStyleModel.measurePointCenterSize.aliasName = aliasName; this.measureStyleModel.measurePointCenterSize.suffixName = suffixName; this.measureStyleModel.measurePointCenterSize.showAlias = showAlias; this.measureStyleModel.measurePointCenterSize.showSuffix = showSuffix; this.measureStyleModel.measurePointCenterSize.showSerial = showSerial; this.measureStyleModel.measurePointCenterSize.chooseStyle = chooseStyle; break; case DrawToolType.MeasurePointArcSize: //圆形测量->点到圆弧距离 this.measureStyleModel.measurePointArcSize.font = font; this.measureStyleModel.measurePointArcSize.fontSize = fontSize; this.measureStyleModel.measurePointArcSize.textColor = textColor; this.measureStyleModel.measurePointArcSize.lineColor = lineColor; this.measureStyleModel.measurePointArcSize.lineWidth = lineWidth; this.measureStyleModel.measurePointArcSize.lineStyle = lineStyle; this.measureStyleModel.measurePointArcSize.aliasName = aliasName; this.measureStyleModel.measurePointArcSize.suffixName = suffixName; this.measureStyleModel.measurePointArcSize.showAlias = showAlias; this.measureStyleModel.measurePointArcSize.showSuffix = showSuffix; this.measureStyleModel.measurePointArcSize.showSerial = showSerial; this.measureStyleModel.measurePointArcSize.chooseStyle = chooseStyle; break; case DrawToolType.MeasureThreePointAngle: //角度测量->三点角度 this.measureStyleModel.measureThreePointAngle.font = font; this.measureStyleModel.measureThreePointAngle.fontSize = fontSize; this.measureStyleModel.measureThreePointAngle.textColor = textColor; this.measureStyleModel.measureThreePointAngle.lineColor = lineColor; this.measureStyleModel.measureThreePointAngle.lineWidth = lineWidth; this.measureStyleModel.measureThreePointAngle.lineStyle = lineStyle; this.measureStyleModel.measureThreePointAngle.isAngle = isAngle; this.measureStyleModel.measureThreePointAngle.aliasName = aliasName; this.measureStyleModel.measureThreePointAngle.suffixName = suffixName; this.measureStyleModel.measureThreePointAngle.showAlias = showAlias; this.measureStyleModel.measureThreePointAngle.showSuffix = showSuffix; this.measureStyleModel.measureThreePointAngle.showSerial = showSerial; this.measureStyleModel.measureThreePointAngle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureFourPointAngle: //角度测量->四点角度 this.measureStyleModel.measureFourPointAngle.font = font; this.measureStyleModel.measureFourPointAngle.fontSize = fontSize; this.measureStyleModel.measureFourPointAngle.textColor = textColor; this.measureStyleModel.measureFourPointAngle.lineColor = lineColor; this.measureStyleModel.measureFourPointAngle.lineWidth = lineWidth; this.measureStyleModel.measureFourPointAngle.lineStyle = lineStyle; this.measureStyleModel.measureFourPointAngle.isAngle = isAngle; this.measureStyleModel.measureFourPointAngle.aliasName = aliasName; this.measureStyleModel.measureFourPointAngle.suffixName = suffixName; this.measureStyleModel.measureFourPointAngle.showAlias = showAlias; this.measureStyleModel.measureFourPointAngle.showSuffix = showSuffix; this.measureStyleModel.measureFourPointAngle.showSerial = showSerial; this.measureStyleModel.measureFourPointAngle.chooseStyle = chooseStyle; break; case DrawToolType.MeasureThreePointArc: //角度测量->三点弧 this.measureStyleModel.measureThreePointArc.font = font; this.measureStyleModel.measureThreePointArc.fontSize = fontSize; this.measureStyleModel.measureThreePointArc.textColor = textColor; this.measureStyleModel.measureThreePointArc.lineColor = lineColor; this.measureStyleModel.measureThreePointArc.lineWidth = lineWidth; this.measureStyleModel.measureThreePointArc.lineStyle = lineStyle; this.measureStyleModel.measureThreePointArc.isAngle = isAngle; this.measureStyleModel.measureThreePointArc.aliasName = aliasName; this.measureStyleModel.measureThreePointArc.suffixName = suffixName; this.measureStyleModel.measureThreePointArc.showAlias = showAlias; this.measureStyleModel.measureThreePointArc.showSuffix = showSuffix; this.measureStyleModel.measureThreePointArc.showSerial = showSerial; this.measureStyleModel.measureThreePointArc.chooseStyle = chooseStyle; break; case DrawToolType.MeasureCenterCenterSize: //对准度测量->圆心到圆心距离 this.measureStyleModel.measureCenterCenterSize.font = font; this.measureStyleModel.measureCenterCenterSize.fontSize = fontSize; this.measureStyleModel.measureCenterCenterSize.textColor = textColor; this.measureStyleModel.measureCenterCenterSize.lineColor = lineColor; this.measureStyleModel.measureCenterCenterSize.lineWidth = lineWidth; this.measureStyleModel.measureCenterCenterSize.lineStyle = lineStyle; this.measureStyleModel.measureCenterCenterSize.linePosition = linePosition; this.measureStyleModel.measureCenterCenterSize.aliasName = aliasName; this.measureStyleModel.measureCenterCenterSize.suffixName = suffixName; this.measureStyleModel.measureCenterCenterSize.showAlias = showAlias; this.measureStyleModel.measureCenterCenterSize.showSuffix = showSuffix; this.measureStyleModel.measureCenterCenterSize.showSerial = showSerial; this.measureStyleModel.measureCenterCenterSize.chooseStyle = chooseStyle; break; case DrawToolType.MeasureTwoLineVLDistance: //对准度测量->两线中垂线距离 this.measureStyleModel.measureTwoLineVLDistance.font = font; this.measureStyleModel.measureTwoLineVLDistance.fontSize = fontSize; this.measureStyleModel.measureTwoLineVLDistance.textColor = textColor; this.measureStyleModel.measureTwoLineVLDistance.lineColor = lineColor; this.measureStyleModel.measureTwoLineVLDistance.lineWidth = lineWidth; this.measureStyleModel.measureTwoLineVLDistance.lineStyle = lineStyle; this.measureStyleModel.measureTwoLineVLDistance.linePosition = linePosition; this.measureStyleModel.measureTwoLineVLDistance.aliasName = aliasName; this.measureStyleModel.measureTwoLineVLDistance.suffixName = suffixName; this.measureStyleModel.measureTwoLineVLDistance.showAlias = showAlias; this.measureStyleModel.measureTwoLineVLDistance.showSuffix = showSuffix; this.measureStyleModel.measureTwoLineVLDistance.showSerial = showSerial; this.measureStyleModel.measureTwoLineVLDistance.chooseStyle = chooseStyle; break; } } /// /// 应用全部 /// /// /// private void button6_Click(object sender, EventArgs e) { chooseStyleModel chooseStyle = new chooseStyleModel(); chooseStyle.font = this.comboBox20.Text; chooseStyle.fontSize = (int)this.numericUpDown5.Value; chooseStyle.textColor = this.panel9.BackColor.ToArgb(); chooseStyle.vLineLength = (int)this.numericUpDown3.Value; chooseStyle.lineColor = this.panel8.BackColor.ToArgb(); chooseStyle.lineStyle = this.comboBox18.SelectedIndex; chooseStyle.lineWidth = (int)this.numericUpDown4.Value; string font = comboBox11.Text; int fontSize = Convert.ToInt32(numericUpDown21.Value); int textColor = Convert.ToInt32(this.textPanel.BackColor.ToArgb()); int lineColor = Convert.ToInt32(this.linePanel.BackColor.ToArgb()); int lineWidth = Convert.ToInt32(numericUpDown11.Value); int lineStyle = this.comboBox21.SelectedIndex; int linePosition = this.comboBox2.SelectedIndex; int linePositionL = this.comboBox3.SelectedIndex; int linePositionP = this.comboBox4.SelectedIndex; int vLineLength = Convert.ToInt32(this.numericUpDown1.Value); bool isAngle = comboBox91.SelectedIndex == 0 ? false : true; string aliasName = textBox1.Text; string suffixName = textBox2.Text; bool showAlias = this.comboBox6.SelectedIndex == 0 ? true : false; bool showSuffix = this.comboBox7.SelectedIndex == 0 ? true : false; bool showSerial = this.comboBox8.SelectedIndex == 0 ? true : false; switch (this.selectId) { // 直线测量 case 1: this.measureStyleModel.measureLine.font = font; this.measureStyleModel.measureLine.fontSize = fontSize; this.measureStyleModel.measureLine.textColor = textColor; this.measureStyleModel.measureLine.lineColor = lineColor; this.measureStyleModel.measureLine.lineWidth = lineWidth; this.measureStyleModel.measureLine.lineStyle = lineStyle; this.measureStyleModel.measureLine.linePosition = linePosition; this.measureStyleModel.measureLine.vLineLength = vLineLength; this.measureStyleModel.measureLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureLine.aliasName = aliasName; this.measureStyleModel.measureLine.suffixName = suffixName; this.measureStyleModel.measureLine.showAlias = showAlias; this.measureStyleModel.measureLine.showSuffix = showSuffix; this.measureStyleModel.measureLine.showSerial = showSerial; this.measureStyleModel.measureLine.chooseStyle = chooseStyle; this.measureStyleModel.measureDistanceLine.font = font; this.measureStyleModel.measureDistanceLine.fontSize = fontSize; this.measureStyleModel.measureDistanceLine.textColor = textColor; this.measureStyleModel.measureDistanceLine.lineColor = lineColor; this.measureStyleModel.measureDistanceLine.lineWidth = lineWidth; this.measureStyleModel.measureDistanceLine.lineStyle = lineStyle; this.measureStyleModel.measureDistanceLine.linePosition = linePosition; this.measureStyleModel.measureDistanceLine.aliasName = aliasName; this.measureStyleModel.measureDistanceLine.suffixName = suffixName; this.measureStyleModel.measureDistanceLine.showAlias = showAlias; this.measureStyleModel.measureDistanceLine.showSuffix = showSuffix; this.measureStyleModel.measureDistanceLine.showSerial = showSerial; this.measureStyleModel.measureDistanceLine.chooseStyle = chooseStyle; this.measureStyleModel.measureLength.font = font; this.measureStyleModel.measureLength.fontSize = fontSize; this.measureStyleModel.measureLength.textColor = textColor; this.measureStyleModel.measureLength.lineColor = lineColor; this.measureStyleModel.measureLength.lineWidth = lineWidth; this.measureStyleModel.measureLength.lineStyle = lineStyle; this.measureStyleModel.measureLength.linePosition = linePosition; this.measureStyleModel.measureLength.aliasName = aliasName; this.measureStyleModel.measureLength.suffixName = suffixName; this.measureStyleModel.measureLength.showAlias = showAlias; this.measureStyleModel.measureLength.showSuffix = showSuffix; this.measureStyleModel.measureLength.showSerial = showSerial; this.measureStyleModel.measureLength.chooseStyle = chooseStyle; this.measureStyleModel.measureHLine.font = font; this.measureStyleModel.measureHLine.fontSize = fontSize; this.measureStyleModel.measureHLine.textColor = textColor; this.measureStyleModel.measureHLine.lineColor = lineColor; this.measureStyleModel.measureHLine.lineWidth = lineWidth; this.measureStyleModel.measureHLine.lineStyle = lineStyle; this.measureStyleModel.measureHLine.linePosition = linePosition; this.measureStyleModel.measureHLine.vLineLength = vLineLength; this.measureStyleModel.measureHLine.aliasName = aliasName; this.measureStyleModel.measureHLine.suffixName = suffixName; this.measureStyleModel.measureHLine.showAlias = showAlias; this.measureStyleModel.measureHLine.showSuffix = showSuffix; this.measureStyleModel.measureHLine.showSerial = showSerial; this.measureStyleModel.measureHLine.chooseStyle = chooseStyle; this.measureStyleModel.measureVLine.font = font; this.measureStyleModel.measureVLine.fontSize = fontSize; this.measureStyleModel.measureVLine.textColor = textColor; this.measureStyleModel.measureVLine.lineColor = lineColor; this.measureStyleModel.measureVLine.lineWidth = lineWidth; this.measureStyleModel.measureVLine.lineStyle = lineStyle; this.measureStyleModel.measureVLine.linePosition = linePosition; this.measureStyleModel.measureVLine.vLineLength = vLineLength; this.measureStyleModel.measureVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureVLine.aliasName = aliasName; this.measureStyleModel.measureVLine.suffixName = suffixName; this.measureStyleModel.measureVLine.showAlias = showAlias; this.measureStyleModel.measureVLine.showSuffix = showSuffix; this.measureStyleModel.measureVLine.showSerial = showSerial; this.measureStyleModel.measureVLine.chooseStyle = chooseStyle; break; // 多点直线 case 2: this.measureStyleModel.measureMulLine.font = font; this.measureStyleModel.measureMulLine.fontSize = fontSize; this.measureStyleModel.measureMulLine.textColor = textColor; this.measureStyleModel.measureMulLine.lineColor = lineColor; this.measureStyleModel.measureMulLine.lineWidth = lineWidth; this.measureStyleModel.measureMulLine.lineStyle = lineStyle; this.measureStyleModel.measureMulLine.linePositionL = linePositionL; this.measureStyleModel.measureMulLine.linePositionP = linePositionP; this.measureStyleModel.measureMulLine.vLineLength = vLineLength; this.measureStyleModel.measureMulLine.aliasName = aliasName; this.measureStyleModel.measureMulLine.suffixName = suffixName; this.measureStyleModel.measureMulLine.showAlias = showAlias; this.measureStyleModel.measureMulLine.showSuffix = showSuffix; this.measureStyleModel.measureMulLine.showSerial = showSerial; this.measureStyleModel.measureMulLine.chooseStyle = chooseStyle; this.measureStyleModel.measureMulHVLine.font = font; this.measureStyleModel.measureMulHVLine.fontSize = fontSize; this.measureStyleModel.measureMulHVLine.textColor = textColor; this.measureStyleModel.measureMulHVLine.lineColor = lineColor; this.measureStyleModel.measureMulHVLine.lineWidth = lineWidth; this.measureStyleModel.measureMulHVLine.lineStyle = lineStyle; this.measureStyleModel.measureMulHVLine.linePositionL = linePositionL; this.measureStyleModel.measureMulHVLine.linePositionP = linePositionP; this.measureStyleModel.measureMulHVLine.vLineLength = vLineLength; this.measureStyleModel.measureMulHVLine.aliasName = aliasName; this.measureStyleModel.measureMulHVLine.suffixName = suffixName; this.measureStyleModel.measureMulHVLine.showAlias = showAlias; this.measureStyleModel.measureMulHVLine.showSuffix = showSuffix; this.measureStyleModel.measureMulHVLine.showSerial = showSerial; this.measureStyleModel.measureMulHVLine.chooseStyle = chooseStyle; this.measureStyleModel.measureMulSegment.font = font; this.measureStyleModel.measureMulSegment.fontSize = fontSize; this.measureStyleModel.measureMulSegment.textColor = textColor; this.measureStyleModel.measureMulSegment.lineColor = lineColor; this.measureStyleModel.measureMulSegment.lineWidth = lineWidth; this.measureStyleModel.measureMulSegment.lineStyle = lineStyle; this.measureStyleModel.measureMulSegment.linePositionL = linePositionL; this.measureStyleModel.measureMulSegment.linePositionP = linePositionP; this.measureStyleModel.measureMulSegment.vLineLength = vLineLength; this.measureStyleModel.measureMulSegment.aliasName = aliasName; this.measureStyleModel.measureMulSegment.suffixName = suffixName; this.measureStyleModel.measureMulSegment.showAlias = showAlias; this.measureStyleModel.measureMulSegment.showSuffix = showSuffix; this.measureStyleModel.measureMulSegment.showSerial = showSerial; this.measureStyleModel.measureMulSegment.chooseStyle = chooseStyle; this.measureStyleModel.measureMulVLine.font = font; this.measureStyleModel.measureMulVLine.fontSize = fontSize; this.measureStyleModel.measureMulVLine.textColor = textColor; this.measureStyleModel.measureMulVLine.lineColor = lineColor; this.measureStyleModel.measureMulVLine.lineWidth = lineWidth; this.measureStyleModel.measureMulVLine.lineStyle = lineStyle; this.measureStyleModel.measureMulVLine.linePositionL = linePositionL; this.measureStyleModel.measureMulVLine.linePositionP = linePositionP; this.measureStyleModel.measureMulVLine.vLineLength = vLineLength; this.measureStyleModel.measureMulVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureMulVLine.aliasName = aliasName; this.measureStyleModel.measureMulVLine.suffixName = suffixName; this.measureStyleModel.measureMulVLine.showAlias = showAlias; this.measureStyleModel.measureMulVLine.showSuffix = showSuffix; this.measureStyleModel.measureMulVLine.showSerial = showSerial; this.measureStyleModel.measureMulVLine.chooseStyle = chooseStyle; break; // 曲线测量 case 3: this.measureStyleModel.measureBrokenLine.font = font; this.measureStyleModel.measureBrokenLine.fontSize = fontSize; this.measureStyleModel.measureBrokenLine.textColor = textColor; this.measureStyleModel.measureBrokenLine.lineColor = lineColor; this.measureStyleModel.measureBrokenLine.lineWidth = lineWidth; this.measureStyleModel.measureBrokenLine.lineStyle = lineStyle; this.measureStyleModel.measureBrokenLine.linePosition = linePosition; this.measureStyleModel.measureBrokenLine.aliasName = aliasName; this.measureStyleModel.measureBrokenLine.suffixName = suffixName; this.measureStyleModel.measureBrokenLine.showAlias = showAlias; this.measureStyleModel.measureBrokenLine.showSuffix = showSuffix; this.measureStyleModel.measureBrokenLine.showSerial = showSerial; this.measureStyleModel.measureBrokenLine.chooseStyle = chooseStyle; this.measureStyleModel.measureTraceCurve.font = font; this.measureStyleModel.measureTraceCurve.fontSize = fontSize; this.measureStyleModel.measureTraceCurve.textColor = textColor; this.measureStyleModel.measureTraceCurve.lineColor = lineColor; this.measureStyleModel.measureTraceCurve.lineWidth = lineWidth; this.measureStyleModel.measureTraceCurve.lineStyle = lineStyle; this.measureStyleModel.measureTraceCurve.linePosition = linePosition; this.measureStyleModel.measureTraceCurve.aliasName = aliasName; this.measureStyleModel.measureTraceCurve.suffixName = suffixName; this.measureStyleModel.measureTraceCurve.showAlias = showAlias; this.measureStyleModel.measureTraceCurve.showSuffix = showSuffix; this.measureStyleModel.measureTraceCurve.showSerial = showSerial; this.measureStyleModel.measureTraceCurve.chooseStyle = chooseStyle; this.measureStyleModel.measureCurveLine.font = font; this.measureStyleModel.measureCurveLine.fontSize = fontSize; this.measureStyleModel.measureCurveLine.textColor = textColor; this.measureStyleModel.measureCurveLine.lineColor = lineColor; this.measureStyleModel.measureCurveLine.lineWidth = lineWidth; this.measureStyleModel.measureCurveLine.lineStyle = lineStyle; this.measureStyleModel.measureCurveLine.linePosition = linePosition; this.measureStyleModel.measureCurveLine.aliasName = aliasName; this.measureStyleModel.measureCurveLine.suffixName = suffixName; this.measureStyleModel.measureCurveLine.showAlias = showAlias; this.measureStyleModel.measureCurveLine.showSuffix = showSuffix; this.measureStyleModel.measureCurveLine.showSerial = showSerial; this.measureStyleModel.measureCurveLine.chooseStyle = chooseStyle; break; // 点垂线 case 4: this.measureStyleModel.measurePLine.font = font; this.measureStyleModel.measurePLine.fontSize = fontSize; this.measureStyleModel.measurePLine.textColor = textColor; this.measureStyleModel.measurePLine.lineColor = lineColor; this.measureStyleModel.measurePLine.lineWidth = lineWidth; this.measureStyleModel.measurePLine.lineStyle = lineStyle; this.measureStyleModel.measurePLine.linePositionL = linePositionL; this.measureStyleModel.measurePLine.linePositionP = linePositionP; this.measureStyleModel.measurePLine.aliasName = aliasName; this.measureStyleModel.measurePLine.suffixName = suffixName; this.measureStyleModel.measurePLine.showAlias = showAlias; this.measureStyleModel.measurePLine.showSuffix = showSuffix; this.measureStyleModel.measurePLine.showSerial = showSerial; this.measureStyleModel.measurePLine.chooseStyle = chooseStyle; this.measureStyleModel.measureMulPLine.font = font; this.measureStyleModel.measureMulPLine.fontSize = fontSize; this.measureStyleModel.measureMulPLine.textColor = textColor; this.measureStyleModel.measureMulPLine.lineColor = lineColor; this.measureStyleModel.measureMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureMulPLine.aliasName = aliasName; this.measureStyleModel.measureMulPLine.suffixName = suffixName; this.measureStyleModel.measureMulPLine.showAlias = showAlias; this.measureStyleModel.measureMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureMulPLine.showSerial = showSerial; this.measureStyleModel.measureMulPLine.chooseStyle = chooseStyle; this.measureStyleModel.measureHMulPLine.font = font; this.measureStyleModel.measureHMulPLine.fontSize = fontSize; this.measureStyleModel.measureHMulPLine.textColor = textColor; this.measureStyleModel.measureHMulPLine.lineColor = lineColor; this.measureStyleModel.measureHMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureHMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureHMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureHMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureHMulPLine.aliasName = aliasName; this.measureStyleModel.measureHMulPLine.suffixName = suffixName; this.measureStyleModel.measureHMulPLine.showAlias = showAlias; this.measureStyleModel.measureHMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureHMulPLine.showSerial = showSerial; this.measureStyleModel.measureHMulPLine.chooseStyle = chooseStyle; this.measureStyleModel.measureVMulPLine.font = font; this.measureStyleModel.measureVMulPLine.fontSize = fontSize; this.measureStyleModel.measureVMulPLine.textColor = textColor; this.measureStyleModel.measureVMulPLine.lineColor = lineColor; this.measureStyleModel.measureVMulPLine.lineWidth = lineWidth; this.measureStyleModel.measureVMulPLine.lineStyle = lineStyle; this.measureStyleModel.measureVMulPLine.linePositionL = linePositionL; this.measureStyleModel.measureVMulPLine.linePositionP = linePositionP; this.measureStyleModel.measureVMulPLine.aliasName = aliasName; this.measureStyleModel.measureVMulPLine.suffixName = suffixName; this.measureStyleModel.measureVMulPLine.showAlias = showAlias; this.measureStyleModel.measureVMulPLine.showSuffix = showSuffix; this.measureStyleModel.measureVMulPLine.showSerial = showSerial; this.measureStyleModel.measureVMulPLine.chooseStyle = chooseStyle; this.measureStyleModel.measurePointHLine.font = font; this.measureStyleModel.measurePointHLine.fontSize = fontSize; this.measureStyleModel.measurePointHLine.textColor = textColor; this.measureStyleModel.measurePointHLine.lineColor = lineColor; this.measureStyleModel.measurePointHLine.lineWidth = lineWidth; this.measureStyleModel.measurePointHLine.lineStyle = lineStyle; this.measureStyleModel.measurePointHLine.linePositionL = linePositionL; this.measureStyleModel.measurePointHLine.linePositionP = linePositionP; this.measureStyleModel.measurePointHLine.aliasName = aliasName; this.measureStyleModel.measurePointHLine.suffixName = suffixName; this.measureStyleModel.measurePointHLine.showAlias = showAlias; this.measureStyleModel.measurePointHLine.showSuffix = showSuffix; this.measureStyleModel.measurePointHLine.showSerial = showSerial; this.measureStyleModel.measurePointHLine.chooseStyle = chooseStyle; break; // 平行线测量 case 5: this.measureStyleModel.measureParallelLine.font = font; this.measureStyleModel.measureParallelLine.fontSize = fontSize; this.measureStyleModel.measureParallelLine.textColor = textColor; this.measureStyleModel.measureParallelLine.lineColor = lineColor; this.measureStyleModel.measureParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureParallelLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false; this.measureStyleModel.measureParallelLine.aliasName = aliasName; this.measureStyleModel.measureParallelLine.suffixName = suffixName; this.measureStyleModel.measureParallelLine.showAlias = showAlias; this.measureStyleModel.measureParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureParallelLine.showSerial = showSerial; this.measureStyleModel.measureParallelLine.chooseStyle = chooseStyle; this.measureStyleModel.measureMulParallelLine.font = font; this.measureStyleModel.measureMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureMulParallelLine.textColor = textColor; this.measureStyleModel.measureMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureMulParallelLine.chooseStyle = chooseStyle; this.measureStyleModel.measureVMulParallelLine.font = font; this.measureStyleModel.measureVMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureVMulParallelLine.textColor = textColor; this.measureStyleModel.measureVMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureVMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureVMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureVMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureVMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureVMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureVMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureVMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureVMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureVMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureVMulParallelLine.chooseStyle = chooseStyle; this.measureStyleModel.measureHMulParallelLine.font = font; this.measureStyleModel.measureHMulParallelLine.fontSize = fontSize; this.measureStyleModel.measureHMulParallelLine.textColor = textColor; this.measureStyleModel.measureHMulParallelLine.lineColor = lineColor; this.measureStyleModel.measureHMulParallelLine.lineWidth = lineWidth; this.measureStyleModel.measureHMulParallelLine.lineStyle = lineStyle; this.measureStyleModel.measureHMulParallelLine.linePositionL = linePositionL; this.measureStyleModel.measureHMulParallelLine.linePositionP = linePositionP; this.measureStyleModel.measureHMulParallelLine.aliasName = aliasName; this.measureStyleModel.measureHMulParallelLine.suffixName = suffixName; this.measureStyleModel.measureHMulParallelLine.showAlias = showAlias; this.measureStyleModel.measureHMulParallelLine.showSuffix = showSuffix; this.measureStyleModel.measureHMulParallelLine.showSerial = showSerial; this.measureStyleModel.measureHMulParallelLine.chooseStyle = chooseStyle; break; // 多边形测量 case 6: this.measureStyleModel.measureClosedCurve.font = font; this.measureStyleModel.measureClosedCurve.fontSize = fontSize; this.measureStyleModel.measureClosedCurve.textColor = textColor; this.measureStyleModel.measureClosedCurve.lineColor = lineColor; this.measureStyleModel.measureClosedCurve.lineWidth = lineWidth; this.measureStyleModel.measureClosedCurve.lineStyle = lineStyle; this.measureStyleModel.measureClosedCurve.aliasName = aliasName; this.measureStyleModel.measureClosedCurve.suffixName = suffixName; this.measureStyleModel.measureClosedCurve.showAlias = showAlias; this.measureStyleModel.measureClosedCurve.showSuffix = showSuffix; this.measureStyleModel.measureClosedCurve.showSerial = showSerial; this.measureStyleModel.measureClosedCurve.chooseStyle = chooseStyle; this.measureStyleModel.measurePolygon.font = font; this.measureStyleModel.measurePolygon.fontSize = fontSize; this.measureStyleModel.measurePolygon.textColor = textColor; this.measureStyleModel.measurePolygon.lineColor = lineColor; this.measureStyleModel.measurePolygon.lineWidth = lineWidth; this.measureStyleModel.measurePolygon.lineStyle = lineStyle; this.measureStyleModel.measurePolygon.aliasName = aliasName; this.measureStyleModel.measurePolygon.suffixName = suffixName; this.measureStyleModel.measurePolygon.showAlias = showAlias; this.measureStyleModel.measurePolygon.showSuffix = showSuffix; this.measureStyleModel.measurePolygon.showSerial = showSerial; this.measureStyleModel.measurePolygon.chooseStyle = chooseStyle; this.measureStyleModel.measureRectangle.font = font; this.measureStyleModel.measureRectangle.fontSize = fontSize; this.measureStyleModel.measureRectangle.textColor = textColor; this.measureStyleModel.measureRectangle.lineColor = lineColor; this.measureStyleModel.measureRectangle.lineWidth = lineWidth; this.measureStyleModel.measureRectangle.lineStyle = lineStyle; this.measureStyleModel.measureRectangle.aliasName = aliasName; this.measureStyleModel.measureRectangle.suffixName = suffixName; this.measureStyleModel.measureRectangle.showAlias = showAlias; this.measureStyleModel.measureRectangle.showSuffix = showSuffix; this.measureStyleModel.measureRectangle.showSerial = showSerial; this.measureStyleModel.measureRectangle.chooseStyle = chooseStyle; this.measureStyleModel.measureRandRectangle.font = font; this.measureStyleModel.measureRandRectangle.fontSize = fontSize; this.measureStyleModel.measureRandRectangle.textColor = textColor; this.measureStyleModel.measureRandRectangle.lineColor = lineColor; this.measureStyleModel.measureRandRectangle.lineWidth = lineWidth; this.measureStyleModel.measureRandRectangle.lineStyle = lineStyle; this.measureStyleModel.measureRandRectangle.aliasName = aliasName; this.measureStyleModel.measureRandRectangle.suffixName = suffixName; this.measureStyleModel.measureRandRectangle.showAlias = showAlias; this.measureStyleModel.measureRandRectangle.showSuffix = showSuffix; this.measureStyleModel.measureRandRectangle.showSerial = showSerial; this.measureStyleModel.measureRandRectangle.chooseStyle = chooseStyle; this.measureStyleModel.measureSquare.font = font; this.measureStyleModel.measureSquare.fontSize = fontSize; this.measureStyleModel.measureSquare.textColor = textColor; this.measureStyleModel.measureSquare.lineColor = lineColor; this.measureStyleModel.measureSquare.lineWidth = lineWidth; this.measureStyleModel.measureSquare.lineStyle = lineStyle; this.measureStyleModel.measureSquare.aliasName = aliasName; this.measureStyleModel.measureSquare.suffixName = suffixName; this.measureStyleModel.measureSquare.showAlias = showAlias; this.measureStyleModel.measureSquare.showSuffix = showSuffix; this.measureStyleModel.measureSquare.showSerial = showSerial; this.measureStyleModel.measureSquare.chooseStyle = chooseStyle; this.measureStyleModel.measureRandSquare.font = font; this.measureStyleModel.measureRandSquare.fontSize = fontSize; this.measureStyleModel.measureRandSquare.textColor = textColor; this.measureStyleModel.measureRandSquare.lineColor = lineColor; this.measureStyleModel.measureRandSquare.lineWidth = lineWidth; this.measureStyleModel.measureRandSquare.lineStyle = lineStyle; this.measureStyleModel.measureRandSquare.aliasName = aliasName; this.measureStyleModel.measureRandSquare.suffixName = suffixName; this.measureStyleModel.measureRandSquare.showAlias = showAlias; this.measureStyleModel.measureRandSquare.showSuffix = showSuffix; this.measureStyleModel.measureRandSquare.showSerial = showSerial; this.measureStyleModel.measureRandSquare.chooseStyle = chooseStyle; this.measureStyleModel.measureTracePolygon.font = font; this.measureStyleModel.measureTracePolygon.fontSize = fontSize; this.measureStyleModel.measureTracePolygon.textColor = textColor; this.measureStyleModel.measureTracePolygon.lineColor = lineColor; this.measureStyleModel.measureTracePolygon.lineWidth = lineWidth; this.measureStyleModel.measureTracePolygon.lineStyle = lineStyle; this.measureStyleModel.measureTracePolygon.aliasName = aliasName; this.measureStyleModel.measureTracePolygon.suffixName = suffixName; this.measureStyleModel.measureTracePolygon.showAlias = showAlias; this.measureStyleModel.measureTracePolygon.showSuffix = showSuffix; this.measureStyleModel.measureTracePolygon.showSerial = showSerial; this.measureStyleModel.measureTracePolygon.chooseStyle = chooseStyle; break; // 圆形测量 case 7: this.measureStyleModel.measureCircle.font = font; this.measureStyleModel.measureCircle.fontSize = fontSize; this.measureStyleModel.measureCircle.textColor = textColor; this.measureStyleModel.measureCircle.lineColor = lineColor; this.measureStyleModel.measureCircle.lineWidth = lineWidth; this.measureStyleModel.measureCircle.lineStyle = lineStyle; this.measureStyleModel.measureCircle.aliasName = aliasName; this.measureStyleModel.measureCircle.suffixName = suffixName; this.measureStyleModel.measureCircle.showAlias = showAlias; this.measureStyleModel.measureCircle.showSuffix = showSuffix; this.measureStyleModel.measureCircle.showSerial = showSerial; this.measureStyleModel.measureCircle.chooseStyle = chooseStyle; this.measureStyleModel.measureInnerCircle.font = font; this.measureStyleModel.measureInnerCircle.fontSize = fontSize; this.measureStyleModel.measureInnerCircle.textColor = textColor; this.measureStyleModel.measureInnerCircle.lineColor = lineColor; this.measureStyleModel.measureInnerCircle.lineWidth = lineWidth; this.measureStyleModel.measureInnerCircle.lineStyle = lineStyle; this.measureStyleModel.measureInnerCircle.aliasName = aliasName; this.measureStyleModel.measureInnerCircle.suffixName = suffixName; this.measureStyleModel.measureInnerCircle.showAlias = showAlias; this.measureStyleModel.measureInnerCircle.showSuffix = showSuffix; this.measureStyleModel.measureInnerCircle.showSerial = showSerial; this.measureStyleModel.measureInnerCircle.chooseStyle = chooseStyle; this.measureStyleModel.measureOuterCircle.font = font; this.measureStyleModel.measureOuterCircle.fontSize = fontSize; this.measureStyleModel.measureOuterCircle.textColor = textColor; this.measureStyleModel.measureOuterCircle.lineColor = lineColor; this.measureStyleModel.measureOuterCircle.lineWidth = lineWidth; this.measureStyleModel.measureOuterCircle.lineStyle = lineStyle; this.measureStyleModel.measureOuterCircle.aliasName = aliasName; this.measureStyleModel.measureOuterCircle.suffixName = suffixName; this.measureStyleModel.measureOuterCircle.showAlias = showAlias; this.measureStyleModel.measureOuterCircle.showSuffix = showSuffix; this.measureStyleModel.measureOuterCircle.showSerial = showSerial; this.measureStyleModel.measureOuterCircle.chooseStyle = chooseStyle; this.measureStyleModel.measureDiameterCircle.font = font; this.measureStyleModel.measureDiameterCircle.fontSize = fontSize; this.measureStyleModel.measureDiameterCircle.textColor = textColor; this.measureStyleModel.measureDiameterCircle.lineColor = lineColor; this.measureStyleModel.measureDiameterCircle.lineWidth = lineWidth; this.measureStyleModel.measureDiameterCircle.lineStyle = lineStyle; this.measureStyleModel.measureDiameterCircle.aliasName = aliasName; this.measureStyleModel.measureDiameterCircle.suffixName = suffixName; this.measureStyleModel.measureDiameterCircle.showAlias = showAlias; this.measureStyleModel.measureDiameterCircle.showSuffix = showSuffix; this.measureStyleModel.measureDiameterCircle.showSerial = showSerial; this.measureStyleModel.measureDiameterCircle.chooseStyle = chooseStyle; this.measureStyleModel.measurePointEdgeSize.font = font; this.measureStyleModel.measurePointEdgeSize.fontSize = fontSize; this.measureStyleModel.measurePointEdgeSize.textColor = textColor; this.measureStyleModel.measurePointEdgeSize.lineColor = lineColor; this.measureStyleModel.measurePointEdgeSize.lineWidth = lineWidth; this.measureStyleModel.measurePointEdgeSize.lineStyle = lineStyle; this.measureStyleModel.measurePointEdgeSize.aliasName = aliasName; this.measureStyleModel.measurePointEdgeSize.suffixName = suffixName; this.measureStyleModel.measurePointEdgeSize.showAlias = showAlias; this.measureStyleModel.measurePointEdgeSize.showSuffix = showSuffix; this.measureStyleModel.measurePointEdgeSize.showSerial = showSerial; this.measureStyleModel.measurePointEdgeSize.chooseStyle = chooseStyle; this.measureStyleModel.measurePointCenterSize.font = font; this.measureStyleModel.measurePointCenterSize.fontSize = fontSize; this.measureStyleModel.measurePointCenterSize.textColor = textColor; this.measureStyleModel.measurePointCenterSize.lineColor = lineColor; this.measureStyleModel.measurePointCenterSize.lineWidth = lineWidth; this.measureStyleModel.measurePointCenterSize.lineStyle = lineStyle; this.measureStyleModel.measurePointCenterSize.aliasName = aliasName; this.measureStyleModel.measurePointCenterSize.suffixName = suffixName; this.measureStyleModel.measurePointCenterSize.showAlias = showAlias; this.measureStyleModel.measurePointCenterSize.showSuffix = showSuffix; this.measureStyleModel.measurePointCenterSize.showSerial = showSerial; this.measureStyleModel.measurePointCenterSize.chooseStyle = chooseStyle; this.measureStyleModel.measurePointArcSize.font = font; this.measureStyleModel.measurePointArcSize.fontSize = fontSize; this.measureStyleModel.measurePointArcSize.textColor = textColor; this.measureStyleModel.measurePointArcSize.lineColor = lineColor; this.measureStyleModel.measurePointArcSize.lineWidth = lineWidth; this.measureStyleModel.measurePointArcSize.lineStyle = lineStyle; this.measureStyleModel.measurePointArcSize.aliasName = aliasName; this.measureStyleModel.measurePointArcSize.suffixName = suffixName; this.measureStyleModel.measurePointArcSize.showAlias = showAlias; this.measureStyleModel.measurePointArcSize.showSuffix = showSuffix; this.measureStyleModel.measurePointArcSize.showSerial = showSerial; this.measureStyleModel.measurePointArcSize.chooseStyle = chooseStyle; break; // 角度测量 case 8: this.measureStyleModel.measureThreePointAngle.font = font; this.measureStyleModel.measureThreePointAngle.fontSize = fontSize; this.measureStyleModel.measureThreePointAngle.textColor = textColor; this.measureStyleModel.measureThreePointAngle.lineColor = lineColor; this.measureStyleModel.measureThreePointAngle.lineWidth = lineWidth; this.measureStyleModel.measureThreePointAngle.lineStyle = lineStyle; this.measureStyleModel.measureThreePointAngle.isAngle = isAngle; this.measureStyleModel.measureThreePointAngle.aliasName = aliasName; this.measureStyleModel.measureThreePointAngle.suffixName = suffixName; this.measureStyleModel.measureThreePointAngle.showAlias = showAlias; this.measureStyleModel.measureThreePointAngle.showSuffix = showSuffix; this.measureStyleModel.measureThreePointAngle.showSerial = showSerial; this.measureStyleModel.measureThreePointAngle.chooseStyle = chooseStyle; this.measureStyleModel.measureFourPointAngle.font = font; this.measureStyleModel.measureFourPointAngle.fontSize = fontSize; this.measureStyleModel.measureFourPointAngle.textColor = textColor; this.measureStyleModel.measureFourPointAngle.lineColor = lineColor; this.measureStyleModel.measureFourPointAngle.lineWidth = lineWidth; this.measureStyleModel.measureFourPointAngle.lineStyle = lineStyle; this.measureStyleModel.measureFourPointAngle.isAngle = isAngle; this.measureStyleModel.measureFourPointAngle.aliasName = aliasName; this.measureStyleModel.measureFourPointAngle.suffixName = suffixName; this.measureStyleModel.measureFourPointAngle.showAlias = showAlias; this.measureStyleModel.measureFourPointAngle.showSuffix = showSuffix; this.measureStyleModel.measureFourPointAngle.showSerial = showSerial; this.measureStyleModel.measureFourPointAngle.chooseStyle = chooseStyle; this.measureStyleModel.measureThreePointArc.font = font; this.measureStyleModel.measureThreePointArc.fontSize = fontSize; this.measureStyleModel.measureThreePointArc.textColor = textColor; this.measureStyleModel.measureThreePointArc.lineColor = lineColor; this.measureStyleModel.measureThreePointArc.lineWidth = lineWidth; this.measureStyleModel.measureThreePointArc.lineStyle = lineStyle; this.measureStyleModel.measureThreePointArc.isAngle = isAngle; this.measureStyleModel.measureThreePointArc.aliasName = aliasName; this.measureStyleModel.measureThreePointArc.suffixName = suffixName; this.measureStyleModel.measureThreePointArc.showAlias = showAlias; this.measureStyleModel.measureThreePointArc.showSuffix = showSuffix; this.measureStyleModel.measureThreePointArc.showSerial = showSerial; this.measureStyleModel.measureThreePointArc.chooseStyle = chooseStyle; break; case 9: this.measureStyleModel.measureCenterCenterSize.font = font; this.measureStyleModel.measureCenterCenterSize.fontSize = fontSize; this.measureStyleModel.measureCenterCenterSize.textColor = textColor; this.measureStyleModel.measureCenterCenterSize.lineColor = lineColor; this.measureStyleModel.measureCenterCenterSize.lineWidth = lineWidth; this.measureStyleModel.measureCenterCenterSize.lineStyle = lineStyle; this.measureStyleModel.measureCenterCenterSize.linePosition = linePosition; this.measureStyleModel.measureCenterCenterSize.aliasName = aliasName; this.measureStyleModel.measureCenterCenterSize.suffixName = suffixName; this.measureStyleModel.measureCenterCenterSize.showAlias = showAlias; this.measureStyleModel.measureCenterCenterSize.showSuffix = showSuffix; this.measureStyleModel.measureCenterCenterSize.showSerial = showSerial; this.measureStyleModel.measureCenterCenterSize.chooseStyle = chooseStyle; this.measureStyleModel.measureTwoLineVLDistance.font = font; this.measureStyleModel.measureTwoLineVLDistance.fontSize = fontSize; this.measureStyleModel.measureTwoLineVLDistance.textColor = textColor; this.measureStyleModel.measureTwoLineVLDistance.lineColor = lineColor; this.measureStyleModel.measureTwoLineVLDistance.lineWidth = lineWidth; this.measureStyleModel.measureTwoLineVLDistance.lineStyle = lineStyle; this.measureStyleModel.measureTwoLineVLDistance.linePosition = linePosition; this.measureStyleModel.measureTwoLineVLDistance.aliasName = aliasName; this.measureStyleModel.measureTwoLineVLDistance.suffixName = suffixName; this.measureStyleModel.measureTwoLineVLDistance.showAlias = showAlias; this.measureStyleModel.measureTwoLineVLDistance.showSuffix = showSuffix; this.measureStyleModel.measureTwoLineVLDistance.showSerial = showSerial; this.measureStyleModel.measureTwoLineVLDistance.chooseStyle = chooseStyle; break; } //以下保存xml文件信息 string stageModelXml = XmlSerializeHelper.XmlSerialize(this.measureStyleModel); string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Measure\\" + this.comboBox1.Text + ".xml"; FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create); ApplicationSetting(); } } }