MeasurementPropertiesDialog.cs 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345
  1. using PaintDotNet;
  2. using PaintDotNet.Annotation;
  3. using PaintDotNet.Annotation.Enum;
  4. using PaintDotNet.Annotation.Measure;
  5. using PaintDotNet.Base.CommTool;
  6. using PaintDotNet.Base.SettingModel;
  7. using System;
  8. using System.Collections;
  9. using System.Collections.Generic;
  10. using System.ComponentModel;
  11. using System.Data;
  12. using System.Drawing;
  13. using System.IO;
  14. using System.Linq;
  15. using System.Text;
  16. using System.Threading.Tasks;
  17. using System.Windows.Forms;
  18. namespace Metis.Measuring
  19. {
  20. internal class MeasurementPropertiesDialog : Form
  21. {
  22. #region 控件
  23. private GroupBox groupBox2;
  24. private Panel panel3;
  25. private ComboBox comboBox4;
  26. private Label label4;
  27. private ComboBox comboBox3;
  28. private Label label3;
  29. private Panel panel2;
  30. private ComboBox comboBox2;
  31. private Label label2;
  32. private NumericUpDown numericUpDown11;
  33. private ComboBox comboBox21;
  34. private NumericUpDown numericUpDown21;
  35. private Label label61;
  36. private Label label51;
  37. private Panel linePanel;
  38. private Label label41;
  39. private Panel textPanel;
  40. private Label label31;
  41. private Label label21;
  42. private ComboBox comboBox11;
  43. private Label label11;
  44. private GroupBox groupBox1;
  45. //private Button button2;
  46. private Button button3;
  47. private Button button1;
  48. PaintDotNet.ColorsForm colorsForm;
  49. PaintDotNet.ColorsForm colorsForm1;
  50. #endregion
  51. /// <summary>
  52. /// 主控件
  53. /// </summary>
  54. private AppWorkspace appWorkspace;
  55. private DrawObject drawObject;
  56. /// <summary>
  57. /// 测量的样式
  58. /// </summary>
  59. private MeasureStyleModel measureStyleModel = Startup.instance.measureStyleModel;
  60. /// <summary>
  61. /// 主配置文件的model
  62. /// </summary>
  63. private ConfigModel configModel = Startup.instance.configModel;
  64. private NumericUpDown numericUpDown1;
  65. private Label label5;
  66. private ComboBox comboBox5;
  67. private Label label6;
  68. private ComboBox comboBox91;
  69. private System.Windows.Forms.Label label91;
  70. private TextBox textBox2;
  71. private TextBox textBox1;
  72. private Label label8;
  73. private Label label7;
  74. private ComboBox comboBox8;
  75. private Label label12;
  76. private ComboBox comboBox7;
  77. private Label label10;
  78. private ComboBox comboBox6;
  79. private Label label9;
  80. private GroupBox groupBox5;
  81. private NumericUpDown numericUpDown3;
  82. private Label label24;
  83. private NumericUpDown numericUpDown4;
  84. private ComboBox comboBox18;
  85. private NumericUpDown numericUpDown5;
  86. private Label label28;
  87. private Label label29;
  88. private Panel panel8;
  89. private Label label30;
  90. private Panel panel9;
  91. private Label label32;
  92. private Label label34;
  93. private ComboBox comboBox20;
  94. private Label label35;
  95. PaintDotNet.ColorsForm colorsForm4;
  96. PaintDotNet.ColorsForm colorsForm5;
  97. /// <summary>
  98. /// 字体列表
  99. /// </summary>
  100. ArrayList fontsItems = new ArrayList();
  101. public MeasurementPropertiesDialog(AppWorkspace appWorkspace, DrawObject drawObject)
  102. {
  103. this.appWorkspace = appWorkspace;
  104. this.drawObject = drawObject;
  105. InitializeComponent();
  106. this.comboBox3.Items.AddRange(new object[] {
  107. PdnResources.GetString("Menu.Upperleft.text"),
  108. PdnResources.GetString("Menu.Uppermiddle.Text"),
  109. PdnResources.GetString("Menu.Upperright.text"),
  110. PdnResources.GetString("Menu.Lowerleft.text"),
  111. PdnResources.GetString("Menu.Themiddleandlower.Text"),
  112. PdnResources.GetString("Menu.Lowerright.text")});
  113. this.comboBox91.Items.AddRange(new object[] {
  114. "度",
  115. "密位"});
  116. this.comboBox4.Items.AddRange(new object[] {
  117. PdnResources.GetString("Menu.Upperleft.text"),
  118. PdnResources.GetString("Menu.Uppermiddle.Text"),
  119. PdnResources.GetString("Menu.Upperright.text"),
  120. PdnResources.GetString("Menu.Lowerleft.text"),
  121. PdnResources.GetString("Menu.Themiddleandlower.Text"),
  122. PdnResources.GetString("Menu.Lowerright.text")});
  123. this.Text = PdnResources.GetString("Menu.MeasureAction." + drawObject.drawToolType.ToString() + ".Text") + "属性设置";
  124. //绑定线样式数据
  125. this.comboBox21.Items.AddRange(InvariantData.dashStyles);
  126. this.comboBox18.Items.AddRange(InvariantData.dashStyles);
  127. this.colorsForm = new ColorsForm();
  128. this.colorsForm.StartPosition = FormStartPosition.CenterScreen;
  129. this.colorsForm.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  130. this.colorsForm1 = new ColorsForm();
  131. this.colorsForm1.StartPosition = FormStartPosition.CenterScreen;
  132. this.colorsForm1.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  133. this.colorsForm4 = new ColorsForm();
  134. this.colorsForm4.StartPosition = FormStartPosition.CenterScreen;
  135. this.colorsForm4.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  136. this.colorsForm5 = new ColorsForm();
  137. this.colorsForm5.StartPosition = FormStartPosition.CenterScreen;
  138. this.colorsForm5.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  139. this.fontsItems.Clear();
  140. //绑定字体数据
  141. System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();
  142. foreach (FontFamily fontFamily in fonts.Families)
  143. {
  144. fontsItems.Add(fontFamily.Name);
  145. }
  146. this.comboBox11.DataSource = fontsItems;
  147. this.comboBox20.DataSource = fontsItems;
  148. UpdateRightSettingUI();
  149. }
  150. #region 初始化
  151. private void InitializeComponent()
  152. {
  153. this.comboBox91 = new System.Windows.Forms.ComboBox();
  154. this.label91 = new System.Windows.Forms.Label();
  155. this.groupBox2 = new System.Windows.Forms.GroupBox();
  156. this.comboBox8 = new System.Windows.Forms.ComboBox();
  157. this.label12 = new System.Windows.Forms.Label();
  158. this.comboBox7 = new System.Windows.Forms.ComboBox();
  159. this.label10 = new System.Windows.Forms.Label();
  160. this.comboBox6 = new System.Windows.Forms.ComboBox();
  161. this.label9 = new System.Windows.Forms.Label();
  162. this.textBox2 = new System.Windows.Forms.TextBox();
  163. this.textBox1 = new System.Windows.Forms.TextBox();
  164. this.label8 = new System.Windows.Forms.Label();
  165. this.label7 = new System.Windows.Forms.Label();
  166. this.comboBox5 = new System.Windows.Forms.ComboBox();
  167. this.label6 = new System.Windows.Forms.Label();
  168. this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
  169. this.label5 = new System.Windows.Forms.Label();
  170. this.panel3 = new System.Windows.Forms.Panel();
  171. this.comboBox4 = new System.Windows.Forms.ComboBox();
  172. this.label4 = new System.Windows.Forms.Label();
  173. this.comboBox3 = new System.Windows.Forms.ComboBox();
  174. this.label3 = new System.Windows.Forms.Label();
  175. this.panel2 = new System.Windows.Forms.Panel();
  176. this.comboBox2 = new System.Windows.Forms.ComboBox();
  177. this.label2 = new System.Windows.Forms.Label();
  178. this.numericUpDown11 = new System.Windows.Forms.NumericUpDown();
  179. this.comboBox21 = new System.Windows.Forms.ComboBox();
  180. this.numericUpDown21 = new System.Windows.Forms.NumericUpDown();
  181. this.label61 = new System.Windows.Forms.Label();
  182. this.label51 = new System.Windows.Forms.Label();
  183. this.linePanel = new System.Windows.Forms.Panel();
  184. this.label41 = new System.Windows.Forms.Label();
  185. this.textPanel = new System.Windows.Forms.Panel();
  186. this.label31 = new System.Windows.Forms.Label();
  187. this.label21 = new System.Windows.Forms.Label();
  188. this.comboBox11 = new System.Windows.Forms.ComboBox();
  189. this.label11 = new System.Windows.Forms.Label();
  190. this.groupBox1 = new System.Windows.Forms.GroupBox();
  191. this.button3 = new System.Windows.Forms.Button();
  192. this.button1 = new System.Windows.Forms.Button();
  193. this.groupBox5 = new System.Windows.Forms.GroupBox();
  194. this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
  195. this.label24 = new System.Windows.Forms.Label();
  196. this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
  197. this.comboBox18 = new System.Windows.Forms.ComboBox();
  198. this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
  199. this.label28 = new System.Windows.Forms.Label();
  200. this.label29 = new System.Windows.Forms.Label();
  201. this.panel8 = new System.Windows.Forms.Panel();
  202. this.label30 = new System.Windows.Forms.Label();
  203. this.panel9 = new System.Windows.Forms.Panel();
  204. this.label32 = new System.Windows.Forms.Label();
  205. this.label34 = new System.Windows.Forms.Label();
  206. this.comboBox20 = new System.Windows.Forms.ComboBox();
  207. this.label35 = new System.Windows.Forms.Label();
  208. this.groupBox2.SuspendLayout();
  209. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
  210. this.panel3.SuspendLayout();
  211. this.panel2.SuspendLayout();
  212. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).BeginInit();
  213. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown21)).BeginInit();
  214. this.groupBox1.SuspendLayout();
  215. this.groupBox5.SuspendLayout();
  216. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
  217. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
  218. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
  219. this.SuspendLayout();
  220. //
  221. // comboBox91
  222. //
  223. this.comboBox91.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  224. this.comboBox91.FormattingEnabled = true;
  225. this.comboBox91.Location = new System.Drawing.Point(91, 179);
  226. this.comboBox91.Name = "comboBox91";
  227. this.comboBox91.Size = new System.Drawing.Size(152, 20);
  228. this.comboBox91.TabIndex = 15;
  229. //
  230. // label91
  231. //
  232. this.label91.AutoSize = true;
  233. this.label91.Location = new System.Drawing.Point(14, 182);
  234. this.label91.Name = "label91";
  235. this.label91.Size = new System.Drawing.Size(65, 12);
  236. this.label91.TabIndex = 14;
  237. this.label91.Text = "角度单位:";
  238. //
  239. // groupBox2
  240. //
  241. this.groupBox2.Controls.Add(this.comboBox8);
  242. this.groupBox2.Controls.Add(this.label12);
  243. this.groupBox2.Controls.Add(this.comboBox7);
  244. this.groupBox2.Controls.Add(this.label10);
  245. this.groupBox2.Controls.Add(this.comboBox6);
  246. this.groupBox2.Controls.Add(this.label9);
  247. this.groupBox2.Controls.Add(this.textBox2);
  248. this.groupBox2.Controls.Add(this.textBox1);
  249. this.groupBox2.Controls.Add(this.label8);
  250. this.groupBox2.Controls.Add(this.label7);
  251. this.groupBox2.Controls.Add(this.comboBox5);
  252. this.groupBox2.Controls.Add(this.label6);
  253. this.groupBox2.Controls.Add(this.numericUpDown1);
  254. this.groupBox2.Controls.Add(this.label5);
  255. this.groupBox2.Controls.Add(this.panel3);
  256. this.groupBox2.Controls.Add(this.panel2);
  257. this.groupBox2.Controls.Add(this.numericUpDown11);
  258. this.groupBox2.Controls.Add(this.comboBox21);
  259. this.groupBox2.Controls.Add(this.numericUpDown21);
  260. this.groupBox2.Controls.Add(this.label61);
  261. this.groupBox2.Controls.Add(this.label51);
  262. this.groupBox2.Controls.Add(this.linePanel);
  263. this.groupBox2.Controls.Add(this.label41);
  264. this.groupBox2.Controls.Add(this.textPanel);
  265. this.groupBox2.Controls.Add(this.label31);
  266. this.groupBox2.Controls.Add(this.label21);
  267. this.groupBox2.Controls.Add(this.comboBox11);
  268. this.groupBox2.Controls.Add(this.label11);
  269. this.groupBox2.Controls.Add(this.comboBox91);
  270. this.groupBox2.Controls.Add(this.label91);
  271. this.groupBox2.Location = new System.Drawing.Point(10, 76);
  272. this.groupBox2.Name = "groupBox2";
  273. this.groupBox2.Size = new System.Drawing.Size(633, 235);
  274. this.groupBox2.TabIndex = 8;
  275. this.groupBox2.TabStop = false;
  276. this.groupBox2.Text = "设置";
  277. //
  278. // comboBox8
  279. //
  280. this.comboBox8.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  281. this.comboBox8.FormattingEnabled = true;
  282. this.comboBox8.Items.AddRange(new object[] {
  283. "是",
  284. "否"});
  285. this.comboBox8.Location = new System.Drawing.Point(364, 125);
  286. this.comboBox8.Name = "comboBox8";
  287. this.comboBox8.Size = new System.Drawing.Size(127, 20);
  288. this.comboBox8.TabIndex = 40;
  289. //
  290. // label12
  291. //
  292. this.label12.AutoSize = true;
  293. this.label12.Location = new System.Drawing.Point(262, 127);
  294. this.label12.Name = "label12";
  295. this.label12.Size = new System.Drawing.Size(89, 12);
  296. this.label12.TabIndex = 39;
  297. this.label12.Text = "是否展示序号:";
  298. //
  299. // comboBox7
  300. //
  301. this.comboBox7.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  302. this.comboBox7.FormattingEnabled = true;
  303. this.comboBox7.Items.AddRange(new object[] {
  304. "是",
  305. "否"});
  306. this.comboBox7.Location = new System.Drawing.Point(364, 99);
  307. this.comboBox7.Name = "comboBox7";
  308. this.comboBox7.Size = new System.Drawing.Size(127, 20);
  309. this.comboBox7.TabIndex = 38;
  310. //
  311. // label10
  312. //
  313. this.label10.AutoSize = true;
  314. this.label10.Location = new System.Drawing.Point(262, 99);
  315. this.label10.Name = "label10";
  316. this.label10.Size = new System.Drawing.Size(89, 12);
  317. this.label10.TabIndex = 37;
  318. this.label10.Text = "是否展示后缀:";
  319. //
  320. // comboBox6
  321. //
  322. this.comboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  323. this.comboBox6.FormattingEnabled = true;
  324. this.comboBox6.Items.AddRange(new object[] {
  325. "是",
  326. "否"});
  327. this.comboBox6.Location = new System.Drawing.Point(364, 73);
  328. this.comboBox6.Name = "comboBox6";
  329. this.comboBox6.Size = new System.Drawing.Size(127, 20);
  330. this.comboBox6.TabIndex = 36;
  331. //
  332. // label9
  333. //
  334. this.label9.AutoSize = true;
  335. this.label9.Location = new System.Drawing.Point(262, 76);
  336. this.label9.Name = "label9";
  337. this.label9.Size = new System.Drawing.Size(89, 12);
  338. this.label9.TabIndex = 35;
  339. this.label9.Text = "是否展示别名:";
  340. //
  341. // textBox2
  342. //
  343. this.textBox2.Location = new System.Drawing.Point(339, 47);
  344. this.textBox2.Name = "textBox2";
  345. this.textBox2.Size = new System.Drawing.Size(152, 21);
  346. this.textBox2.TabIndex = 34;
  347. //
  348. // textBox1
  349. //
  350. this.textBox1.Location = new System.Drawing.Point(339, 20);
  351. this.textBox1.Name = "textBox1";
  352. this.textBox1.Size = new System.Drawing.Size(152, 21);
  353. this.textBox1.TabIndex = 33;
  354. //
  355. // label8
  356. //
  357. this.label8.AutoSize = true;
  358. this.label8.Location = new System.Drawing.Point(262, 50);
  359. this.label8.Name = "label8";
  360. this.label8.Size = new System.Drawing.Size(41, 12);
  361. this.label8.TabIndex = 30;
  362. this.label8.Text = "后缀:";
  363. //
  364. // label7
  365. //
  366. this.label7.AutoSize = true;
  367. this.label7.Location = new System.Drawing.Point(262, 23);
  368. this.label7.Name = "label7";
  369. this.label7.Size = new System.Drawing.Size(41, 12);
  370. this.label7.TabIndex = 29;
  371. this.label7.Text = "别名:";
  372. //
  373. // comboBox5
  374. //
  375. this.comboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  376. this.comboBox5.FormattingEnabled = true;
  377. this.comboBox5.Items.AddRange(new object[] {
  378. "随线",
  379. "水平"});
  380. this.comboBox5.Location = new System.Drawing.Point(339, 180);
  381. this.comboBox5.Name = "comboBox5";
  382. this.comboBox5.Size = new System.Drawing.Size(122, 20);
  383. this.comboBox5.TabIndex = 22;
  384. //
  385. // label6
  386. //
  387. this.label6.AutoSize = true;
  388. this.label6.Location = new System.Drawing.Point(262, 184);
  389. this.label6.Name = "label6";
  390. this.label6.Size = new System.Drawing.Size(65, 12);
  391. this.label6.TabIndex = 21;
  392. this.label6.Text = "文字方向:";
  393. //
  394. // numericUpDown1
  395. //
  396. this.numericUpDown1.Location = new System.Drawing.Point(339, 155);
  397. this.numericUpDown1.Name = "numericUpDown1";
  398. this.numericUpDown1.Size = new System.Drawing.Size(152, 21);
  399. this.numericUpDown1.TabIndex = 20;
  400. //
  401. // label5
  402. //
  403. this.label5.AutoSize = true;
  404. this.label5.Location = new System.Drawing.Point(262, 159);
  405. this.label5.Name = "label5";
  406. this.label5.Size = new System.Drawing.Size(65, 12);
  407. this.label5.TabIndex = 19;
  408. this.label5.Text = "垂线长度:";
  409. //
  410. // panel3
  411. //
  412. this.panel3.Controls.Add(this.comboBox4);
  413. this.panel3.Controls.Add(this.label4);
  414. this.panel3.Controls.Add(this.comboBox3);
  415. this.panel3.Controls.Add(this.label3);
  416. this.panel3.Location = new System.Drawing.Point(9, 175);
  417. this.panel3.Name = "panel3";
  418. this.panel3.Size = new System.Drawing.Size(236, 57);
  419. this.panel3.TabIndex = 16;
  420. //
  421. // comboBox4
  422. //
  423. this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  424. this.comboBox4.FormattingEnabled = true;
  425. this.comboBox4.Location = new System.Drawing.Point(112, 30);
  426. this.comboBox4.Name = "comboBox4";
  427. this.comboBox4.Size = new System.Drawing.Size(122, 20);
  428. this.comboBox4.TabIndex = 17;
  429. //
  430. // label4
  431. //
  432. this.label4.AutoSize = true;
  433. this.label4.Location = new System.Drawing.Point(5, 34);
  434. this.label4.Name = "label4";
  435. this.label4.Size = new System.Drawing.Size(89, 12);
  436. this.label4.TabIndex = 16;
  437. this.label4.Text = "文字位置(点):";
  438. //
  439. // comboBox3
  440. //
  441. this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  442. this.comboBox3.FormattingEnabled = true;
  443. this.comboBox3.Location = new System.Drawing.Point(112, 4);
  444. this.comboBox3.Name = "comboBox3";
  445. this.comboBox3.Size = new System.Drawing.Size(122, 20);
  446. this.comboBox3.TabIndex = 15;
  447. //
  448. // label3
  449. //
  450. this.label3.AutoSize = true;
  451. this.label3.Location = new System.Drawing.Point(5, 7);
  452. this.label3.Name = "label3";
  453. this.label3.Size = new System.Drawing.Size(89, 12);
  454. this.label3.TabIndex = 14;
  455. this.label3.Text = "文字位置(线):";
  456. //
  457. // panel2
  458. //
  459. this.panel2.Controls.Add(this.comboBox2);
  460. this.panel2.Controls.Add(this.label2);
  461. this.panel2.Location = new System.Drawing.Point(9, 175);
  462. this.panel2.Name = "panel2";
  463. this.panel2.Size = new System.Drawing.Size(236, 57);
  464. this.panel2.TabIndex = 15;
  465. //
  466. // comboBox2
  467. //
  468. this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  469. this.comboBox2.FormattingEnabled = true;
  470. this.comboBox2.Location = new System.Drawing.Point(82, 3);
  471. this.comboBox2.Name = "comboBox2";
  472. this.comboBox2.Size = new System.Drawing.Size(152, 20);
  473. this.comboBox2.TabIndex = 15;
  474. //
  475. // label2
  476. //
  477. this.label2.AutoSize = true;
  478. this.label2.Location = new System.Drawing.Point(5, 7);
  479. this.label2.Name = "label2";
  480. this.label2.Size = new System.Drawing.Size(65, 12);
  481. this.label2.TabIndex = 14;
  482. this.label2.Text = "文字位置:";
  483. //
  484. // numericUpDown11
  485. //
  486. this.numericUpDown11.Location = new System.Drawing.Point(91, 125);
  487. this.numericUpDown11.Name = "numericUpDown11";
  488. this.numericUpDown11.Size = new System.Drawing.Size(152, 21);
  489. this.numericUpDown11.TabIndex = 14;
  490. //
  491. // comboBox21
  492. //
  493. this.comboBox21.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  494. this.comboBox21.FormattingEnabled = true;
  495. this.comboBox21.Location = new System.Drawing.Point(91, 151);
  496. this.comboBox21.Name = "comboBox21";
  497. this.comboBox21.Size = new System.Drawing.Size(152, 20);
  498. this.comboBox21.TabIndex = 13;
  499. //
  500. // numericUpDown21
  501. //
  502. this.numericUpDown21.Location = new System.Drawing.Point(91, 46);
  503. this.numericUpDown21.Maximum = new decimal(new int[] {
  504. 49000,
  505. 0,
  506. 0,
  507. 0});
  508. this.numericUpDown21.Minimum = new decimal(new int[] {
  509. 1,
  510. 0,
  511. 0,
  512. 0});
  513. this.numericUpDown21.Name = "numericUpDown21";
  514. this.numericUpDown21.Size = new System.Drawing.Size(152, 21);
  515. this.numericUpDown21.TabIndex = 12;
  516. this.numericUpDown21.Value = new decimal(new int[] {
  517. 1,
  518. 0,
  519. 0,
  520. 0});
  521. //
  522. // label61
  523. //
  524. this.label61.AutoSize = true;
  525. this.label61.Location = new System.Drawing.Point(13, 155);
  526. this.label61.Name = "label61";
  527. this.label61.Size = new System.Drawing.Size(65, 12);
  528. this.label61.TabIndex = 9;
  529. this.label61.Text = "线条样式:";
  530. //
  531. // label51
  532. //
  533. this.label51.AutoSize = true;
  534. this.label51.Location = new System.Drawing.Point(13, 128);
  535. this.label51.Name = "label51";
  536. this.label51.Size = new System.Drawing.Size(65, 12);
  537. this.label51.TabIndex = 8;
  538. this.label51.Text = "线条宽度:";
  539. //
  540. // linePanel
  541. //
  542. this.linePanel.BackColor = System.Drawing.SystemColors.Window;
  543. this.linePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  544. this.linePanel.Location = new System.Drawing.Point(91, 99);
  545. this.linePanel.Name = "linePanel";
  546. this.linePanel.Size = new System.Drawing.Size(152, 20);
  547. this.linePanel.TabIndex = 7;
  548. this.linePanel.Click += new System.EventHandler(this.lineColorPanel_Click);
  549. //
  550. // label41
  551. //
  552. this.label41.AutoSize = true;
  553. this.label41.Location = new System.Drawing.Point(13, 99);
  554. this.label41.Name = "label41";
  555. this.label41.Size = new System.Drawing.Size(65, 12);
  556. this.label41.TabIndex = 6;
  557. this.label41.Text = "线条颜色:";
  558. //
  559. // textPanel
  560. //
  561. this.textPanel.BackColor = System.Drawing.SystemColors.Window;
  562. this.textPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  563. this.textPanel.Location = new System.Drawing.Point(91, 73);
  564. this.textPanel.Name = "textPanel";
  565. this.textPanel.Size = new System.Drawing.Size(152, 20);
  566. this.textPanel.TabIndex = 5;
  567. this.textPanel.Click += new System.EventHandler(this.textColorPanel_Click);
  568. //
  569. // label31
  570. //
  571. this.label31.AutoSize = true;
  572. this.label31.Location = new System.Drawing.Point(13, 76);
  573. this.label31.Name = "label31";
  574. this.label31.Size = new System.Drawing.Size(65, 12);
  575. this.label31.TabIndex = 4;
  576. this.label31.Text = "文字颜色:";
  577. //
  578. // label21
  579. //
  580. this.label21.AutoSize = true;
  581. this.label21.Location = new System.Drawing.Point(13, 50);
  582. this.label21.Name = "label21";
  583. this.label21.Size = new System.Drawing.Size(65, 12);
  584. this.label21.TabIndex = 2;
  585. this.label21.Text = "文字字号:";
  586. //
  587. // comboBox11
  588. //
  589. this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  590. this.comboBox11.FormattingEnabled = true;
  591. this.comboBox11.Location = new System.Drawing.Point(91, 20);
  592. this.comboBox11.Name = "comboBox11";
  593. this.comboBox11.Size = new System.Drawing.Size(152, 20);
  594. this.comboBox11.TabIndex = 1;
  595. //
  596. // label11
  597. //
  598. this.label11.AutoSize = true;
  599. this.label11.Location = new System.Drawing.Point(13, 23);
  600. this.label11.Name = "label11";
  601. this.label11.Size = new System.Drawing.Size(65, 12);
  602. this.label11.TabIndex = 0;
  603. this.label11.Text = "文字字体:";
  604. //
  605. // groupBox1
  606. //
  607. this.groupBox1.Controls.Add(this.button3);
  608. this.groupBox1.Controls.Add(this.button1);
  609. this.groupBox1.Location = new System.Drawing.Point(12, 12);
  610. this.groupBox1.Name = "groupBox1";
  611. this.groupBox1.Size = new System.Drawing.Size(633, 58);
  612. this.groupBox1.TabIndex = 7;
  613. this.groupBox1.TabStop = false;
  614. this.groupBox1.Text = "操作";
  615. //
  616. // button3
  617. //
  618. this.button3.Location = new System.Drawing.Point(541, 20);
  619. this.button3.Name = "button3";
  620. this.button3.Size = new System.Drawing.Size(75, 23);
  621. this.button3.TabIndex = 2;
  622. this.button3.Text = "关闭";
  623. this.button3.UseVisualStyleBackColor = true;
  624. this.button3.Click += new System.EventHandler(this.button3_Click);
  625. //
  626. // button1
  627. //
  628. this.button1.Location = new System.Drawing.Point(460, 20);
  629. this.button1.Name = "button1";
  630. this.button1.Size = new System.Drawing.Size(75, 23);
  631. this.button1.TabIndex = 0;
  632. this.button1.Text = "应用";
  633. this.button1.UseVisualStyleBackColor = true;
  634. this.button1.Click += new System.EventHandler(this.button1_Click);
  635. //
  636. // groupBox5
  637. //
  638. this.groupBox5.Controls.Add(this.numericUpDown3);
  639. this.groupBox5.Controls.Add(this.label24);
  640. this.groupBox5.Controls.Add(this.numericUpDown4);
  641. this.groupBox5.Controls.Add(this.comboBox18);
  642. this.groupBox5.Controls.Add(this.numericUpDown5);
  643. this.groupBox5.Controls.Add(this.label28);
  644. this.groupBox5.Controls.Add(this.label29);
  645. this.groupBox5.Controls.Add(this.panel8);
  646. this.groupBox5.Controls.Add(this.label30);
  647. this.groupBox5.Controls.Add(this.panel9);
  648. this.groupBox5.Controls.Add(this.label32);
  649. this.groupBox5.Controls.Add(this.label34);
  650. this.groupBox5.Controls.Add(this.comboBox20);
  651. this.groupBox5.Controls.Add(this.label35);
  652. this.groupBox5.Location = new System.Drawing.Point(12, 327);
  653. this.groupBox5.Name = "groupBox5";
  654. this.groupBox5.Size = new System.Drawing.Size(628, 149);
  655. this.groupBox5.TabIndex = 19;
  656. this.groupBox5.TabStop = false;
  657. this.groupBox5.Text = "选中设置";
  658. //
  659. // numericUpDown3
  660. //
  661. this.numericUpDown3.Location = new System.Drawing.Point(91, 107);
  662. this.numericUpDown3.Name = "numericUpDown3";
  663. this.numericUpDown3.Size = new System.Drawing.Size(152, 21);
  664. this.numericUpDown3.TabIndex = 18;
  665. //
  666. // label24
  667. //
  668. this.label24.AutoSize = true;
  669. this.label24.Location = new System.Drawing.Point(15, 108);
  670. this.label24.Name = "label24";
  671. this.label24.Size = new System.Drawing.Size(65, 12);
  672. this.label24.TabIndex = 17;
  673. this.label24.Text = "垂线长度:";
  674. //
  675. // numericUpDown4
  676. //
  677. this.numericUpDown4.Location = new System.Drawing.Point(343, 47);
  678. this.numericUpDown4.Name = "numericUpDown4";
  679. this.numericUpDown4.Size = new System.Drawing.Size(152, 21);
  680. this.numericUpDown4.TabIndex = 14;
  681. //
  682. // comboBox18
  683. //
  684. this.comboBox18.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  685. this.comboBox18.FormattingEnabled = true;
  686. this.comboBox18.Location = new System.Drawing.Point(343, 72);
  687. this.comboBox18.Name = "comboBox18";
  688. this.comboBox18.Size = new System.Drawing.Size(152, 20);
  689. this.comboBox18.TabIndex = 13;
  690. //
  691. // numericUpDown5
  692. //
  693. this.numericUpDown5.Location = new System.Drawing.Point(91, 46);
  694. this.numericUpDown5.Maximum = new decimal(new int[] {
  695. 49000,
  696. 0,
  697. 0,
  698. 0});
  699. this.numericUpDown5.Minimum = new decimal(new int[] {
  700. 1,
  701. 0,
  702. 0,
  703. 0});
  704. this.numericUpDown5.Name = "numericUpDown5";
  705. this.numericUpDown5.Size = new System.Drawing.Size(152, 21);
  706. this.numericUpDown5.TabIndex = 12;
  707. this.numericUpDown5.Value = new decimal(new int[] {
  708. 1,
  709. 0,
  710. 0,
  711. 0});
  712. //
  713. // label28
  714. //
  715. this.label28.AutoSize = true;
  716. this.label28.Location = new System.Drawing.Point(266, 76);
  717. this.label28.Name = "label28";
  718. this.label28.Size = new System.Drawing.Size(65, 12);
  719. this.label28.TabIndex = 9;
  720. this.label28.Text = "线条样式:";
  721. //
  722. // label29
  723. //
  724. this.label29.AutoSize = true;
  725. this.label29.Location = new System.Drawing.Point(266, 49);
  726. this.label29.Name = "label29";
  727. this.label29.Size = new System.Drawing.Size(65, 12);
  728. this.label29.TabIndex = 8;
  729. this.label29.Text = "线条宽度:";
  730. //
  731. // panel8
  732. //
  733. this.panel8.BackColor = System.Drawing.SystemColors.Window;
  734. this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  735. this.panel8.Location = new System.Drawing.Point(343, 20);
  736. this.panel8.Name = "panel8";
  737. this.panel8.Size = new System.Drawing.Size(152, 20);
  738. this.panel8.TabIndex = 7;
  739. this.panel8.Click += new EventHandler(panel8Click);
  740. //
  741. // label30
  742. //
  743. this.label30.AutoSize = true;
  744. this.label30.Location = new System.Drawing.Point(266, 20);
  745. this.label30.Name = "label30";
  746. this.label30.Size = new System.Drawing.Size(65, 12);
  747. this.label30.TabIndex = 6;
  748. this.label30.Text = "线条颜色:";
  749. //
  750. // panel9
  751. //
  752. this.panel9.BackColor = System.Drawing.SystemColors.Window;
  753. this.panel9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  754. this.panel9.Location = new System.Drawing.Point(91, 73);
  755. this.panel9.Name = "panel9";
  756. this.panel9.Size = new System.Drawing.Size(152, 20);
  757. this.panel9.TabIndex = 5;
  758. this.panel9.Click += new EventHandler(panel9Click);
  759. //
  760. // label32
  761. //
  762. this.label32.AutoSize = true;
  763. this.label32.Location = new System.Drawing.Point(13, 76);
  764. this.label32.Name = "label32";
  765. this.label32.Size = new System.Drawing.Size(65, 12);
  766. this.label32.TabIndex = 4;
  767. this.label32.Text = "文字颜色:";
  768. //
  769. // label34
  770. //
  771. this.label34.AutoSize = true;
  772. this.label34.Location = new System.Drawing.Point(13, 50);
  773. this.label34.Name = "label34";
  774. this.label34.Size = new System.Drawing.Size(65, 12);
  775. this.label34.TabIndex = 2;
  776. this.label34.Text = "文字字号:";
  777. //
  778. // comboBox20
  779. //
  780. this.comboBox20.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  781. this.comboBox20.FormattingEnabled = true;
  782. this.comboBox20.Location = new System.Drawing.Point(91, 20);
  783. this.comboBox20.Name = "comboBox20";
  784. this.comboBox20.Size = new System.Drawing.Size(152, 20);
  785. this.comboBox20.TabIndex = 1;
  786. //
  787. // label35
  788. //
  789. this.label35.AutoSize = true;
  790. this.label35.Location = new System.Drawing.Point(13, 23);
  791. this.label35.Name = "label35";
  792. this.label35.Size = new System.Drawing.Size(65, 12);
  793. this.label35.TabIndex = 0;
  794. this.label35.Text = "文字字体:";
  795. //
  796. // MeasurementPropertiesDialog
  797. //
  798. this.ClientSize = new System.Drawing.Size(652, 481);
  799. this.Controls.Add(this.groupBox5);
  800. this.Controls.Add(this.groupBox2);
  801. this.Controls.Add(this.groupBox1);
  802. this.Name = "MeasurementPropertiesDialog";
  803. this.Text = "测量属性";
  804. this.groupBox2.ResumeLayout(false);
  805. this.groupBox2.PerformLayout();
  806. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
  807. this.panel3.ResumeLayout(false);
  808. this.panel3.PerformLayout();
  809. this.panel2.ResumeLayout(false);
  810. this.panel2.PerformLayout();
  811. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).EndInit();
  812. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown21)).EndInit();
  813. this.groupBox1.ResumeLayout(false);
  814. this.groupBox5.ResumeLayout(false);
  815. this.groupBox5.PerformLayout();
  816. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
  817. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
  818. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
  819. this.ResumeLayout(false);
  820. }
  821. #endregion
  822. private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
  823. {
  824. }
  825. private void textColorPanel_Click(object sender, EventArgs e)
  826. {
  827. this.colorsForm.UserPrimaryColor = ColorBgra.FromColor(this.textPanel.BackColor);
  828. this.colorsForm.setSaveBtn_Click(new System.EventHandler(this.textColorChanged));
  829. this.colorsForm.ShowDialog();
  830. }
  831. private void textColorChanged(object sender, EventArgs e)
  832. {
  833. this.textPanel.BackColor = this.colorsForm.UserPrimaryColor.ToColor();
  834. //this.measureStyleModel.backColor = this.colorsForm.UserPrimaryColor.ToColor().ToArgb();
  835. this.colorsForm.Close();
  836. }
  837. private void lineColorPanel_Click(object sender, EventArgs e)
  838. {
  839. this.colorsForm1.UserPrimaryColor = ColorBgra.FromColor(this.linePanel.BackColor);
  840. this.colorsForm1.setSaveBtn_Click(new System.EventHandler(this.lineColorChanged));
  841. this.colorsForm1.ShowDialog();
  842. }
  843. private void lineColorChanged(object sender, EventArgs e)
  844. {
  845. this.linePanel.BackColor = this.colorsForm1.UserPrimaryColor.ToColor();
  846. // this.measureStyleModel.backColor = this.colorsForm.UserPrimaryColor.ToColor().ToArgb();
  847. this.colorsForm1.Close();
  848. }
  849. private void panel8Click(object sender, EventArgs e)
  850. {
  851. this.colorsForm4.UserPrimaryColor = ColorBgra.FromColor(this.panel8.BackColor);
  852. this.colorsForm4.setSaveBtn_Click(new System.EventHandler(this.panel8Changed));
  853. this.colorsForm4.ShowDialog();
  854. }
  855. private void panel8Changed(object sender, EventArgs e)
  856. {
  857. this.panel8.BackColor = this.colorsForm4.UserPrimaryColor.ToColor();
  858. this.colorsForm4.Close();
  859. }
  860. private void panel9Click(object sender, EventArgs e)
  861. {
  862. this.colorsForm5.UserPrimaryColor = ColorBgra.FromColor(this.panel9.BackColor);
  863. this.colorsForm5.setSaveBtn_Click(new System.EventHandler(this.panel9Changed));
  864. this.colorsForm5.ShowDialog();
  865. }
  866. private void panel9Changed(object sender, EventArgs e)
  867. {
  868. this.panel9.BackColor = this.colorsForm5.UserPrimaryColor.ToColor();
  869. this.colorsForm5.Close();
  870. }
  871. /// <summary>
  872. /// 初始化属性画面
  873. /// </summary>
  874. private void UpdateRightSettingUI()
  875. {
  876. switch (this.drawObject.drawToolType)
  877. {
  878. case DrawToolType.MeasureLine: //长度测量直线
  879. MeasureStyleModel.MeasureLine measureLine = this.measureStyleModel.measureLine;
  880. this.panel2.Visible = true;
  881. this.panel3.Visible = false;
  882. this.numericUpDown1.Visible = true;
  883. this.label5.Visible = true;
  884. this.comboBox5.Visible = true;
  885. this.label6.Visible = true;
  886. this.label91.Visible = false;
  887. this.comboBox91.Visible = false;
  888. this.textBox1.Text = this.measureStyleModel.measureLine.aliasName;
  889. this.textBox2.Text = this.measureStyleModel.measureLine.suffixName;
  890. this.comboBox6.SelectedIndex = this.measureStyleModel.measureLine.showAlias ? 0 : 1;
  891. this.comboBox7.SelectedIndex = this.measureStyleModel.measureLine.showSuffix ? 0 : 1;
  892. this.comboBox8.SelectedIndex = this.measureStyleModel.measureLine.showSerial ? 0 : 1;
  893. UpdataFontPosition(false);
  894. this.UpdateMeasureStyleData(measureLine.font, measureLine.fontSize, measureLine.textColor, measureLine.lineColor, measureLine.lineWidth, measureLine.lineStyle, measureLine.linePosition, 0, 0, measureLine.vLineLength,measureLine.chooseStyle,measureLine.followLine);
  895. break;
  896. case DrawToolType.MeasureDistanceLine: //长度测量距离
  897. MeasureStyleModel.MeasureDistanceLine measureDistanceLine = this.measureStyleModel.measureDistanceLine;
  898. this.panel2.Visible = true;
  899. this.panel3.Visible = false;
  900. this.numericUpDown1.Visible = false;
  901. this.label5.Visible = false;
  902. this.comboBox5.Visible = false;
  903. this.label6.Visible = false;
  904. this.label91.Visible = false;
  905. this.comboBox91.Visible = false;
  906. this.textBox1.Text = this.measureStyleModel.measureDistanceLine.aliasName;
  907. this.textBox2.Text = this.measureStyleModel.measureDistanceLine.suffixName;
  908. this.comboBox6.SelectedIndex = this.measureStyleModel.measureDistanceLine.showAlias ? 0 : 1;
  909. this.comboBox7.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSuffix ? 0 : 1;
  910. this.comboBox8.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSerial ? 0 : 1;
  911. UpdataFontPosition(false);
  912. this.UpdateMeasureStyleData(measureDistanceLine.font, measureDistanceLine.fontSize, measureDistanceLine.textColor, measureDistanceLine.lineColor, measureDistanceLine.lineWidth, measureDistanceLine.lineStyle, measureDistanceLine.linePosition, 0, 0, -1, measureDistanceLine.chooseStyle);
  913. break;
  914. case DrawToolType.MeasureLength: //长度测量->长度
  915. MeasureStyleModel.MeasureLength measureLength = this.measureStyleModel.measureLength;
  916. this.panel2.Visible = true;
  917. this.panel3.Visible = false;
  918. this.numericUpDown1.Visible = false;
  919. this.label5.Visible = false;
  920. this.comboBox5.Visible = false;
  921. this.label6.Visible = false;
  922. this.label91.Visible = false;
  923. this.comboBox91.Visible = false;
  924. this.textBox1.Text = this.measureStyleModel.measureLength.aliasName;
  925. this.textBox2.Text = this.measureStyleModel.measureLength.suffixName;
  926. this.comboBox6.SelectedIndex = this.measureStyleModel.measureLength.showAlias ? 0 : 1;
  927. this.comboBox7.SelectedIndex = this.measureStyleModel.measureLength.showSuffix ? 0 : 1;
  928. this.comboBox8.SelectedIndex = this.measureStyleModel.measureLength.showSerial ? 0 : 1;
  929. UpdataFontPosition(false);
  930. this.UpdateMeasureStyleData(measureLength.font, measureLength.fontSize, measureLength.textColor, measureLength.lineColor, measureLength.lineWidth, measureLength.lineStyle, measureLength.linePosition, 0, 0, -1, measureLength.chooseStyle);
  931. break;
  932. case DrawToolType.MeasureHLine: //长度测量->水平线
  933. MeasureStyleModel.MeasureHLine measureHLine = this.measureStyleModel.measureHLine;
  934. this.panel2.Visible = true;
  935. this.panel3.Visible = false;
  936. this.numericUpDown1.Visible = true;
  937. this.label5.Visible = true;
  938. this.comboBox5.Visible = false;
  939. this.label6.Visible = false;
  940. this.label91.Visible = false;
  941. this.comboBox91.Visible = false;
  942. this.textBox1.Text = this.measureStyleModel.measureHLine.aliasName;
  943. this.textBox2.Text = this.measureStyleModel.measureHLine.suffixName;
  944. this.comboBox6.SelectedIndex = this.measureStyleModel.measureHLine.showAlias ? 0 : 1;
  945. this.comboBox7.SelectedIndex = this.measureStyleModel.measureHLine.showSuffix ? 0 : 1;
  946. this.comboBox8.SelectedIndex = this.measureStyleModel.measureHLine.showSerial ? 0 : 1;
  947. UpdataFontPosition(false);
  948. this.UpdateMeasureStyleData(measureHLine.font, measureHLine.fontSize, measureHLine.textColor, measureHLine.lineColor, measureHLine.lineWidth, measureHLine.lineStyle, measureHLine.linePosition, 0, 0, measureHLine.vLineLength, measureHLine.chooseStyle);
  949. break;
  950. case DrawToolType.MeasureVLine: //长度测量->垂线
  951. MeasureStyleModel.MeasureVLine measureVLine = this.measureStyleModel.measureVLine;
  952. this.panel2.Visible = true;
  953. this.panel3.Visible = false;
  954. this.numericUpDown1.Visible = true;
  955. this.label5.Visible = true;
  956. this.comboBox5.Visible = true;
  957. this.label6.Visible = true;
  958. this.label91.Visible = false;
  959. this.comboBox91.Visible = false;
  960. this.textBox1.Text = this.measureStyleModel.measureVLine.aliasName;
  961. this.textBox2.Text = this.measureStyleModel.measureVLine.suffixName;
  962. this.comboBox6.SelectedIndex = this.measureStyleModel.measureVLine.showAlias ? 0 : 1;
  963. this.comboBox7.SelectedIndex = this.measureStyleModel.measureVLine.showSuffix ? 0 : 1;
  964. this.comboBox8.SelectedIndex = this.measureStyleModel.measureVLine.showSerial ? 0 : 1;
  965. UpdataFontPosition(false);
  966. this.UpdateMeasureStyleData(measureVLine.font, measureVLine.fontSize, measureVLine.textColor, measureVLine.lineColor, measureVLine.lineWidth, measureVLine.lineStyle, measureVLine.linePosition, 0, 0, measureVLine.vLineLength, measureVLine.chooseStyle, measureVLine.followLine);
  967. break;
  968. case DrawToolType.MeasureMulLine: //多点线段->多点直线
  969. MeasureStyleModel.MeasureMulLine measureMulLine = this.measureStyleModel.measureMulLine;
  970. this.panel3.Visible = true;
  971. this.panel2.Visible = false;
  972. this.numericUpDown1.Visible = true;
  973. this.label5.Visible = true;
  974. this.comboBox5.Visible = false;
  975. this.label6.Visible = false;
  976. this.label91.Visible = false;
  977. this.comboBox91.Visible = false;
  978. this.textBox1.Text = this.measureStyleModel.measureMulLine.aliasName;
  979. this.textBox2.Text = this.measureStyleModel.measureMulLine.suffixName;
  980. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulLine.showAlias ? 0 : 1;
  981. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulLine.showSuffix ? 0 : 1;
  982. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulLine.showSerial ? 0 : 1;
  983. this.UpdateMeasureStyleData(measureMulLine.font, measureMulLine.fontSize, measureMulLine.textColor, measureMulLine.lineColor, measureMulLine.lineWidth, measureMulLine.lineStyle, 0, measureMulLine.linePositionL, measureMulLine.linePositionP, measureMulLine.vLineLength, measureMulLine.chooseStyle);
  984. break;
  985. case DrawToolType.MeasureMulHVLine: //多点线段->多点水平线
  986. MeasureStyleModel.MeasureMulHVLine measureMulHVLine = this.measureStyleModel.measureMulHVLine;
  987. this.panel3.Visible = true;
  988. this.panel2.Visible = false;
  989. this.numericUpDown1.Visible = true;
  990. this.label5.Visible = true;
  991. this.comboBox5.Visible = false;
  992. this.label6.Visible = false;
  993. this.label91.Visible = false;
  994. this.comboBox91.Visible = false;
  995. this.textBox1.Text = this.measureStyleModel.measureMulHVLine.aliasName;
  996. this.textBox2.Text = this.measureStyleModel.measureMulHVLine.suffixName;
  997. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulHVLine.showAlias ? 0 : 1;
  998. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulHVLine.showSuffix ? 0 : 1;
  999. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulHVLine.showSerial ? 0 : 1;
  1000. this.UpdateMeasureStyleData(measureMulHVLine.font, measureMulHVLine.fontSize, measureMulHVLine.textColor, measureMulHVLine.lineColor, measureMulHVLine.lineWidth, measureMulHVLine.lineStyle, 0, measureMulHVLine.linePositionL, measureMulHVLine.linePositionP, measureMulHVLine.vLineLength, measureMulHVLine.chooseStyle);
  1001. break;
  1002. case DrawToolType.MeasureMulSegment: //多点线段->多点线段
  1003. MeasureStyleModel.MeasureMulSegment measureMulSegment = this.measureStyleModel.measureMulSegment;
  1004. this.panel3.Visible = true;
  1005. this.panel2.Visible = false;
  1006. this.numericUpDown1.Visible = true;
  1007. this.label5.Visible = true;
  1008. this.comboBox5.Visible = false;
  1009. this.label6.Visible = false;
  1010. this.label91.Visible = false;
  1011. this.comboBox91.Visible = false;
  1012. this.textBox1.Text = this.measureStyleModel.measureMulSegment.aliasName;
  1013. this.textBox2.Text = this.measureStyleModel.measureMulSegment.suffixName;
  1014. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulSegment.showAlias ? 0 : 1;
  1015. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulSegment.showSuffix ? 0 : 1;
  1016. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulSegment.showSerial ? 0 : 1;
  1017. this.UpdateMeasureStyleData(measureMulSegment.font, measureMulSegment.fontSize, measureMulSegment.textColor, measureMulSegment.lineColor, measureMulSegment.lineWidth, measureMulSegment.lineStyle, 0, measureMulSegment.linePositionL, measureMulSegment.linePositionP, measureMulSegment.vLineLength, measureMulSegment.chooseStyle);
  1018. break;
  1019. case DrawToolType.MeasureMulVLine: //多点线段->多点垂直线
  1020. MeasureStyleModel.MeasureMulVLine measureMulVLine = this.measureStyleModel.measureMulVLine;
  1021. this.panel3.Visible = true;
  1022. this.panel2.Visible = false;
  1023. this.numericUpDown1.Visible = true;
  1024. this.label5.Visible = true;
  1025. this.comboBox5.Visible = true;
  1026. this.label6.Visible = true;
  1027. this.label91.Visible = false;
  1028. this.comboBox91.Visible = false;
  1029. this.textBox1.Text = this.measureStyleModel.measureMulVLine.aliasName;
  1030. this.textBox2.Text = this.measureStyleModel.measureMulVLine.suffixName;
  1031. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulVLine.showAlias ? 0 : 1;
  1032. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulVLine.showSuffix ? 0 : 1;
  1033. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulVLine.showSerial ? 0 : 1;
  1034. 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);
  1035. break;
  1036. case DrawToolType.MeasureBrokenLine: //曲线长度->折线
  1037. MeasureStyleModel.MeasureBrokenLine measureBrokenLine = this.measureStyleModel.measureBrokenLine;
  1038. this.panel2.Visible = true;
  1039. this.panel3.Visible = false;
  1040. this.numericUpDown1.Visible = false;
  1041. this.label5.Visible = false;
  1042. this.comboBox5.Visible = false;
  1043. this.label6.Visible = false;
  1044. this.label91.Visible = false;
  1045. this.comboBox91.Visible = false;
  1046. this.textBox1.Text = this.measureStyleModel.measureBrokenLine.aliasName;
  1047. this.textBox2.Text = this.measureStyleModel.measureBrokenLine.suffixName;
  1048. this.comboBox6.SelectedIndex = this.measureStyleModel.measureBrokenLine.showAlias ? 0 : 1;
  1049. this.comboBox7.SelectedIndex = this.measureStyleModel.measureBrokenLine.showSuffix ? 0 : 1;
  1050. this.comboBox8.SelectedIndex = this.measureStyleModel.measureBrokenLine.showSerial ? 0 : 1;
  1051. UpdataFontPosition(true);
  1052. this.UpdateMeasureStyleData(measureBrokenLine.font, measureBrokenLine.fontSize, measureBrokenLine.textColor, measureBrokenLine.lineColor, measureBrokenLine.lineWidth, measureBrokenLine.lineStyle, measureBrokenLine.linePosition, 0, 0, -1, measureBrokenLine.chooseStyle);
  1053. break;
  1054. case DrawToolType.MeasureTraceCurve: //曲线长度->轨迹曲线
  1055. MeasureStyleModel.MeasureTraceCurve measureTraceCurve = this.measureStyleModel.measureTraceCurve;
  1056. this.panel2.Visible = true;
  1057. this.panel3.Visible = false;
  1058. this.numericUpDown1.Visible = false;
  1059. this.label5.Visible = false;
  1060. this.comboBox5.Visible = false;
  1061. this.label6.Visible = false;
  1062. this.label91.Visible = false;
  1063. this.comboBox91.Visible = false;
  1064. this.textBox1.Text = this.measureStyleModel.measureTraceCurve.aliasName;
  1065. this.textBox2.Text = this.measureStyleModel.measureTraceCurve.suffixName;
  1066. this.comboBox6.SelectedIndex = this.measureStyleModel.measureTraceCurve.showAlias ? 0 : 1;
  1067. this.comboBox7.SelectedIndex = this.measureStyleModel.measureTraceCurve.showSuffix ? 0 : 1;
  1068. this.comboBox8.SelectedIndex = this.measureStyleModel.measureTraceCurve.showSerial ? 0 : 1;
  1069. UpdataFontPosition(true);
  1070. this.UpdateMeasureStyleData(measureTraceCurve.font, measureTraceCurve.fontSize, measureTraceCurve.textColor, measureTraceCurve.lineColor, measureTraceCurve.lineWidth, measureTraceCurve.lineStyle, measureTraceCurve.linePosition, 0, 0, -1, measureTraceCurve.chooseStyle);
  1071. break;
  1072. case DrawToolType.MeasureCurveLine: //曲线长度->曲线
  1073. MeasureStyleModel.MeasureCurveLine measureCurveLine = this.measureStyleModel.measureCurveLine;
  1074. this.panel2.Visible = true;
  1075. this.panel3.Visible = false;
  1076. this.numericUpDown1.Visible = false;
  1077. this.label5.Visible = false;
  1078. this.comboBox5.Visible = false;
  1079. this.label6.Visible = false;
  1080. this.label91.Visible = false;
  1081. this.comboBox91.Visible = false;
  1082. this.textBox1.Text = this.measureStyleModel.measureCurveLine.aliasName;
  1083. this.textBox2.Text = this.measureStyleModel.measureCurveLine.suffixName;
  1084. this.comboBox6.SelectedIndex = this.measureStyleModel.measureCurveLine.showAlias ? 0 : 1;
  1085. this.comboBox7.SelectedIndex = this.measureStyleModel.measureCurveLine.showSuffix ? 0 : 1;
  1086. this.comboBox8.SelectedIndex = this.measureStyleModel.measureCurveLine.showSerial ? 0 : 1;
  1087. UpdataFontPosition(true);
  1088. this.UpdateMeasureStyleData(measureCurveLine.font, measureCurveLine.fontSize, measureCurveLine.textColor, measureCurveLine.lineColor, measureCurveLine.lineWidth, measureCurveLine.lineStyle, measureCurveLine.linePosition, 0, 0, -1, measureCurveLine.chooseStyle);
  1089. break;
  1090. case DrawToolType.MeasurePLine: //点垂线->点垂线
  1091. MeasureStyleModel.MeasurePLine measurePLine = this.measureStyleModel.measurePLine;
  1092. this.panel3.Visible = true;
  1093. this.panel2.Visible = false;
  1094. this.numericUpDown1.Visible = false;
  1095. this.label5.Visible = false;
  1096. this.comboBox5.Visible = false;
  1097. this.label6.Visible = false;
  1098. this.label91.Visible = false;
  1099. this.comboBox91.Visible = false;
  1100. this.textBox1.Text = this.measureStyleModel.measurePLine.aliasName;
  1101. this.textBox2.Text = this.measureStyleModel.measurePLine.suffixName;
  1102. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePLine.showAlias ? 0 : 1;
  1103. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePLine.showSuffix ? 0 : 1;
  1104. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePLine.showSerial ? 0 : 1;
  1105. this.UpdateMeasureStyleData(measurePLine.font, measurePLine.fontSize, measurePLine.textColor, measurePLine.lineColor, measurePLine.lineWidth, measurePLine.lineStyle, 0, measurePLine.linePositionL, measurePLine.linePositionP, -1, measurePLine.chooseStyle);
  1106. break;
  1107. case DrawToolType.MeasureMulPLine: //点垂线->多点垂线
  1108. MeasureStyleModel.MeasureMulPLine measureMulPLine = this.measureStyleModel.measureMulPLine;
  1109. this.panel3.Visible = true;
  1110. this.panel2.Visible = false;
  1111. this.numericUpDown1.Visible = false;
  1112. this.label5.Visible = false;
  1113. this.comboBox5.Visible = false;
  1114. this.label6.Visible = false;
  1115. this.label91.Visible = false;
  1116. this.comboBox91.Visible = false;
  1117. this.textBox1.Text = this.measureStyleModel.measureMulPLine.aliasName;
  1118. this.textBox2.Text = this.measureStyleModel.measureMulPLine.suffixName;
  1119. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulPLine.showAlias ? 0 : 1;
  1120. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulPLine.showSuffix ? 0 : 1;
  1121. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulPLine.showSerial ? 0 : 1;
  1122. this.UpdateMeasureStyleData(measureMulPLine.font, measureMulPLine.fontSize, measureMulPLine.textColor, measureMulPLine.lineColor, measureMulPLine.lineWidth, measureMulPLine.lineStyle, 0, measureMulPLine.linePositionL, measureMulPLine.linePositionP, -1, measureMulPLine.chooseStyle);
  1123. break;
  1124. case DrawToolType.MeasureHMulPLine: //点垂线->水平多点垂线
  1125. MeasureStyleModel.MeasureHMulPLine measureHMulPLine = this.measureStyleModel.measureHMulPLine;
  1126. this.panel3.Visible = true;
  1127. this.panel2.Visible = false;
  1128. this.numericUpDown1.Visible = false;
  1129. this.label5.Visible = false;
  1130. this.comboBox5.Visible = false;
  1131. this.label6.Visible = false;
  1132. this.label91.Visible = false;
  1133. this.comboBox91.Visible = false;
  1134. this.textBox1.Text = this.measureStyleModel.measureHMulPLine.aliasName;
  1135. this.textBox2.Text = this.measureStyleModel.measureHMulPLine.suffixName;
  1136. this.comboBox6.SelectedIndex = this.measureStyleModel.measureHMulPLine.showAlias ? 0 : 1;
  1137. this.comboBox7.SelectedIndex = this.measureStyleModel.measureHMulPLine.showSuffix ? 0 : 1;
  1138. this.comboBox8.SelectedIndex = this.measureStyleModel.measureHMulPLine.showSerial ? 0 : 1;
  1139. this.UpdateMeasureStyleData(measureHMulPLine.font, measureHMulPLine.fontSize, measureHMulPLine.textColor, measureHMulPLine.lineColor, measureHMulPLine.lineWidth, measureHMulPLine.lineStyle, 0, measureHMulPLine.linePositionL, measureHMulPLine.linePositionP, -1, measureHMulPLine.chooseStyle);
  1140. break;
  1141. case DrawToolType.MeasureVMulPLine: //点垂线->垂直多点垂线
  1142. MeasureStyleModel.MeasureVMulPLine measureVMulPLine = this.measureStyleModel.measureVMulPLine;
  1143. this.panel3.Visible = true;
  1144. this.panel2.Visible = false;
  1145. this.numericUpDown1.Visible = false;
  1146. this.label5.Visible = false;
  1147. this.comboBox5.Visible = false;
  1148. this.label6.Visible = false;
  1149. this.label91.Visible = false;
  1150. this.comboBox91.Visible = false;
  1151. this.textBox1.Text = this.measureStyleModel.measureVMulPLine.aliasName;
  1152. this.textBox2.Text = this.measureStyleModel.measureVMulPLine.suffixName;
  1153. this.comboBox6.SelectedIndex = this.measureStyleModel.measureVMulPLine.showAlias ? 0 : 1;
  1154. this.comboBox7.SelectedIndex = this.measureStyleModel.measureVMulPLine.showSuffix ? 0 : 1;
  1155. this.comboBox8.SelectedIndex = this.measureStyleModel.measureVMulPLine.showSerial ? 0 : 1;
  1156. this.UpdateMeasureStyleData(measureVMulPLine.font, measureVMulPLine.fontSize, measureVMulPLine.textColor, measureVMulPLine.lineColor, measureVMulPLine.lineWidth, measureVMulPLine.lineStyle, 0, measureVMulPLine.linePositionL, measureVMulPLine.linePositionP, -1, measureVMulPLine.chooseStyle);
  1157. break;
  1158. case DrawToolType.MeasurePointHLine: //点垂线->点到水平线距离
  1159. MeasureStyleModel.MeasurePointHLine measurePointHLine = this.measureStyleModel.measurePointHLine;
  1160. this.panel3.Visible = true;
  1161. this.panel2.Visible = false;
  1162. this.numericUpDown1.Visible = false;
  1163. this.label5.Visible = false;
  1164. this.comboBox5.Visible = false;
  1165. this.label6.Visible = false;
  1166. this.label91.Visible = false;
  1167. this.comboBox91.Visible = false;
  1168. this.textBox1.Text = this.measureStyleModel.measurePointHLine.aliasName;
  1169. this.textBox2.Text = this.measureStyleModel.measurePointHLine.suffixName;
  1170. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointHLine.showAlias ? 0 : 1;
  1171. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointHLine.showSuffix ? 0 : 1;
  1172. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointHLine.showSerial ? 0 : 1;
  1173. this.UpdateMeasureStyleData(measurePointHLine.font, measurePointHLine.fontSize, measurePointHLine.textColor, measurePointHLine.lineColor, measurePointHLine.lineWidth, measurePointHLine.lineStyle, 0, measurePointHLine.linePositionL, measurePointHLine.linePositionP, -1, measurePointHLine.chooseStyle);
  1174. break;
  1175. case DrawToolType.MeasureParallelLine: //平行线测量->平行线
  1176. MeasureStyleModel.MeasureParallelLine measureParallelLine = this.measureStyleModel.measureParallelLine;
  1177. this.panel3.Visible = true;
  1178. this.panel2.Visible = false;
  1179. this.numericUpDown1.Visible = false;
  1180. this.label5.Visible = false;
  1181. this.comboBox5.Visible = true;
  1182. this.label6.Visible = true;
  1183. this.label91.Visible = false;
  1184. this.comboBox91.Visible = false;
  1185. this.textBox1.Text = this.measureStyleModel.measureParallelLine.aliasName;
  1186. this.textBox2.Text = this.measureStyleModel.measureParallelLine.suffixName;
  1187. this.comboBox6.SelectedIndex = this.measureStyleModel.measureParallelLine.showAlias ? 0 : 1;
  1188. this.comboBox7.SelectedIndex = this.measureStyleModel.measureParallelLine.showSuffix ? 0 : 1;
  1189. this.comboBox8.SelectedIndex = this.measureStyleModel.measureParallelLine.showSerial ? 0 : 1;
  1190. this.UpdateMeasureStyleData(measureParallelLine.font, measureParallelLine.fontSize, measureParallelLine.textColor, measureParallelLine.lineColor, measureParallelLine.lineWidth, measureParallelLine.lineStyle, 0, measureParallelLine.linePositionL, measureParallelLine.linePositionP, -1, measureParallelLine.chooseStyle, measureParallelLine.followLine);
  1191. break;
  1192. case DrawToolType.MeasureMulParallelLine: //平行线测量->多点平行线
  1193. MeasureStyleModel.MeasureMulParallelLine measureMulParallelLine = this.measureStyleModel.measureMulParallelLine;
  1194. this.panel3.Visible = true;
  1195. this.panel2.Visible = false;
  1196. this.numericUpDown1.Visible = false;
  1197. this.label5.Visible = false;
  1198. this.comboBox5.Visible = false;
  1199. this.label6.Visible = false;
  1200. this.label91.Visible = false;
  1201. this.comboBox91.Visible = false;
  1202. this.textBox1.Text = this.measureStyleModel.measureMulParallelLine.aliasName;
  1203. this.textBox2.Text = this.measureStyleModel.measureMulParallelLine.suffixName;
  1204. this.comboBox6.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showAlias ? 0 : 1;
  1205. this.comboBox7.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showSuffix ? 0 : 1;
  1206. this.comboBox8.SelectedIndex = this.measureStyleModel.measureMulParallelLine.showSerial ? 0 : 1;
  1207. this.UpdateMeasureStyleData(measureMulParallelLine.font, measureMulParallelLine.fontSize, measureMulParallelLine.textColor, measureMulParallelLine.lineColor, measureMulParallelLine.lineWidth, measureMulParallelLine.lineStyle, 0, measureMulParallelLine.linePositionL, measureMulParallelLine.linePositionP, -1, measureMulParallelLine.chooseStyle);
  1208. break;
  1209. case DrawToolType.MeasureVMulParallelLine: //平行线测量->垂直多点平行线
  1210. MeasureStyleModel.MeasureVMulParallelLine measureVMulParallelLine = this.measureStyleModel.measureVMulParallelLine;
  1211. this.panel3.Visible = true;
  1212. this.panel2.Visible = false;
  1213. this.numericUpDown1.Visible = false;
  1214. this.label5.Visible = false;
  1215. this.comboBox5.Visible = false;
  1216. this.label6.Visible = false;
  1217. this.label91.Visible = false;
  1218. this.comboBox91.Visible = false;
  1219. this.textBox1.Text = this.measureStyleModel.measureVMulParallelLine.aliasName;
  1220. this.textBox2.Text = this.measureStyleModel.measureVMulParallelLine.suffixName;
  1221. this.comboBox6.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showAlias ? 0 : 1;
  1222. this.comboBox7.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showSuffix ? 0 : 1;
  1223. this.comboBox8.SelectedIndex = this.measureStyleModel.measureVMulParallelLine.showSerial ? 0 : 1;
  1224. this.UpdateMeasureStyleData(measureVMulParallelLine.font, measureVMulParallelLine.fontSize, measureVMulParallelLine.textColor, measureVMulParallelLine.lineColor, measureVMulParallelLine.lineWidth, measureVMulParallelLine.lineStyle, 0, measureVMulParallelLine.linePositionL, measureVMulParallelLine.linePositionP, -1, measureVMulParallelLine.chooseStyle);
  1225. break;
  1226. case DrawToolType.MeasureHMulParallelLine: //平行线测量->水平多点平行线
  1227. MeasureStyleModel.MeasureHMulParallelLine measureHMulParallelLine = this.measureStyleModel.measureHMulParallelLine;
  1228. this.panel3.Visible = true;
  1229. this.panel2.Visible = false;
  1230. this.numericUpDown1.Visible = false;
  1231. this.label5.Visible = false;
  1232. this.comboBox5.Visible = false;
  1233. this.label6.Visible = false;
  1234. this.label91.Visible = false;
  1235. this.comboBox91.Visible = false;
  1236. this.textBox1.Text = this.measureStyleModel.measureHMulParallelLine.aliasName;
  1237. this.textBox2.Text = this.measureStyleModel.measureHMulParallelLine.suffixName;
  1238. this.comboBox6.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showAlias ? 0 : 1;
  1239. this.comboBox7.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showSuffix ? 0 : 1;
  1240. this.comboBox8.SelectedIndex = this.measureStyleModel.measureHMulParallelLine.showSerial ? 0 : 1;
  1241. this.UpdateMeasureStyleData(measureHMulParallelLine.font, measureHMulParallelLine.fontSize, measureHMulParallelLine.textColor, measureHMulParallelLine.lineColor, measureHMulParallelLine.lineWidth, measureHMulParallelLine.lineStyle, 0, measureHMulParallelLine.linePositionL, measureHMulParallelLine.linePositionP, -1, measureHMulParallelLine.chooseStyle);
  1242. break;
  1243. case DrawToolType.MeasureClosedCurve: //多边形测量->闭合曲线
  1244. MeasureStyleModel.MeasureClosedCurve measureClosedCurve = this.measureStyleModel.measureClosedCurve;
  1245. this.panel3.Visible = false;
  1246. this.panel2.Visible = false;
  1247. this.numericUpDown1.Visible = false;
  1248. this.label5.Visible = false;
  1249. this.comboBox5.Visible = false;
  1250. this.label6.Visible = false;
  1251. this.label91.Visible = false;
  1252. this.comboBox91.Visible = false;
  1253. this.textBox1.Text = this.measureStyleModel.measureClosedCurve.aliasName;
  1254. this.textBox2.Text = this.measureStyleModel.measureClosedCurve.suffixName;
  1255. this.comboBox6.SelectedIndex = this.measureStyleModel.measureClosedCurve.showAlias ? 0 : 1;
  1256. this.comboBox7.SelectedIndex = this.measureStyleModel.measureClosedCurve.showSuffix ? 0 : 1;
  1257. this.comboBox8.SelectedIndex = this.measureStyleModel.measureClosedCurve.showSerial ? 0 : 1;
  1258. this.UpdateMeasureStyleData(measureClosedCurve.font, measureClosedCurve.fontSize, measureClosedCurve.textColor, measureClosedCurve.lineColor, measureClosedCurve.lineWidth, measureClosedCurve.lineStyle, 0, 0, 0, -1, measureClosedCurve.chooseStyle);
  1259. break;
  1260. case DrawToolType.MeasurePolygon: //多边形测量->多边形
  1261. MeasureStyleModel.MeasurePolygon measurePolygon = this.measureStyleModel.measurePolygon;
  1262. this.panel3.Visible = false;
  1263. this.panel2.Visible = false;
  1264. this.numericUpDown1.Visible = false;
  1265. this.label5.Visible = false;
  1266. this.comboBox5.Visible = false;
  1267. this.label6.Visible = false;
  1268. this.label91.Visible = false;
  1269. this.comboBox91.Visible = false;
  1270. this.textBox1.Text = this.measureStyleModel.measurePolygon.aliasName;
  1271. this.textBox2.Text = this.measureStyleModel.measurePolygon.suffixName;
  1272. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePolygon.showAlias ? 0 : 1;
  1273. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePolygon.showSuffix ? 0 : 1;
  1274. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePolygon.showSerial ? 0 : 1;
  1275. this.UpdateMeasureStyleData(measurePolygon.font, measurePolygon.fontSize, measurePolygon.textColor, measurePolygon.lineColor, measurePolygon.lineWidth, measurePolygon.lineStyle, 0, 0, 0, -1, measurePolygon.chooseStyle);
  1276. break;
  1277. case DrawToolType.MeasureRectangle: //多边形测量->矩形
  1278. MeasureStyleModel.MeasureRectangle measureRectangle = this.measureStyleModel.measureRectangle;
  1279. this.panel3.Visible = false;
  1280. this.panel2.Visible = false;
  1281. this.numericUpDown1.Visible = false;
  1282. this.label5.Visible = false;
  1283. this.comboBox5.Visible = false;
  1284. this.label6.Visible = false;
  1285. this.label91.Visible = false;
  1286. this.comboBox91.Visible = false;
  1287. this.textBox1.Text = this.measureStyleModel.measureRectangle.aliasName;
  1288. this.textBox2.Text = this.measureStyleModel.measureRectangle.suffixName;
  1289. this.comboBox6.SelectedIndex = this.measureStyleModel.measureRectangle.showAlias ? 0 : 1;
  1290. this.comboBox7.SelectedIndex = this.measureStyleModel.measureRectangle.showSuffix ? 0 : 1;
  1291. this.comboBox8.SelectedIndex = this.measureStyleModel.measureRectangle.showSerial ? 0 : 1;
  1292. this.UpdateMeasureStyleData(measureRectangle.font, measureRectangle.fontSize, measureRectangle.textColor, measureRectangle.lineColor, measureRectangle.lineWidth, measureRectangle.lineStyle, 0, 0, 0, -1, measureRectangle.chooseStyle);
  1293. break;
  1294. case DrawToolType.MeasureRandRectangle: //多边形测量->任意矩形
  1295. MeasureStyleModel.MeasureRandRectangle measureRandRectangle = this.measureStyleModel.measureRandRectangle;
  1296. this.panel3.Visible = false;
  1297. this.panel2.Visible = false;
  1298. this.numericUpDown1.Visible = false;
  1299. this.label5.Visible = false;
  1300. this.comboBox5.Visible = false;
  1301. this.label6.Visible = false;
  1302. this.label91.Visible = false;
  1303. this.comboBox91.Visible = false;
  1304. this.textBox1.Text = this.measureStyleModel.measureRandRectangle.aliasName;
  1305. this.textBox2.Text = this.measureStyleModel.measureRandRectangle.suffixName;
  1306. this.comboBox6.SelectedIndex = this.measureStyleModel.measureRandRectangle.showAlias ? 0 : 1;
  1307. this.comboBox7.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSuffix ? 0 : 1;
  1308. this.comboBox8.SelectedIndex = this.measureStyleModel.measureDistanceLine.showSerial ? 0 : 1;
  1309. this.UpdateMeasureStyleData(measureRandRectangle.font, measureRandRectangle.fontSize, measureRandRectangle.textColor, measureRandRectangle.lineColor, measureRandRectangle.lineWidth, measureRandRectangle.lineStyle, 0, 0, 0, -1, measureRandRectangle.chooseStyle);
  1310. break;
  1311. case DrawToolType.MeasureSquare: //多边形测量->正方形
  1312. MeasureStyleModel.MeasureSquare measureSquare = this.measureStyleModel.measureSquare;
  1313. this.panel3.Visible = false;
  1314. this.panel2.Visible = false;
  1315. this.numericUpDown1.Visible = false;
  1316. this.label5.Visible = false;
  1317. this.comboBox5.Visible = false;
  1318. this.label6.Visible = false;
  1319. this.label91.Visible = false;
  1320. this.comboBox91.Visible = false;
  1321. this.textBox1.Text = this.measureStyleModel.measureSquare.aliasName;
  1322. this.textBox2.Text = this.measureStyleModel.measureSquare.suffixName;
  1323. this.comboBox6.SelectedIndex = this.measureStyleModel.measureSquare.showAlias ? 0 : 1;
  1324. this.comboBox7.SelectedIndex = this.measureStyleModel.measureSquare.showSuffix ? 0 : 1;
  1325. this.comboBox8.SelectedIndex = this.measureStyleModel.measureSquare.showSerial ? 0 : 1;
  1326. this.UpdateMeasureStyleData(measureSquare.font, measureSquare.fontSize, measureSquare.textColor, measureSquare.lineColor, measureSquare.lineWidth, measureSquare.lineStyle, 0, 0, 0, -1, measureSquare.chooseStyle);
  1327. break;
  1328. case DrawToolType.MeasureRandSquare: //多边形测量->任意正方形
  1329. MeasureStyleModel.MeasureRandSquare measureRandSquare = this.measureStyleModel.measureRandSquare;
  1330. this.panel3.Visible = false;
  1331. this.panel2.Visible = false;
  1332. this.numericUpDown1.Visible = false;
  1333. this.label5.Visible = false;
  1334. this.comboBox5.Visible = false;
  1335. this.label6.Visible = false;
  1336. this.label91.Visible = false;
  1337. this.comboBox91.Visible = false;
  1338. this.textBox1.Text = this.measureStyleModel.measureRandSquare.aliasName;
  1339. this.textBox2.Text = this.measureStyleModel.measureRandSquare.suffixName;
  1340. this.comboBox6.SelectedIndex = this.measureStyleModel.measureRandSquare.showAlias ? 0 : 1;
  1341. this.comboBox7.SelectedIndex = this.measureStyleModel.measureRandSquare.showSuffix ? 0 : 1;
  1342. this.comboBox8.SelectedIndex = this.measureStyleModel.measureRandSquare.showSerial ? 0 : 1;
  1343. this.UpdateMeasureStyleData(measureRandSquare.font, measureRandSquare.fontSize, measureRandSquare.textColor, measureRandSquare.lineColor, measureRandSquare.lineWidth, measureRandSquare.lineStyle, 0, 0, 0, -1, measureRandSquare.chooseStyle);
  1344. break;
  1345. case DrawToolType.MeasureTracePolygon: //多边形测量->轨迹多边形
  1346. MeasureStyleModel.MeasureTracePolygon measureTracePolygon = this.measureStyleModel.measureTracePolygon;
  1347. this.panel3.Visible = false;
  1348. this.panel2.Visible = false;
  1349. this.numericUpDown1.Visible = false;
  1350. this.label5.Visible = false;
  1351. this.comboBox5.Visible = false;
  1352. this.label6.Visible = false;
  1353. this.label91.Visible = false;
  1354. this.comboBox91.Visible = false;
  1355. this.textBox1.Text = this.measureStyleModel.measureTracePolygon.aliasName;
  1356. this.textBox2.Text = this.measureStyleModel.measureTracePolygon.suffixName;
  1357. this.comboBox6.SelectedIndex = this.measureStyleModel.measureTracePolygon.showAlias ? 0 : 1;
  1358. this.comboBox7.SelectedIndex = this.measureStyleModel.measureTracePolygon.showSuffix ? 0 : 1;
  1359. this.comboBox8.SelectedIndex = this.measureStyleModel.measureTracePolygon.showSerial ? 0 : 1;
  1360. this.UpdateMeasureStyleData(measureTracePolygon.font, measureTracePolygon.fontSize, measureTracePolygon.textColor, measureTracePolygon.lineColor, measureTracePolygon.lineWidth, measureTracePolygon.lineStyle, 0, 0, 0, -1, measureTracePolygon.chooseStyle);
  1361. break;
  1362. case DrawToolType.MeasureCircle: //圆形测量->三点圆
  1363. MeasureStyleModel.MeasureCircle measureCircle = this.measureStyleModel.measureCircle;
  1364. this.panel3.Visible = false;
  1365. this.panel2.Visible = false;
  1366. this.numericUpDown1.Visible = false;
  1367. this.label5.Visible = false;
  1368. this.comboBox5.Visible = false;
  1369. this.label6.Visible = false;
  1370. this.label91.Visible = false;
  1371. this.comboBox91.Visible = false;
  1372. this.textBox1.Text = this.measureStyleModel.measureCircle.aliasName;
  1373. this.textBox2.Text = this.measureStyleModel.measureCircle.suffixName;
  1374. this.comboBox6.SelectedIndex = this.measureStyleModel.measureCircle.showAlias ? 0 : 1;
  1375. this.comboBox7.SelectedIndex = this.measureStyleModel.measureCircle.showSuffix ? 0 : 1;
  1376. this.comboBox8.SelectedIndex = this.measureStyleModel.measureCircle.showSerial ? 0 : 1;
  1377. this.UpdateMeasureStyleData(measureCircle.font, measureCircle.fontSize, measureCircle.textColor, measureCircle.lineColor, measureCircle.lineWidth, measureCircle.lineStyle, 0, 0, 0, -1, measureCircle.chooseStyle);
  1378. break;
  1379. case DrawToolType.MeasureInnerCircle: //圆形测量->向内画圆
  1380. MeasureStyleModel.MeasureInnerCircle measureInnerCircle = this.measureStyleModel.measureInnerCircle;
  1381. this.panel3.Visible = false;
  1382. this.panel2.Visible = false;
  1383. this.numericUpDown1.Visible = false;
  1384. this.label5.Visible = false;
  1385. this.comboBox5.Visible = false;
  1386. this.label6.Visible = false;
  1387. this.label91.Visible = false;
  1388. this.comboBox91.Visible = false;
  1389. this.textBox1.Text = this.measureStyleModel.measureInnerCircle.aliasName;
  1390. this.textBox2.Text = this.measureStyleModel.measureInnerCircle.suffixName;
  1391. this.comboBox6.SelectedIndex = this.measureStyleModel.measureInnerCircle.showAlias ? 0 : 1;
  1392. this.comboBox7.SelectedIndex = this.measureStyleModel.measureInnerCircle.showSuffix ? 0 : 1;
  1393. this.comboBox8.SelectedIndex = this.measureStyleModel.measureInnerCircle.showSerial ? 0 : 1;
  1394. this.UpdateMeasureStyleData(measureInnerCircle.font, measureInnerCircle.fontSize, measureInnerCircle.textColor, measureInnerCircle.lineColor, measureInnerCircle.lineWidth, measureInnerCircle.lineStyle, 0, 0, 0, -1, measureInnerCircle.chooseStyle);
  1395. break;
  1396. case DrawToolType.MeasureOuterCircle: //圆形测量->向外画圆
  1397. MeasureStyleModel.MeasureOuterCircle measureOuterCircle = this.measureStyleModel.measureOuterCircle;
  1398. this.panel3.Visible = false;
  1399. this.panel2.Visible = false;
  1400. this.numericUpDown1.Visible = false;
  1401. this.label5.Visible = false;
  1402. this.comboBox5.Visible = false;
  1403. this.label6.Visible = false;
  1404. this.label91.Visible = false;
  1405. this.comboBox91.Visible = false;
  1406. this.textBox1.Text = this.measureStyleModel.measureOuterCircle.aliasName;
  1407. this.textBox2.Text = this.measureStyleModel.measureOuterCircle.suffixName;
  1408. this.comboBox6.SelectedIndex = this.measureStyleModel.measureOuterCircle.showAlias ? 0 : 1;
  1409. this.comboBox7.SelectedIndex = this.measureStyleModel.measureOuterCircle.showSuffix ? 0 : 1;
  1410. this.comboBox8.SelectedIndex = this.measureStyleModel.measureOuterCircle.showSerial ? 0 : 1;
  1411. this.UpdateMeasureStyleData(measureOuterCircle.font, measureOuterCircle.fontSize, measureOuterCircle.textColor, measureOuterCircle.lineColor, measureOuterCircle.lineWidth, measureOuterCircle.lineStyle, 0, 0, 0, -1, measureOuterCircle.chooseStyle);
  1412. break;
  1413. case DrawToolType.MeasureDiameterCircle: //圆形测量->直径画圆
  1414. MeasureStyleModel.MeasureDiameterCircle measureDiameterCircle = this.measureStyleModel.measureDiameterCircle;
  1415. this.panel3.Visible = false;
  1416. this.panel2.Visible = false;
  1417. this.numericUpDown1.Visible = false;
  1418. this.label5.Visible = false;
  1419. this.comboBox5.Visible = false;
  1420. this.label6.Visible = false;
  1421. this.label91.Visible = false;
  1422. this.comboBox91.Visible = false;
  1423. this.textBox1.Text = this.measureStyleModel.measureDiameterCircle.aliasName;
  1424. this.textBox2.Text = this.measureStyleModel.measureDiameterCircle.suffixName;
  1425. this.comboBox6.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showAlias ? 0 : 1;
  1426. this.comboBox7.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showSuffix ? 0 : 1;
  1427. this.comboBox8.SelectedIndex = this.measureStyleModel.measureDiameterCircle.showSerial ? 0 : 1;
  1428. this.UpdateMeasureStyleData(measureDiameterCircle.font, measureDiameterCircle.fontSize, measureDiameterCircle.textColor, measureDiameterCircle.lineColor, measureDiameterCircle.lineWidth, measureDiameterCircle.lineStyle, 0, 0, 0, -1, measureDiameterCircle.chooseStyle);
  1429. break;
  1430. case DrawToolType.MeasurePointEdgeSize: //圆形测量->点到圆距离
  1431. MeasureStyleModel.MeasurePointEdgeSize measurePointEdgeSize = this.measureStyleModel.measurePointEdgeSize;
  1432. this.panel3.Visible = false;
  1433. this.panel2.Visible = false;
  1434. this.numericUpDown1.Visible = false;
  1435. this.label5.Visible = false;
  1436. this.comboBox5.Visible = false;
  1437. this.label6.Visible = false;
  1438. this.label91.Visible = false;
  1439. this.comboBox91.Visible = false;
  1440. this.textBox1.Text = this.measureStyleModel.measurePointEdgeSize.aliasName;
  1441. this.textBox2.Text = this.measureStyleModel.measurePointEdgeSize.suffixName;
  1442. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showAlias ? 0 : 1;
  1443. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showSuffix ? 0 : 1;
  1444. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointEdgeSize.showSerial ? 0 : 1;
  1445. this.UpdateMeasureStyleData(measurePointEdgeSize.font, measurePointEdgeSize.fontSize, measurePointEdgeSize.textColor, measurePointEdgeSize.lineColor, measurePointEdgeSize.lineWidth, measurePointEdgeSize.lineStyle, 0, 0, 0, -1, measurePointEdgeSize.chooseStyle);
  1446. break;
  1447. case DrawToolType.MeasurePointCenterSize: //圆形测量->点到圆心距离
  1448. MeasureStyleModel.MeasurePointCenterSize measurePointCenterSize = this.measureStyleModel.measurePointCenterSize;
  1449. this.panel3.Visible = false;
  1450. this.panel2.Visible = false;
  1451. this.numericUpDown1.Visible = false;
  1452. this.label5.Visible = false;
  1453. this.comboBox5.Visible = false;
  1454. this.label6.Visible = false;
  1455. this.label91.Visible = false;
  1456. this.comboBox91.Visible = false;
  1457. this.textBox1.Text = this.measureStyleModel.measurePointCenterSize.aliasName;
  1458. this.textBox2.Text = this.measureStyleModel.measurePointCenterSize.suffixName;
  1459. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showAlias ? 0 : 1;
  1460. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showSuffix ? 0 : 1;
  1461. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointCenterSize.showSerial ? 0 : 1;
  1462. this.UpdateMeasureStyleData(measurePointCenterSize.font, measurePointCenterSize.fontSize, measurePointCenterSize.textColor, measurePointCenterSize.lineColor, measurePointCenterSize.lineWidth, measurePointCenterSize.lineStyle, 0, 0, 0, -1, measurePointCenterSize.chooseStyle);
  1463. break;
  1464. case DrawToolType.MeasurePointArcSize: //圆形测量->点到圆弧距离
  1465. MeasureStyleModel.MeasurePointArcSize measurePointArcSize = this.measureStyleModel.measurePointArcSize;
  1466. this.panel3.Visible = false;
  1467. this.panel2.Visible = false;
  1468. this.numericUpDown1.Visible = false;
  1469. this.label5.Visible = false;
  1470. this.comboBox5.Visible = false;
  1471. this.label6.Visible = false;
  1472. this.label91.Visible = false;
  1473. this.comboBox91.Visible = false;
  1474. this.textBox1.Text = this.measureStyleModel.measurePointArcSize.aliasName;
  1475. this.textBox2.Text = this.measureStyleModel.measurePointArcSize.suffixName;
  1476. this.comboBox6.SelectedIndex = this.measureStyleModel.measurePointArcSize.showAlias ? 0 : 1;
  1477. this.comboBox7.SelectedIndex = this.measureStyleModel.measurePointArcSize.showSuffix ? 0 : 1;
  1478. this.comboBox8.SelectedIndex = this.measureStyleModel.measurePointArcSize.showSerial ? 0 : 1;
  1479. this.UpdateMeasureStyleData(measurePointArcSize.font, measurePointArcSize.fontSize, measurePointArcSize.textColor, measurePointArcSize.lineColor, measurePointArcSize.lineWidth, measurePointArcSize.lineStyle, 0, 0, 0, -1, measurePointArcSize.chooseStyle);
  1480. break;
  1481. case DrawToolType.MeasureThreePointAngle: //角度测量->三点角度
  1482. MeasureStyleModel.MeasureThreePointAngle measureThreePointAngle = this.measureStyleModel.measureThreePointAngle;
  1483. this.panel3.Visible = false;
  1484. this.panel2.Visible = false;
  1485. this.numericUpDown1.Visible = false;
  1486. this.label5.Visible = false;
  1487. this.comboBox5.Visible = false;
  1488. this.label6.Visible = false;
  1489. this.label91.Visible = true;
  1490. this.comboBox91.Visible = true;
  1491. this.textBox1.Text = this.measureStyleModel.measureThreePointAngle.aliasName;
  1492. this.textBox2.Text = this.measureStyleModel.measureThreePointAngle.suffixName;
  1493. this.comboBox6.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showAlias ? 0 : 1;
  1494. this.comboBox7.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showSuffix ? 0 : 1;
  1495. this.comboBox8.SelectedIndex = this.measureStyleModel.measureThreePointAngle.showSerial ? 0 : 1;
  1496. this.UpdateMeasureStyleData(measureThreePointAngle.font, measureThreePointAngle.fontSize, measureThreePointAngle.textColor, measureThreePointAngle.lineColor, measureThreePointAngle.lineWidth, measureThreePointAngle.lineStyle, 0, 0, 0, -1, measureThreePointAngle.chooseStyle,false, measureThreePointAngle.isAngle);
  1497. break;
  1498. case DrawToolType.MeasureFourPointAngle: //角度测量->四点角度
  1499. MeasureStyleModel.MeasureFourPointAngle measureFourPointAngle = this.measureStyleModel.measureFourPointAngle;
  1500. this.panel3.Visible = false;
  1501. this.panel2.Visible = false;
  1502. this.numericUpDown1.Visible = false;
  1503. this.label5.Visible = false;
  1504. this.comboBox5.Visible = false;
  1505. this.label6.Visible = false;
  1506. this.label91.Visible = true;
  1507. this.comboBox91.Visible = true;
  1508. this.textBox1.Text = this.measureStyleModel.measureFourPointAngle.aliasName;
  1509. this.textBox2.Text = this.measureStyleModel.measureFourPointAngle.suffixName;
  1510. this.comboBox6.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showAlias ? 0 : 1;
  1511. this.comboBox7.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showSuffix ? 0 : 1;
  1512. this.comboBox8.SelectedIndex = this.measureStyleModel.measureFourPointAngle.showSerial ? 0 : 1;
  1513. this.UpdateMeasureStyleData(measureFourPointAngle.font, measureFourPointAngle.fontSize, measureFourPointAngle.textColor, measureFourPointAngle.lineColor, measureFourPointAngle.lineWidth, measureFourPointAngle.lineStyle, 0, 0, 0, -1, measureFourPointAngle.chooseStyle, false, measureFourPointAngle.isAngle);
  1514. break;
  1515. case DrawToolType.MeasureThreePointArc: //角度测量->三点弧
  1516. MeasureStyleModel.MeasureThreePointArc measureThreePointArc = this.measureStyleModel.measureThreePointArc;
  1517. this.panel3.Visible = false;
  1518. this.panel2.Visible = false;
  1519. this.numericUpDown1.Visible = false;
  1520. this.label5.Visible = false;
  1521. this.comboBox5.Visible = false;
  1522. this.label6.Visible = false;
  1523. this.label91.Visible = true;
  1524. this.comboBox91.Visible = true;
  1525. this.textBox1.Text = this.measureStyleModel.measureThreePointArc.aliasName;
  1526. this.textBox2.Text = this.measureStyleModel.measureThreePointArc.suffixName;
  1527. this.comboBox6.SelectedIndex = this.measureStyleModel.measureThreePointArc.showAlias ? 0 : 1;
  1528. this.comboBox7.SelectedIndex = this.measureStyleModel.measureThreePointArc.showSuffix ? 0 : 1;
  1529. this.comboBox8.SelectedIndex = this.measureStyleModel.measureThreePointArc.showSerial ? 0 : 1;
  1530. this.UpdateMeasureStyleData(measureThreePointArc.font, measureThreePointArc.fontSize, measureThreePointArc.textColor, measureThreePointArc.lineColor, measureThreePointArc.lineWidth, measureThreePointArc.lineStyle, 0, 0, 0, -1, measureThreePointArc.chooseStyle, false, measureThreePointArc.isAngle);
  1531. break;
  1532. case DrawToolType.MeasureCenterCenterSize: //对准度测量->圆心到圆心距离
  1533. MeasureStyleModel.MeasureCenterCenterSize measureCenterCenterSize = this.measureStyleModel.measureCenterCenterSize;
  1534. this.panel3.Visible = false;
  1535. this.panel2.Visible = true;
  1536. this.numericUpDown1.Visible = false;
  1537. this.label5.Visible = false;
  1538. this.comboBox5.Visible = false;
  1539. this.label6.Visible = false;
  1540. this.label91.Visible = false;
  1541. this.comboBox91.Visible = false;
  1542. this.textBox1.Text = this.measureStyleModel.measureCenterCenterSize.aliasName;
  1543. this.textBox2.Text = this.measureStyleModel.measureCenterCenterSize.suffixName;
  1544. this.comboBox6.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showAlias ? 0 : 1;
  1545. this.comboBox7.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showSuffix ? 0 : 1;
  1546. this.comboBox8.SelectedIndex = this.measureStyleModel.measureCenterCenterSize.showSerial ? 0 : 1;
  1547. UpdataFontPosition(false);
  1548. this.UpdateMeasureStyleData(measureCenterCenterSize.font, measureCenterCenterSize.fontSize, measureCenterCenterSize.textColor, measureCenterCenterSize.lineColor, measureCenterCenterSize.lineWidth, measureCenterCenterSize.lineStyle, measureCenterCenterSize.linePosition, 0, 0, -1, measureCenterCenterSize.chooseStyle);
  1549. break;
  1550. case DrawToolType.MeasureTwoLineVLDistance: //对准度测量->两线中垂线距离
  1551. MeasureStyleModel.MeasureTwoLineVLDistance measureTwoLineVLDistance = this.measureStyleModel.measureTwoLineVLDistance;
  1552. this.panel3.Visible = false;
  1553. this.panel2.Visible = true;
  1554. this.numericUpDown1.Visible = false;
  1555. this.label5.Visible = false;
  1556. this.comboBox5.Visible = false;
  1557. this.label6.Visible = false;
  1558. this.label91.Visible = false;
  1559. this.comboBox91.Visible = false;
  1560. this.textBox1.Text = this.measureStyleModel.measureTwoLineVLDistance.aliasName;
  1561. this.textBox2.Text = this.measureStyleModel.measureTwoLineVLDistance.suffixName;
  1562. this.comboBox6.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showAlias ? 0 : 1;
  1563. this.comboBox7.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showSuffix ? 0 : 1;
  1564. this.comboBox8.SelectedIndex = this.measureStyleModel.measureTwoLineVLDistance.showSerial ? 0 : 1;
  1565. UpdataFontPosition(false);
  1566. this.UpdateMeasureStyleData(measureTwoLineVLDistance.font, measureTwoLineVLDistance.fontSize, measureTwoLineVLDistance.textColor, measureTwoLineVLDistance.lineColor, measureTwoLineVLDistance.lineWidth, measureTwoLineVLDistance.lineStyle, measureTwoLineVLDistance.linePosition, 0, 0, -1, measureTwoLineVLDistance.chooseStyle);
  1567. break;
  1568. }
  1569. }
  1570. private void UpdataFontPosition(bool curve)
  1571. {
  1572. List<string> position = new List<string> { PdnResources.GetString("Menu.Upperleft.text")
  1573. , PdnResources.GetString("Menu.Uppermiddle.Text")
  1574. , PdnResources.GetString("Menu.Upperright.text")
  1575. , PdnResources.GetString("Menu.Lowerleft.text")
  1576. , PdnResources.GetString("Menu.Themiddleandlower.Text")
  1577. , PdnResources.GetString("Menu.Lowerright.text")};
  1578. List<string> position1 = new List<string> { PdnResources.GetString("Menu.hestartingpoint.Text")
  1579. , PdnResources.GetString("Menu.Theendpoint.Text")
  1580. };
  1581. this.comboBox2.DataSource = null;
  1582. if (curve)
  1583. this.comboBox2.DataSource = position1;
  1584. else
  1585. this.comboBox2.DataSource = position;
  1586. }
  1587. /// <summary>
  1588. /// 更新显示区域控件的数值
  1589. /// </summary>
  1590. /// <param name="font"></param>
  1591. /// <param name="fontSize"></param>
  1592. /// <param name="textColor"></param>
  1593. /// <param name="lineColor"></param>
  1594. /// <param name="lineWidth"></param>
  1595. /// <param name="lineStyle"></param>
  1596. 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)
  1597. {
  1598. #region [选中样式]
  1599. this.comboBox20.Text = chooseStyleModel == null ? "" : chooseStyleModel.font;
  1600. this.numericUpDown4.Value = chooseStyleModel == null ? 1 : chooseStyleModel.lineWidth;
  1601. this.numericUpDown5.Value = chooseStyleModel == null ? 1 : chooseStyleModel.fontSize;
  1602. this.panel9.BackColor = chooseStyleModel == null ? Color.Black : Color.FromArgb(chooseStyleModel.textColor);
  1603. this.numericUpDown3.Value = chooseStyleModel == null ? 0 : chooseStyleModel.vLineLength;
  1604. this.panel8.BackColor = chooseStyleModel == null ? Color.Black : Color.FromArgb(chooseStyleModel.lineColor);
  1605. this.comboBox18.SelectedIndex = chooseStyleModel == null ? 0 : chooseStyleModel.lineStyle;
  1606. #endregion
  1607. //绑定样式默认数据
  1608. this.comboBox11.Text = font;
  1609. this.numericUpDown21.Value = fontSize;
  1610. this.textPanel.BackColor = Color.FromArgb(textColor);
  1611. this.linePanel.BackColor = Color.FromArgb(lineColor);
  1612. this.numericUpDown11.Value = lineWidth;
  1613. this.comboBox21.SelectedIndex = lineStyle;
  1614. if (this.comboBox2.Items.Count > 0)
  1615. this.comboBox2.SelectedIndex = linePosition;
  1616. if (this.comboBox3.Items.Count > 0)
  1617. this.comboBox3.SelectedIndex = linePositionL;
  1618. if (this.comboBox4.Items.Count > 0)
  1619. this.comboBox4.SelectedIndex = linePositionP;
  1620. if(vLineLength > -1)
  1621. this.numericUpDown1.Value = vLineLength;
  1622. if (followLine)
  1623. {
  1624. this.comboBox5.SelectedIndex = 0;
  1625. }
  1626. else
  1627. {
  1628. this.comboBox5.SelectedIndex = 1;
  1629. }
  1630. this.comboBox91.SelectedIndex = isAngle ? 1 : 0;
  1631. }
  1632. /// <summary>
  1633. /// 检查保存类型
  1634. /// </summary>
  1635. private void checkSaveModel()
  1636. {
  1637. chooseStyleModel chooseStyle = new chooseStyleModel();
  1638. chooseStyle.font = this.comboBox20.Text;
  1639. chooseStyle.fontSize = (int)this.numericUpDown5.Value;
  1640. chooseStyle.textColor = this.panel9.BackColor.ToArgb();
  1641. chooseStyle.vLineLength = (int)this.numericUpDown3.Value;
  1642. chooseStyle.lineColor = this.panel8.BackColor.ToArgb();
  1643. chooseStyle.lineStyle = this.comboBox18.SelectedIndex;
  1644. chooseStyle.lineWidth = (int)this.numericUpDown4.Value;
  1645. string font = comboBox11.Text;
  1646. int fontSize = Convert.ToInt32(numericUpDown21.Value);
  1647. int textColor = Convert.ToInt32(this.textPanel.BackColor.ToArgb());
  1648. int lineColor = Convert.ToInt32(this.linePanel.BackColor.ToArgb());
  1649. int lineWidth = Convert.ToInt32(numericUpDown11.Value);
  1650. int lineStyle = this.comboBox21.SelectedIndex;
  1651. int linePosition = this.comboBox2.SelectedIndex;
  1652. int linePositionL = this.comboBox3.SelectedIndex;
  1653. int linePositionP = this.comboBox4.SelectedIndex;
  1654. int vLineLength = Convert.ToInt32(this.numericUpDown1.Value);
  1655. bool isAngle = comboBox91.SelectedIndex == 0 ? false : true;
  1656. string aliasName = textBox1.Text;
  1657. string suffixName = textBox2.Text;
  1658. bool showAlias = this.comboBox6.SelectedIndex == 0 ? true : false;
  1659. bool showSuffix = this.comboBox7.SelectedIndex == 0 ? true : false;
  1660. bool showSerial = this.comboBox8.SelectedIndex == 0 ? true : false;
  1661. switch (this.drawObject.drawToolType)
  1662. {
  1663. case DrawToolType.MeasureLine: //长度测量直线
  1664. this.measureStyleModel.measureLine.font = font;
  1665. this.measureStyleModel.measureLine.fontSize = fontSize;
  1666. this.measureStyleModel.measureLine.textColor = textColor;
  1667. this.measureStyleModel.measureLine.lineColor = lineColor;
  1668. this.measureStyleModel.measureLine.lineWidth = lineWidth;
  1669. this.measureStyleModel.measureLine.lineStyle = lineStyle;
  1670. this.measureStyleModel.measureLine.linePosition = linePosition;
  1671. this.measureStyleModel.measureLine.vLineLength = vLineLength;
  1672. this.measureStyleModel.measureLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false;
  1673. this.measureStyleModel.measureLine.aliasName = aliasName;
  1674. this.measureStyleModel.measureLine.suffixName = suffixName;
  1675. this.measureStyleModel.measureLine.showAlias = showAlias;
  1676. this.measureStyleModel.measureLine.showSuffix = showSuffix;
  1677. this.measureStyleModel.measureLine.showSerial = showSerial;
  1678. this.measureStyleModel.measureLine.chooseStyle = chooseStyle;
  1679. break;
  1680. case DrawToolType.MeasureDistanceLine: //长度测量距离
  1681. this.measureStyleModel.measureDistanceLine.font = font;
  1682. this.measureStyleModel.measureDistanceLine.fontSize = fontSize;
  1683. this.measureStyleModel.measureDistanceLine.textColor = textColor;
  1684. this.measureStyleModel.measureDistanceLine.lineColor = lineColor;
  1685. this.measureStyleModel.measureDistanceLine.lineWidth = lineWidth;
  1686. this.measureStyleModel.measureDistanceLine.lineStyle = lineStyle;
  1687. this.measureStyleModel.measureDistanceLine.linePosition = linePosition;
  1688. this.measureStyleModel.measureDistanceLine.aliasName = aliasName;
  1689. this.measureStyleModel.measureDistanceLine.suffixName = suffixName;
  1690. this.measureStyleModel.measureDistanceLine.showAlias = showAlias;
  1691. this.measureStyleModel.measureDistanceLine.showSuffix = showSuffix;
  1692. this.measureStyleModel.measureDistanceLine.showSerial = showSerial;
  1693. this.measureStyleModel.measureDistanceLine.chooseStyle = chooseStyle;
  1694. break;
  1695. case DrawToolType.MeasureLength: //长度测量->长度
  1696. this.measureStyleModel.measureLength.font = font;
  1697. this.measureStyleModel.measureLength.fontSize = fontSize;
  1698. this.measureStyleModel.measureLength.textColor = textColor;
  1699. this.measureStyleModel.measureLength.lineColor = lineColor;
  1700. this.measureStyleModel.measureLength.lineWidth = lineWidth;
  1701. this.measureStyleModel.measureLength.lineStyle = lineStyle;
  1702. this.measureStyleModel.measureLength.linePosition = linePosition;
  1703. this.measureStyleModel.measureLength.aliasName = aliasName;
  1704. this.measureStyleModel.measureLength.suffixName = suffixName;
  1705. this.measureStyleModel.measureLength.showAlias = showAlias;
  1706. this.measureStyleModel.measureLength.showSuffix = showSuffix;
  1707. this.measureStyleModel.measureLength.showSerial = showSerial;
  1708. this.measureStyleModel.measureLength.chooseStyle = chooseStyle;
  1709. break;
  1710. case DrawToolType.MeasureHLine: //长度测量->水平线
  1711. this.measureStyleModel.measureHLine.font = font;
  1712. this.measureStyleModel.measureHLine.fontSize = fontSize;
  1713. this.measureStyleModel.measureHLine.textColor = textColor;
  1714. this.measureStyleModel.measureHLine.lineColor = lineColor;
  1715. this.measureStyleModel.measureHLine.lineWidth = lineWidth;
  1716. this.measureStyleModel.measureHLine.lineStyle = lineStyle;
  1717. this.measureStyleModel.measureHLine.linePosition = linePosition;
  1718. this.measureStyleModel.measureHLine.vLineLength = vLineLength;
  1719. this.measureStyleModel.measureHLine.aliasName = aliasName;
  1720. this.measureStyleModel.measureHLine.suffixName = suffixName;
  1721. this.measureStyleModel.measureHLine.showAlias = showAlias;
  1722. this.measureStyleModel.measureHLine.showSuffix = showSuffix;
  1723. this.measureStyleModel.measureHLine.showSerial = showSerial;
  1724. this.measureStyleModel.measureHLine.chooseStyle = chooseStyle;
  1725. break;
  1726. case DrawToolType.MeasureVLine: //长度测量->垂线
  1727. this.measureStyleModel.measureVLine.font = font;
  1728. this.measureStyleModel.measureVLine.fontSize = fontSize;
  1729. this.measureStyleModel.measureVLine.textColor = textColor;
  1730. this.measureStyleModel.measureVLine.lineColor = lineColor;
  1731. this.measureStyleModel.measureVLine.lineWidth = lineWidth;
  1732. this.measureStyleModel.measureVLine.lineStyle = lineStyle;
  1733. this.measureStyleModel.measureVLine.linePosition = linePosition;
  1734. this.measureStyleModel.measureVLine.vLineLength = vLineLength;
  1735. this.measureStyleModel.measureVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false;
  1736. this.measureStyleModel.measureVLine.aliasName = aliasName;
  1737. this.measureStyleModel.measureVLine.suffixName = suffixName;
  1738. this.measureStyleModel.measureVLine.showAlias = showAlias;
  1739. this.measureStyleModel.measureVLine.showSuffix = showSuffix;
  1740. this.measureStyleModel.measureVLine.showSerial = showSerial;
  1741. this.measureStyleModel.measureVLine.chooseStyle = chooseStyle;
  1742. break;
  1743. case DrawToolType.MeasureMulLine: //多点线段->多点直线
  1744. this.measureStyleModel.measureMulLine.font = font;
  1745. this.measureStyleModel.measureMulLine.fontSize = fontSize;
  1746. this.measureStyleModel.measureMulLine.textColor = textColor;
  1747. this.measureStyleModel.measureMulLine.lineColor = lineColor;
  1748. this.measureStyleModel.measureMulLine.lineWidth = lineWidth;
  1749. this.measureStyleModel.measureMulLine.lineStyle = lineStyle;
  1750. this.measureStyleModel.measureMulLine.linePositionL = linePositionL;
  1751. this.measureStyleModel.measureMulLine.linePositionP = linePositionP;
  1752. this.measureStyleModel.measureMulLine.vLineLength = vLineLength;
  1753. this.measureStyleModel.measureMulLine.aliasName = aliasName;
  1754. this.measureStyleModel.measureMulLine.suffixName = suffixName;
  1755. this.measureStyleModel.measureMulLine.showAlias = showAlias;
  1756. this.measureStyleModel.measureMulLine.showSuffix = showSuffix;
  1757. this.measureStyleModel.measureMulLine.showSerial = showSerial;
  1758. this.measureStyleModel.measureMulLine.chooseStyle = chooseStyle;
  1759. break;
  1760. case DrawToolType.MeasureMulHVLine: //多点线段->多点水平线
  1761. this.measureStyleModel.measureMulHVLine.font = font;
  1762. this.measureStyleModel.measureMulHVLine.fontSize = fontSize;
  1763. this.measureStyleModel.measureMulHVLine.textColor = textColor;
  1764. this.measureStyleModel.measureMulHVLine.lineColor = lineColor;
  1765. this.measureStyleModel.measureMulHVLine.lineWidth = lineWidth;
  1766. this.measureStyleModel.measureMulHVLine.lineStyle = lineStyle;
  1767. this.measureStyleModel.measureMulHVLine.linePositionL = linePositionL;
  1768. this.measureStyleModel.measureMulHVLine.linePositionP = linePositionP;
  1769. this.measureStyleModel.measureMulHVLine.vLineLength = vLineLength;
  1770. this.measureStyleModel.measureMulHVLine.aliasName = aliasName;
  1771. this.measureStyleModel.measureMulHVLine.suffixName = suffixName;
  1772. this.measureStyleModel.measureMulHVLine.showAlias = showAlias;
  1773. this.measureStyleModel.measureMulHVLine.showSuffix = showSuffix;
  1774. this.measureStyleModel.measureMulHVLine.showSerial = showSerial;
  1775. this.measureStyleModel.measureMulHVLine.chooseStyle = chooseStyle;
  1776. break;
  1777. case DrawToolType.MeasureMulSegment: //多点线段->多点线段
  1778. this.measureStyleModel.measureMulSegment.font = font;
  1779. this.measureStyleModel.measureMulSegment.fontSize = fontSize;
  1780. this.measureStyleModel.measureMulSegment.textColor = textColor;
  1781. this.measureStyleModel.measureMulSegment.lineColor = lineColor;
  1782. this.measureStyleModel.measureMulSegment.lineWidth = lineWidth;
  1783. this.measureStyleModel.measureMulSegment.lineStyle = lineStyle;
  1784. this.measureStyleModel.measureMulSegment.linePositionL = linePositionL;
  1785. this.measureStyleModel.measureMulSegment.linePositionP = linePositionP;
  1786. this.measureStyleModel.measureMulSegment.vLineLength = vLineLength;
  1787. this.measureStyleModel.measureMulSegment.aliasName = aliasName;
  1788. this.measureStyleModel.measureMulSegment.suffixName = suffixName;
  1789. this.measureStyleModel.measureMulSegment.showAlias = showAlias;
  1790. this.measureStyleModel.measureMulSegment.showSuffix = showSuffix;
  1791. this.measureStyleModel.measureMulSegment.showSerial = showSerial;
  1792. this.measureStyleModel.measureMulSegment.chooseStyle = chooseStyle;
  1793. break;
  1794. case DrawToolType.MeasureMulVLine: //多点线段->多点垂直线
  1795. this.measureStyleModel.measureMulVLine.font = font;
  1796. this.measureStyleModel.measureMulVLine.fontSize = fontSize;
  1797. this.measureStyleModel.measureMulVLine.textColor = textColor;
  1798. this.measureStyleModel.measureMulVLine.lineColor = lineColor;
  1799. this.measureStyleModel.measureMulVLine.lineWidth = lineWidth;
  1800. this.measureStyleModel.measureMulVLine.lineStyle = lineStyle;
  1801. this.measureStyleModel.measureMulVLine.linePositionL = linePositionL;
  1802. this.measureStyleModel.measureMulVLine.linePositionP = linePositionP;
  1803. this.measureStyleModel.measureMulVLine.vLineLength = vLineLength;
  1804. this.measureStyleModel.measureMulVLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false;
  1805. this.measureStyleModel.measureMulVLine.aliasName = aliasName;
  1806. this.measureStyleModel.measureMulVLine.suffixName = suffixName;
  1807. this.measureStyleModel.measureMulVLine.showAlias = showAlias;
  1808. this.measureStyleModel.measureMulVLine.showSuffix = showSuffix;
  1809. this.measureStyleModel.measureMulVLine.showSerial = showSerial;
  1810. this.measureStyleModel.measureMulVLine.chooseStyle = chooseStyle;
  1811. break;
  1812. case DrawToolType.MeasureBrokenLine: //曲线长度->折线
  1813. this.measureStyleModel.measureBrokenLine.font = font;
  1814. this.measureStyleModel.measureBrokenLine.fontSize = fontSize;
  1815. this.measureStyleModel.measureBrokenLine.textColor = textColor;
  1816. this.measureStyleModel.measureBrokenLine.lineColor = lineColor;
  1817. this.measureStyleModel.measureBrokenLine.lineWidth = lineWidth;
  1818. this.measureStyleModel.measureBrokenLine.lineStyle = lineStyle;
  1819. this.measureStyleModel.measureBrokenLine.linePosition = linePosition;
  1820. this.measureStyleModel.measureBrokenLine.aliasName = aliasName;
  1821. this.measureStyleModel.measureBrokenLine.suffixName = suffixName;
  1822. this.measureStyleModel.measureBrokenLine.showAlias = showAlias;
  1823. this.measureStyleModel.measureBrokenLine.showSuffix = showSuffix;
  1824. this.measureStyleModel.measureBrokenLine.showSerial = showSerial;
  1825. this.measureStyleModel.measureBrokenLine.chooseStyle = chooseStyle;
  1826. break;
  1827. case DrawToolType.MeasureTraceCurve: //曲线长度->轨迹曲线
  1828. this.measureStyleModel.measureTraceCurve.font = font;
  1829. this.measureStyleModel.measureTraceCurve.fontSize = fontSize;
  1830. this.measureStyleModel.measureTraceCurve.textColor = textColor;
  1831. this.measureStyleModel.measureTraceCurve.lineColor = lineColor;
  1832. this.measureStyleModel.measureTraceCurve.lineWidth = lineWidth;
  1833. this.measureStyleModel.measureTraceCurve.lineStyle = lineStyle;
  1834. this.measureStyleModel.measureTraceCurve.linePosition = linePosition;
  1835. this.measureStyleModel.measureTraceCurve.aliasName = aliasName;
  1836. this.measureStyleModel.measureTraceCurve.suffixName = suffixName;
  1837. this.measureStyleModel.measureTraceCurve.showAlias = showAlias;
  1838. this.measureStyleModel.measureTraceCurve.showSuffix = showSuffix;
  1839. this.measureStyleModel.measureTraceCurve.showSerial = showSerial;
  1840. this.measureStyleModel.measureTraceCurve.chooseStyle = chooseStyle;
  1841. break;
  1842. case DrawToolType.MeasureCurveLine: //曲线长度->曲线
  1843. this.measureStyleModel.measureCurveLine.font = font;
  1844. this.measureStyleModel.measureCurveLine.fontSize = fontSize;
  1845. this.measureStyleModel.measureCurveLine.textColor = textColor;
  1846. this.measureStyleModel.measureCurveLine.lineColor = lineColor;
  1847. this.measureStyleModel.measureCurveLine.lineWidth = lineWidth;
  1848. this.measureStyleModel.measureCurveLine.lineStyle = lineStyle;
  1849. this.measureStyleModel.measureCurveLine.linePosition = linePosition;
  1850. this.measureStyleModel.measureCurveLine.aliasName = aliasName;
  1851. this.measureStyleModel.measureCurveLine.suffixName = suffixName;
  1852. this.measureStyleModel.measureCurveLine.showAlias = showAlias;
  1853. this.measureStyleModel.measureCurveLine.showSuffix = showSuffix;
  1854. this.measureStyleModel.measureCurveLine.showSerial = showSerial;
  1855. this.measureStyleModel.measureCurveLine.chooseStyle = chooseStyle;
  1856. break;
  1857. case DrawToolType.MeasurePLine: //点垂线->点垂线
  1858. this.measureStyleModel.measurePLine.font = font;
  1859. this.measureStyleModel.measurePLine.fontSize = fontSize;
  1860. this.measureStyleModel.measurePLine.textColor = textColor;
  1861. this.measureStyleModel.measurePLine.lineColor = lineColor;
  1862. this.measureStyleModel.measurePLine.lineWidth = lineWidth;
  1863. this.measureStyleModel.measurePLine.lineStyle = lineStyle;
  1864. this.measureStyleModel.measurePLine.linePositionL = linePositionL;
  1865. this.measureStyleModel.measurePLine.linePositionP = linePositionP;
  1866. this.measureStyleModel.measurePLine.aliasName = aliasName;
  1867. this.measureStyleModel.measurePLine.suffixName = suffixName;
  1868. this.measureStyleModel.measurePLine.showAlias = showAlias;
  1869. this.measureStyleModel.measurePLine.showSuffix = showSuffix;
  1870. this.measureStyleModel.measurePLine.showSerial = showSerial;
  1871. this.measureStyleModel.measurePLine.chooseStyle = chooseStyle;
  1872. break;
  1873. case DrawToolType.MeasureMulPLine: //点垂线->多点垂线
  1874. this.measureStyleModel.measureMulPLine.font = font;
  1875. this.measureStyleModel.measureMulPLine.fontSize = fontSize;
  1876. this.measureStyleModel.measureMulPLine.textColor = textColor;
  1877. this.measureStyleModel.measureMulPLine.lineColor = lineColor;
  1878. this.measureStyleModel.measureMulPLine.lineWidth = lineWidth;
  1879. this.measureStyleModel.measureMulPLine.lineStyle = lineStyle;
  1880. this.measureStyleModel.measureMulPLine.linePositionL = linePositionL;
  1881. this.measureStyleModel.measureMulPLine.linePositionP = linePositionP;
  1882. this.measureStyleModel.measureMulPLine.aliasName = aliasName;
  1883. this.measureStyleModel.measureMulPLine.suffixName = suffixName;
  1884. this.measureStyleModel.measureMulPLine.showAlias = showAlias;
  1885. this.measureStyleModel.measureMulPLine.showSuffix = showSuffix;
  1886. this.measureStyleModel.measureMulPLine.showSerial = showSerial;
  1887. this.measureStyleModel.measureMulPLine.chooseStyle = chooseStyle;
  1888. break;
  1889. case DrawToolType.MeasureHMulPLine: //点垂线->水平多点垂线
  1890. this.measureStyleModel.measureHMulPLine.font = font;
  1891. this.measureStyleModel.measureHMulPLine.fontSize = fontSize;
  1892. this.measureStyleModel.measureHMulPLine.textColor = textColor;
  1893. this.measureStyleModel.measureHMulPLine.lineColor = lineColor;
  1894. this.measureStyleModel.measureHMulPLine.lineWidth = lineWidth;
  1895. this.measureStyleModel.measureHMulPLine.lineStyle = lineStyle;
  1896. this.measureStyleModel.measureHMulPLine.linePositionL = linePositionL;
  1897. this.measureStyleModel.measureHMulPLine.linePositionP = linePositionP;
  1898. this.measureStyleModel.measureHMulPLine.aliasName = aliasName;
  1899. this.measureStyleModel.measureHMulPLine.suffixName = suffixName;
  1900. this.measureStyleModel.measureHMulPLine.showAlias = showAlias;
  1901. this.measureStyleModel.measureHMulPLine.showSuffix = showSuffix;
  1902. this.measureStyleModel.measureHMulPLine.showSerial = showSerial;
  1903. this.measureStyleModel.measureHMulPLine.chooseStyle = chooseStyle;
  1904. break;
  1905. case DrawToolType.MeasureVMulPLine: //点垂线->垂直多点垂线
  1906. this.measureStyleModel.measureVMulPLine.font = font;
  1907. this.measureStyleModel.measureVMulPLine.fontSize = fontSize;
  1908. this.measureStyleModel.measureVMulPLine.textColor = textColor;
  1909. this.measureStyleModel.measureVMulPLine.lineColor = lineColor;
  1910. this.measureStyleModel.measureVMulPLine.lineWidth = lineWidth;
  1911. this.measureStyleModel.measureVMulPLine.lineStyle = lineStyle;
  1912. this.measureStyleModel.measureVMulPLine.linePositionL = linePositionL;
  1913. this.measureStyleModel.measureVMulPLine.linePositionP = linePositionP;
  1914. this.measureStyleModel.measureVMulPLine.aliasName = aliasName;
  1915. this.measureStyleModel.measureVMulPLine.suffixName = suffixName;
  1916. this.measureStyleModel.measureVMulPLine.showAlias = showAlias;
  1917. this.measureStyleModel.measureVMulPLine.showSuffix = showSuffix;
  1918. this.measureStyleModel.measureVMulPLine.showSerial = showSerial;
  1919. this.measureStyleModel.measureVMulPLine.chooseStyle = chooseStyle;
  1920. break;
  1921. case DrawToolType.MeasurePointHLine: //点垂线->点到水平线距离
  1922. this.measureStyleModel.measurePointHLine.font = font;
  1923. this.measureStyleModel.measurePointHLine.fontSize = fontSize;
  1924. this.measureStyleModel.measurePointHLine.textColor = textColor;
  1925. this.measureStyleModel.measurePointHLine.lineColor = lineColor;
  1926. this.measureStyleModel.measurePointHLine.lineWidth = lineWidth;
  1927. this.measureStyleModel.measurePointHLine.lineStyle = lineStyle;
  1928. this.measureStyleModel.measurePointHLine.linePositionL = linePositionL;
  1929. this.measureStyleModel.measurePointHLine.linePositionP = linePositionP;
  1930. this.measureStyleModel.measurePointHLine.aliasName = aliasName;
  1931. this.measureStyleModel.measurePointHLine.suffixName = suffixName;
  1932. this.measureStyleModel.measurePointHLine.showAlias = showAlias;
  1933. this.measureStyleModel.measurePointHLine.showSuffix = showSuffix;
  1934. this.measureStyleModel.measurePointHLine.showSerial = showSerial;
  1935. this.measureStyleModel.measurePointHLine.chooseStyle = chooseStyle;
  1936. break;
  1937. case DrawToolType.MeasureParallelLine: //平行线测量->平行线
  1938. this.measureStyleModel.measureParallelLine.font = font;
  1939. this.measureStyleModel.measureParallelLine.fontSize = fontSize;
  1940. this.measureStyleModel.measureParallelLine.textColor = textColor;
  1941. this.measureStyleModel.measureParallelLine.lineColor = lineColor;
  1942. this.measureStyleModel.measureParallelLine.lineWidth = lineWidth;
  1943. this.measureStyleModel.measureParallelLine.lineStyle = lineStyle;
  1944. this.measureStyleModel.measureParallelLine.linePositionL = linePositionL;
  1945. this.measureStyleModel.measureParallelLine.linePositionP = linePositionP;
  1946. this.measureStyleModel.measureParallelLine.followLine = this.comboBox5.SelectedIndex == 0 ? true : false;
  1947. this.measureStyleModel.measureParallelLine.aliasName = aliasName;
  1948. this.measureStyleModel.measureParallelLine.suffixName = suffixName;
  1949. this.measureStyleModel.measureParallelLine.showAlias = showAlias;
  1950. this.measureStyleModel.measureParallelLine.showSuffix = showSuffix;
  1951. this.measureStyleModel.measureParallelLine.showSerial = showSerial;
  1952. this.measureStyleModel.measureParallelLine.chooseStyle = chooseStyle;
  1953. break;
  1954. case DrawToolType.MeasureMulParallelLine: //平行线测量->多点平行线
  1955. this.measureStyleModel.measureMulParallelLine.font = font;
  1956. this.measureStyleModel.measureMulParallelLine.fontSize = fontSize;
  1957. this.measureStyleModel.measureMulParallelLine.textColor = textColor;
  1958. this.measureStyleModel.measureMulParallelLine.lineColor = lineColor;
  1959. this.measureStyleModel.measureMulParallelLine.lineWidth = lineWidth;
  1960. this.measureStyleModel.measureMulParallelLine.lineStyle = lineStyle;
  1961. this.measureStyleModel.measureMulParallelLine.linePositionL = linePositionL;
  1962. this.measureStyleModel.measureMulParallelLine.linePositionP = linePositionP;
  1963. this.measureStyleModel.measureMulParallelLine.aliasName = aliasName;
  1964. this.measureStyleModel.measureMulParallelLine.suffixName = suffixName;
  1965. this.measureStyleModel.measureMulParallelLine.showAlias = showAlias;
  1966. this.measureStyleModel.measureMulParallelLine.showSuffix = showSuffix;
  1967. this.measureStyleModel.measureMulParallelLine.showSerial = showSerial;
  1968. this.measureStyleModel.measureMulParallelLine.chooseStyle = chooseStyle;
  1969. break;
  1970. case DrawToolType.MeasureVMulParallelLine: //平行线测量->垂直多点平行线
  1971. this.measureStyleModel.measureVMulParallelLine.font = font;
  1972. this.measureStyleModel.measureVMulParallelLine.fontSize = fontSize;
  1973. this.measureStyleModel.measureVMulParallelLine.textColor = textColor;
  1974. this.measureStyleModel.measureVMulParallelLine.lineColor = lineColor;
  1975. this.measureStyleModel.measureVMulParallelLine.lineWidth = lineWidth;
  1976. this.measureStyleModel.measureVMulParallelLine.lineStyle = lineStyle;
  1977. this.measureStyleModel.measureVMulParallelLine.linePositionL = linePositionL;
  1978. this.measureStyleModel.measureVMulParallelLine.linePositionP = linePositionP;
  1979. this.measureStyleModel.measureVMulParallelLine.aliasName = aliasName;
  1980. this.measureStyleModel.measureVMulParallelLine.suffixName = suffixName;
  1981. this.measureStyleModel.measureVMulParallelLine.showAlias = showAlias;
  1982. this.measureStyleModel.measureVMulParallelLine.showSuffix = showSuffix;
  1983. this.measureStyleModel.measureVMulParallelLine.showSerial = showSerial;
  1984. this.measureStyleModel.measureVMulParallelLine.chooseStyle = chooseStyle;
  1985. break;
  1986. case DrawToolType.MeasureHMulParallelLine: //平行线测量->水平多点平行线
  1987. this.measureStyleModel.measureHMulParallelLine.font = font;
  1988. this.measureStyleModel.measureHMulParallelLine.fontSize = fontSize;
  1989. this.measureStyleModel.measureHMulParallelLine.textColor = textColor;
  1990. this.measureStyleModel.measureHMulParallelLine.lineColor = lineColor;
  1991. this.measureStyleModel.measureHMulParallelLine.lineWidth = lineWidth;
  1992. this.measureStyleModel.measureHMulParallelLine.lineStyle = lineStyle;
  1993. this.measureStyleModel.measureHMulParallelLine.linePositionL = linePositionL;
  1994. this.measureStyleModel.measureHMulParallelLine.linePositionP = linePositionP;
  1995. this.measureStyleModel.measureHMulParallelLine.aliasName = aliasName;
  1996. this.measureStyleModel.measureHMulParallelLine.suffixName = suffixName;
  1997. this.measureStyleModel.measureHMulParallelLine.showAlias = showAlias;
  1998. this.measureStyleModel.measureHMulParallelLine.showSuffix = showSuffix;
  1999. this.measureStyleModel.measureHMulParallelLine.showSerial = showSerial;
  2000. this.measureStyleModel.measureHMulParallelLine.chooseStyle = chooseStyle;
  2001. break;
  2002. case DrawToolType.MeasureClosedCurve: //多边形测量->闭合曲线
  2003. this.measureStyleModel.measureClosedCurve.font = font;
  2004. this.measureStyleModel.measureClosedCurve.fontSize = fontSize;
  2005. this.measureStyleModel.measureClosedCurve.textColor = textColor;
  2006. this.measureStyleModel.measureClosedCurve.lineColor = lineColor;
  2007. this.measureStyleModel.measureClosedCurve.lineWidth = lineWidth;
  2008. this.measureStyleModel.measureClosedCurve.lineStyle = lineStyle;
  2009. this.measureStyleModel.measureClosedCurve.aliasName = aliasName;
  2010. this.measureStyleModel.measureClosedCurve.suffixName = suffixName;
  2011. this.measureStyleModel.measureClosedCurve.showAlias = showAlias;
  2012. this.measureStyleModel.measureClosedCurve.showSuffix = showSuffix;
  2013. this.measureStyleModel.measureClosedCurve.showSerial = showSerial;
  2014. this.measureStyleModel.measureClosedCurve.chooseStyle = chooseStyle;
  2015. break;
  2016. case DrawToolType.MeasurePolygon: //多边形测量->多边形
  2017. this.measureStyleModel.measurePolygon.font = font;
  2018. this.measureStyleModel.measurePolygon.fontSize = fontSize;
  2019. this.measureStyleModel.measurePolygon.textColor = textColor;
  2020. this.measureStyleModel.measurePolygon.lineColor = lineColor;
  2021. this.measureStyleModel.measurePolygon.lineWidth = lineWidth;
  2022. this.measureStyleModel.measurePolygon.lineStyle = lineStyle;
  2023. this.measureStyleModel.measurePolygon.aliasName = aliasName;
  2024. this.measureStyleModel.measurePolygon.suffixName = suffixName;
  2025. this.measureStyleModel.measurePolygon.showAlias = showAlias;
  2026. this.measureStyleModel.measurePolygon.showSuffix = showSuffix;
  2027. this.measureStyleModel.measurePolygon.showSerial = showSerial;
  2028. this.measureStyleModel.measurePolygon.chooseStyle = chooseStyle;
  2029. break;
  2030. case DrawToolType.MeasureRectangle: //多边形测量->矩形
  2031. this.measureStyleModel.measureRectangle.font = font;
  2032. this.measureStyleModel.measureRectangle.fontSize = fontSize;
  2033. this.measureStyleModel.measureRectangle.textColor = textColor;
  2034. this.measureStyleModel.measureRectangle.lineColor = lineColor;
  2035. this.measureStyleModel.measureRectangle.lineWidth = lineWidth;
  2036. this.measureStyleModel.measureRectangle.lineStyle = lineStyle;
  2037. this.measureStyleModel.measureRectangle.aliasName = aliasName;
  2038. this.measureStyleModel.measureRectangle.suffixName = suffixName;
  2039. this.measureStyleModel.measureRectangle.showAlias = showAlias;
  2040. this.measureStyleModel.measureRectangle.showSuffix = showSuffix;
  2041. this.measureStyleModel.measureRectangle.showSerial = showSerial;
  2042. this.measureStyleModel.measureRandRectangle.chooseStyle = chooseStyle;
  2043. break;
  2044. case DrawToolType.MeasureRandRectangle: //多边形测量->任意矩形
  2045. this.measureStyleModel.measureRandRectangle.font = font;
  2046. this.measureStyleModel.measureRandRectangle.fontSize = fontSize;
  2047. this.measureStyleModel.measureRandRectangle.textColor = textColor;
  2048. this.measureStyleModel.measureRandRectangle.lineColor = lineColor;
  2049. this.measureStyleModel.measureRandRectangle.lineWidth = lineWidth;
  2050. this.measureStyleModel.measureRandRectangle.lineStyle = lineStyle;
  2051. this.measureStyleModel.measureRandRectangle.aliasName = aliasName;
  2052. this.measureStyleModel.measureRandRectangle.suffixName = suffixName;
  2053. this.measureStyleModel.measureRandRectangle.showAlias = showAlias;
  2054. this.measureStyleModel.measureRandRectangle.showSuffix = showSuffix;
  2055. this.measureStyleModel.measureRandRectangle.showSerial = showSerial;
  2056. this.measureStyleModel.measureRandRectangle.chooseStyle = chooseStyle;
  2057. break;
  2058. case DrawToolType.MeasureSquare: //多边形测量->正方形
  2059. this.measureStyleModel.measureSquare.font = font;
  2060. this.measureStyleModel.measureSquare.fontSize = fontSize;
  2061. this.measureStyleModel.measureSquare.textColor = textColor;
  2062. this.measureStyleModel.measureSquare.lineColor = lineColor;
  2063. this.measureStyleModel.measureSquare.lineWidth = lineWidth;
  2064. this.measureStyleModel.measureSquare.lineStyle = lineStyle;
  2065. this.measureStyleModel.measureSquare.aliasName = aliasName;
  2066. this.measureStyleModel.measureSquare.suffixName = suffixName;
  2067. this.measureStyleModel.measureSquare.showAlias = showAlias;
  2068. this.measureStyleModel.measureSquare.showSuffix = showSuffix;
  2069. this.measureStyleModel.measureSquare.showSerial = showSerial;
  2070. this.measureStyleModel.measureSquare.chooseStyle = chooseStyle;
  2071. break;
  2072. case DrawToolType.MeasureRandSquare: //多边形测量->任意正方形
  2073. this.measureStyleModel.measureRandSquare.font = font;
  2074. this.measureStyleModel.measureRandSquare.fontSize = fontSize;
  2075. this.measureStyleModel.measureRandSquare.textColor = textColor;
  2076. this.measureStyleModel.measureRandSquare.lineColor = lineColor;
  2077. this.measureStyleModel.measureRandSquare.lineWidth = lineWidth;
  2078. this.measureStyleModel.measureRandSquare.lineStyle = lineStyle;
  2079. this.measureStyleModel.measureRandSquare.aliasName = aliasName;
  2080. this.measureStyleModel.measureRandSquare.suffixName = suffixName;
  2081. this.measureStyleModel.measureRandSquare.showAlias = showAlias;
  2082. this.measureStyleModel.measureRandSquare.showSuffix = showSuffix;
  2083. this.measureStyleModel.measureRandSquare.showSerial = showSerial;
  2084. this.measureStyleModel.measureRandSquare.chooseStyle = chooseStyle;
  2085. break;
  2086. case DrawToolType.MeasureTracePolygon: //多边形测量->轨迹多边形
  2087. this.measureStyleModel.measureTracePolygon.font = font;
  2088. this.measureStyleModel.measureTracePolygon.fontSize = fontSize;
  2089. this.measureStyleModel.measureTracePolygon.textColor = textColor;
  2090. this.measureStyleModel.measureTracePolygon.lineColor = lineColor;
  2091. this.measureStyleModel.measureTracePolygon.lineWidth = lineWidth;
  2092. this.measureStyleModel.measureTracePolygon.lineStyle = lineStyle;
  2093. this.measureStyleModel.measureTracePolygon.aliasName = aliasName;
  2094. this.measureStyleModel.measureTracePolygon.suffixName = suffixName;
  2095. this.measureStyleModel.measureTracePolygon.showAlias = showAlias;
  2096. this.measureStyleModel.measureTracePolygon.showSuffix = showSuffix;
  2097. this.measureStyleModel.measureTracePolygon.showSerial = showSerial;
  2098. this.measureStyleModel.measureTracePolygon.chooseStyle = chooseStyle;
  2099. break;
  2100. case DrawToolType.MeasureCircle: //圆形测量->三点圆
  2101. this.measureStyleModel.measureCircle.font = font;
  2102. this.measureStyleModel.measureCircle.fontSize = fontSize;
  2103. this.measureStyleModel.measureCircle.textColor = textColor;
  2104. this.measureStyleModel.measureCircle.lineColor = lineColor;
  2105. this.measureStyleModel.measureCircle.lineWidth = lineWidth;
  2106. this.measureStyleModel.measureCircle.lineStyle = lineStyle;
  2107. this.measureStyleModel.measureCircle.aliasName = aliasName;
  2108. this.measureStyleModel.measureCircle.suffixName = suffixName;
  2109. this.measureStyleModel.measureCircle.showAlias = showAlias;
  2110. this.measureStyleModel.measureCircle.showSuffix = showSuffix;
  2111. this.measureStyleModel.measureCircle.showSerial = showSerial;
  2112. this.measureStyleModel.measureCircle.chooseStyle = chooseStyle;
  2113. break;
  2114. case DrawToolType.MeasureInnerCircle: //圆形测量->向内画圆
  2115. this.measureStyleModel.measureInnerCircle.font = font;
  2116. this.measureStyleModel.measureInnerCircle.fontSize = fontSize;
  2117. this.measureStyleModel.measureInnerCircle.textColor = textColor;
  2118. this.measureStyleModel.measureInnerCircle.lineColor = lineColor;
  2119. this.measureStyleModel.measureInnerCircle.lineWidth = lineWidth;
  2120. this.measureStyleModel.measureInnerCircle.lineStyle = lineStyle;
  2121. this.measureStyleModel.measureInnerCircle.aliasName = aliasName;
  2122. this.measureStyleModel.measureInnerCircle.suffixName = suffixName;
  2123. this.measureStyleModel.measureInnerCircle.showAlias = showAlias;
  2124. this.measureStyleModel.measureInnerCircle.showSuffix = showSuffix;
  2125. this.measureStyleModel.measureInnerCircle.showSerial = showSerial;
  2126. this.measureStyleModel.measureInnerCircle.chooseStyle = chooseStyle;
  2127. break;
  2128. case DrawToolType.MeasureOuterCircle: //圆形测量->向外画圆
  2129. this.measureStyleModel.measureOuterCircle.font = font;
  2130. this.measureStyleModel.measureOuterCircle.fontSize = fontSize;
  2131. this.measureStyleModel.measureOuterCircle.textColor = textColor;
  2132. this.measureStyleModel.measureOuterCircle.lineColor = lineColor;
  2133. this.measureStyleModel.measureOuterCircle.lineWidth = lineWidth;
  2134. this.measureStyleModel.measureOuterCircle.lineStyle = lineStyle;
  2135. this.measureStyleModel.measureOuterCircle.aliasName = aliasName;
  2136. this.measureStyleModel.measureOuterCircle.suffixName = suffixName;
  2137. this.measureStyleModel.measureOuterCircle.showAlias = showAlias;
  2138. this.measureStyleModel.measureOuterCircle.showSuffix = showSuffix;
  2139. this.measureStyleModel.measureOuterCircle.showSerial = showSerial;
  2140. this.measureStyleModel.measureOuterCircle.chooseStyle = chooseStyle;
  2141. break;
  2142. case DrawToolType.MeasureDiameterCircle: //圆形测量->直径画圆
  2143. this.measureStyleModel.measureDiameterCircle.font = font;
  2144. this.measureStyleModel.measureDiameterCircle.fontSize = fontSize;
  2145. this.measureStyleModel.measureDiameterCircle.textColor = textColor;
  2146. this.measureStyleModel.measureDiameterCircle.lineColor = lineColor;
  2147. this.measureStyleModel.measureDiameterCircle.lineWidth = lineWidth;
  2148. this.measureStyleModel.measureDiameterCircle.lineStyle = lineStyle;
  2149. this.measureStyleModel.measureDiameterCircle.aliasName = aliasName;
  2150. this.measureStyleModel.measureDiameterCircle.suffixName = suffixName;
  2151. this.measureStyleModel.measureDiameterCircle.showAlias = showAlias;
  2152. this.measureStyleModel.measureDiameterCircle.showSuffix = showSuffix;
  2153. this.measureStyleModel.measureDiameterCircle.showSerial = showSerial;
  2154. this.measureStyleModel.measureDiameterCircle.chooseStyle = chooseStyle;
  2155. break;
  2156. case DrawToolType.MeasurePointEdgeSize: //圆形测量->点到圆距离
  2157. this.measureStyleModel.measurePointEdgeSize.font = font;
  2158. this.measureStyleModel.measurePointEdgeSize.fontSize = fontSize;
  2159. this.measureStyleModel.measurePointEdgeSize.textColor = textColor;
  2160. this.measureStyleModel.measurePointEdgeSize.lineColor = lineColor;
  2161. this.measureStyleModel.measurePointEdgeSize.lineWidth = lineWidth;
  2162. this.measureStyleModel.measurePointEdgeSize.lineStyle = lineStyle;
  2163. this.measureStyleModel.measurePointEdgeSize.aliasName = aliasName;
  2164. this.measureStyleModel.measurePointEdgeSize.suffixName = suffixName;
  2165. this.measureStyleModel.measurePointEdgeSize.showAlias = showAlias;
  2166. this.measureStyleModel.measurePointEdgeSize.showSuffix = showSuffix;
  2167. this.measureStyleModel.measurePointEdgeSize.showSerial = showSerial;
  2168. this.measureStyleModel.measurePointEdgeSize.chooseStyle = chooseStyle;
  2169. break;
  2170. case DrawToolType.MeasurePointCenterSize: //圆形测量->点到圆心距离
  2171. this.measureStyleModel.measurePointCenterSize.font = font;
  2172. this.measureStyleModel.measurePointCenterSize.fontSize = fontSize;
  2173. this.measureStyleModel.measurePointCenterSize.textColor = textColor;
  2174. this.measureStyleModel.measurePointCenterSize.lineColor = lineColor;
  2175. this.measureStyleModel.measurePointCenterSize.lineWidth = lineWidth;
  2176. this.measureStyleModel.measurePointCenterSize.lineStyle = lineStyle;
  2177. this.measureStyleModel.measurePointCenterSize.aliasName = aliasName;
  2178. this.measureStyleModel.measurePointCenterSize.suffixName = suffixName;
  2179. this.measureStyleModel.measurePointCenterSize.showAlias = showAlias;
  2180. this.measureStyleModel.measurePointCenterSize.showSuffix = showSuffix;
  2181. this.measureStyleModel.measurePointCenterSize.showSerial = showSerial;
  2182. this.measureStyleModel.measurePointCenterSize.chooseStyle = chooseStyle;
  2183. break;
  2184. case DrawToolType.MeasurePointArcSize: //圆形测量->点到圆弧距离
  2185. this.measureStyleModel.measurePointArcSize.font = font;
  2186. this.measureStyleModel.measurePointArcSize.fontSize = fontSize;
  2187. this.measureStyleModel.measurePointArcSize.textColor = textColor;
  2188. this.measureStyleModel.measurePointArcSize.lineColor = lineColor;
  2189. this.measureStyleModel.measurePointArcSize.lineWidth = lineWidth;
  2190. this.measureStyleModel.measurePointArcSize.lineStyle = lineStyle;
  2191. this.measureStyleModel.measurePointArcSize.aliasName = aliasName;
  2192. this.measureStyleModel.measurePointArcSize.suffixName = suffixName;
  2193. this.measureStyleModel.measurePointArcSize.showAlias = showAlias;
  2194. this.measureStyleModel.measurePointArcSize.showSuffix = showSuffix;
  2195. this.measureStyleModel.measurePointArcSize.showSerial = showSerial;
  2196. this.measureStyleModel.measurePointArcSize.chooseStyle = chooseStyle;
  2197. break;
  2198. case DrawToolType.MeasureThreePointAngle: //角度测量->三点角度
  2199. this.measureStyleModel.measureThreePointAngle.font = font;
  2200. this.measureStyleModel.measureThreePointAngle.fontSize = fontSize;
  2201. this.measureStyleModel.measureThreePointAngle.textColor = textColor;
  2202. this.measureStyleModel.measureThreePointAngle.lineColor = lineColor;
  2203. this.measureStyleModel.measureThreePointAngle.lineWidth = lineWidth;
  2204. this.measureStyleModel.measureThreePointAngle.lineStyle = lineStyle;
  2205. this.measureStyleModel.measureThreePointAngle.isAngle = isAngle;
  2206. this.measureStyleModel.measureThreePointAngle.aliasName = aliasName;
  2207. this.measureStyleModel.measureThreePointAngle.suffixName = suffixName;
  2208. this.measureStyleModel.measureThreePointAngle.showAlias = showAlias;
  2209. this.measureStyleModel.measureThreePointAngle.showSuffix = showSuffix;
  2210. this.measureStyleModel.measureThreePointAngle.showSerial = showSerial;
  2211. this.measureStyleModel.measureThreePointAngle.chooseStyle = chooseStyle;
  2212. break;
  2213. case DrawToolType.MeasureFourPointAngle: //角度测量->四点角度
  2214. this.measureStyleModel.measureFourPointAngle.font = font;
  2215. this.measureStyleModel.measureFourPointAngle.fontSize = fontSize;
  2216. this.measureStyleModel.measureFourPointAngle.textColor = textColor;
  2217. this.measureStyleModel.measureFourPointAngle.lineColor = lineColor;
  2218. this.measureStyleModel.measureFourPointAngle.lineWidth = lineWidth;
  2219. this.measureStyleModel.measureFourPointAngle.lineStyle = lineStyle;
  2220. this.measureStyleModel.measureFourPointAngle.isAngle = isAngle;
  2221. this.measureStyleModel.measureFourPointAngle.aliasName = aliasName;
  2222. this.measureStyleModel.measureFourPointAngle.suffixName = suffixName;
  2223. this.measureStyleModel.measureFourPointAngle.showAlias = showAlias;
  2224. this.measureStyleModel.measureFourPointAngle.showSuffix = showSuffix;
  2225. this.measureStyleModel.measureFourPointAngle.showSerial = showSerial;
  2226. this.measureStyleModel.measureFourPointAngle.chooseStyle = chooseStyle;
  2227. break;
  2228. case DrawToolType.MeasureThreePointArc: //角度测量->三点弧
  2229. this.measureStyleModel.measureThreePointArc.font = font;
  2230. this.measureStyleModel.measureThreePointArc.fontSize = fontSize;
  2231. this.measureStyleModel.measureThreePointArc.textColor = textColor;
  2232. this.measureStyleModel.measureThreePointArc.lineColor = lineColor;
  2233. this.measureStyleModel.measureThreePointArc.lineWidth = lineWidth;
  2234. this.measureStyleModel.measureThreePointArc.lineStyle = lineStyle;
  2235. this.measureStyleModel.measureThreePointArc.isAngle = isAngle;
  2236. this.measureStyleModel.measureThreePointArc.aliasName = aliasName;
  2237. this.measureStyleModel.measureThreePointArc.suffixName = suffixName;
  2238. this.measureStyleModel.measureThreePointArc.showAlias = showAlias;
  2239. this.measureStyleModel.measureThreePointArc.showSuffix = showSuffix;
  2240. this.measureStyleModel.measureThreePointArc.showSerial = showSerial;
  2241. this.measureStyleModel.measureThreePointArc.chooseStyle = chooseStyle;
  2242. break;
  2243. case DrawToolType.MeasureCenterCenterSize: //对准度测量->圆心到圆心距离
  2244. this.measureStyleModel.measureCenterCenterSize.font = font;
  2245. this.measureStyleModel.measureCenterCenterSize.fontSize = fontSize;
  2246. this.measureStyleModel.measureCenterCenterSize.textColor = textColor;
  2247. this.measureStyleModel.measureCenterCenterSize.lineColor = lineColor;
  2248. this.measureStyleModel.measureCenterCenterSize.lineWidth = lineWidth;
  2249. this.measureStyleModel.measureCenterCenterSize.lineStyle = lineStyle;
  2250. this.measureStyleModel.measureCenterCenterSize.linePosition = linePosition;
  2251. this.measureStyleModel.measureCenterCenterSize.aliasName = aliasName;
  2252. this.measureStyleModel.measureCenterCenterSize.suffixName = suffixName;
  2253. this.measureStyleModel.measureCenterCenterSize.showAlias = showAlias;
  2254. this.measureStyleModel.measureCenterCenterSize.showSuffix = showSuffix;
  2255. this.measureStyleModel.measureCenterCenterSize.showSerial = showSerial;
  2256. this.measureStyleModel.measureCenterCenterSize.chooseStyle = chooseStyle;
  2257. break;
  2258. case DrawToolType.MeasureTwoLineVLDistance: //对准度测量->两线中垂线距离
  2259. this.measureStyleModel.measureTwoLineVLDistance.font = font;
  2260. this.measureStyleModel.measureTwoLineVLDistance.fontSize = fontSize;
  2261. this.measureStyleModel.measureTwoLineVLDistance.textColor = textColor;
  2262. this.measureStyleModel.measureTwoLineVLDistance.lineColor = lineColor;
  2263. this.measureStyleModel.measureTwoLineVLDistance.lineWidth = lineWidth;
  2264. this.measureStyleModel.measureTwoLineVLDistance.lineStyle = lineStyle;
  2265. this.measureStyleModel.measureTwoLineVLDistance.linePosition = linePosition;
  2266. this.measureStyleModel.measureTwoLineVLDistance.aliasName = aliasName;
  2267. this.measureStyleModel.measureTwoLineVLDistance.suffixName = suffixName;
  2268. this.measureStyleModel.measureTwoLineVLDistance.showAlias = showAlias;
  2269. this.measureStyleModel.measureTwoLineVLDistance.showSuffix = showSuffix;
  2270. this.measureStyleModel.measureTwoLineVLDistance.showSerial = showSerial;
  2271. this.measureStyleModel.measureTwoLineVLDistance.chooseStyle = chooseStyle;
  2272. break;
  2273. }
  2274. }
  2275. /// <summary>
  2276. /// 应用
  2277. /// </summary>
  2278. /// <param name="sender"></param>
  2279. /// <param name="e"></param>
  2280. private void button1_Click(object sender, EventArgs e)
  2281. {
  2282. checkSaveModel();
  2283. //button2_Click();
  2284. //修改缓存中的样式数据
  2285. //Startup.instance.measureStyleModel = this.measureStyleModel;
  2286. //修改主配置文件中的值
  2287. //configModel.MeasurementStyle = "Default.xml";
  2288. //修改主配置文件的xml
  2289. //string configModelXml = XmlSerializeHelper.XmlSerialize<ConfigModel>(this.configModel);
  2290. //string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\Config.xml";
  2291. //FileOperationHelper.WriteStringToFile(configModelXml, filePath, FileMode.Create);
  2292. //MessageBox.Show(PdnResources.GetString("Menu.Applicationsuccessfully.Text"));
  2293. //((MeasureDrawObject)(this.drawObject)).mouseUpAttribute = true;
  2294. this.appWorkspace?.RefreshListView();
  2295. this.Close();
  2296. }
  2297. /// <summary>
  2298. /// 关闭
  2299. /// </summary>
  2300. /// <param name="sender"></param>
  2301. /// <param name="e"></param>
  2302. private void button3_Click(object sender, EventArgs e)
  2303. {
  2304. this.Close();
  2305. }
  2306. }
  2307. }