SurveyPointStyleSettingDialog.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. using PaintDotNet.Base.SettingModel;
  2. using PaintDotNet.Base.CommTool;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14. namespace PaintDotNet.DedicatedAnalysis
  15. {
  16. public partial class SurveyPointStyleSettingDialog : Form
  17. {
  18. #region 控件
  19. private Button button2;
  20. private Button button1;
  21. private GroupBox groupBox2;
  22. private Label label6;
  23. private Label label5;
  24. private Label label3;
  25. private Label label2;
  26. private Label label1;
  27. private Label label4;
  28. private RadioButton radioButton2;
  29. private RadioButton radioButton1;
  30. private CheckBox checkBox1;
  31. private GroupBox groupBox3;
  32. private Panel panel1;
  33. private Panel panel2;
  34. private GroupBox groupBox1;
  35. private NumericUpDown numericUpDown3;
  36. private NumericUpDown numericUpDown2;
  37. private NumericUpDown numericUpDown1;
  38. private ComboBox comboBox1;
  39. #endregion
  40. /// <summary>
  41. /// 图像显示数量下拉选项
  42. /// </summary>
  43. int[] imgCount = new int[] { 2, 3, 4, 6, 8, 9 };
  44. /// <summary>
  45. /// 字体列表
  46. /// </summary>
  47. ArrayList fontsItems = new ArrayList();
  48. /// <summary>
  49. /// 调色板
  50. /// </summary>
  51. PaintDotNet.ColorsForm colorsForm;
  52. public SurveyPointStyleSettingDialog()
  53. {
  54. InitializeComponent();
  55. InitializeLanguageText();
  56. InitializeData();
  57. //调色板
  58. this.colorsForm = new ColorsForm();
  59. this.colorsForm.StartPosition = FormStartPosition.CenterScreen;
  60. this.colorsForm.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  61. }
  62. #region 初始化
  63. private void InitializeLanguageText()
  64. {
  65. this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
  66. this.button2.Text = PdnResources.GetString("CommonAction.Save");
  67. this.button1.Text = PdnResources.GetString("Menu.File.Close.Text");
  68. this.groupBox2.Text = PdnResources.GetString("Menu.Dedicatedanalysis.Nmetals.Measuringpoint.text");
  69. this.checkBox1.Text = PdnResources.GetString("Menu.Dedicatedanalysis.Nmetals.Displaypointmarkersymbol.text");
  70. this.radioButton2.Text = PdnResources.GetString("Menu.solid.text");
  71. this.radioButton1.Text = PdnResources.GetString("Menu.Hollow.text");
  72. this.label4.Text = PdnResources.GetString("Menu.style.text") + ":";
  73. this.label6.Text = PdnResources.GetString("Menu.size.text") + ":";
  74. this.label5.Text = PdnResources.GetString("Menu.Font.text") + ":";
  75. this.label3.Text = PdnResources.GetString("Menu.diameter.text") + ":";
  76. this.label2.Text = PdnResources.GetString("Menu.width.text") + ":";
  77. this.label1.Text = PdnResources.GetString("Menu.color.text") + ":";
  78. this.groupBox3.Text = PdnResources.GetString("Menu.Preview.text");
  79. this.Text = PdnResources.GetString("Menu.Dedicatedanalysis.Nmetals.Measurinsetting.text");
  80. }
  81. private void InitializeComponent()
  82. {
  83. this.groupBox1 = new System.Windows.Forms.GroupBox();
  84. this.button2 = new System.Windows.Forms.Button();
  85. this.button1 = new System.Windows.Forms.Button();
  86. this.groupBox2 = new System.Windows.Forms.GroupBox();
  87. this.comboBox1 = new System.Windows.Forms.ComboBox();
  88. this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
  89. this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
  90. this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
  91. this.panel2 = new System.Windows.Forms.Panel();
  92. this.checkBox1 = new System.Windows.Forms.CheckBox();
  93. this.radioButton2 = new System.Windows.Forms.RadioButton();
  94. this.radioButton1 = new System.Windows.Forms.RadioButton();
  95. this.label4 = new System.Windows.Forms.Label();
  96. this.label6 = new System.Windows.Forms.Label();
  97. this.label5 = new System.Windows.Forms.Label();
  98. this.label3 = new System.Windows.Forms.Label();
  99. this.label2 = new System.Windows.Forms.Label();
  100. this.label1 = new System.Windows.Forms.Label();
  101. this.groupBox3 = new System.Windows.Forms.GroupBox();
  102. this.panel1 = new System.Windows.Forms.Panel();
  103. this.groupBox1.SuspendLayout();
  104. this.groupBox2.SuspendLayout();
  105. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
  106. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
  107. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
  108. this.groupBox3.SuspendLayout();
  109. this.SuspendLayout();
  110. //
  111. // groupBox1
  112. //
  113. this.groupBox1.Controls.Add(this.button2);
  114. this.groupBox1.Controls.Add(this.button1);
  115. this.groupBox1.Location = new System.Drawing.Point(11, 12);
  116. this.groupBox1.Name = "groupBox1";
  117. this.groupBox1.Size = new System.Drawing.Size(320, 54);
  118. this.groupBox1.TabIndex = 0;
  119. this.groupBox1.TabStop = false;
  120. //
  121. // button2
  122. //
  123. this.button2.Location = new System.Drawing.Point(228, 15);
  124. this.button2.Name = "button2";
  125. this.button2.Size = new System.Drawing.Size(70, 28);
  126. this.button2.TabIndex = 3;
  127. this.button2.UseVisualStyleBackColor = true;
  128. this.button2.Click += new System.EventHandler(this.button2_Click);
  129. //
  130. // button1
  131. //
  132. this.button1.Location = new System.Drawing.Point(139, 15);
  133. this.button1.Name = "button1";
  134. this.button1.Size = new System.Drawing.Size(70, 28);
  135. this.button1.TabIndex = 2;
  136. this.button1.UseVisualStyleBackColor = true;
  137. this.button1.Click += new System.EventHandler(this.button1_Click);
  138. //
  139. // groupBox2
  140. //
  141. this.groupBox2.Controls.Add(this.comboBox1);
  142. this.groupBox2.Controls.Add(this.numericUpDown3);
  143. this.groupBox2.Controls.Add(this.numericUpDown2);
  144. this.groupBox2.Controls.Add(this.numericUpDown1);
  145. this.groupBox2.Controls.Add(this.panel2);
  146. this.groupBox2.Controls.Add(this.checkBox1);
  147. this.groupBox2.Controls.Add(this.radioButton2);
  148. this.groupBox2.Controls.Add(this.radioButton1);
  149. this.groupBox2.Controls.Add(this.label4);
  150. this.groupBox2.Controls.Add(this.label6);
  151. this.groupBox2.Controls.Add(this.label5);
  152. this.groupBox2.Controls.Add(this.label3);
  153. this.groupBox2.Controls.Add(this.label2);
  154. this.groupBox2.Controls.Add(this.label1);
  155. this.groupBox2.Location = new System.Drawing.Point(12, 72);
  156. this.groupBox2.Name = "groupBox2";
  157. this.groupBox2.Size = new System.Drawing.Size(319, 145);
  158. this.groupBox2.TabIndex = 2;
  159. this.groupBox2.TabStop = false;
  160. //
  161. // comboBox1
  162. //
  163. this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  164. this.comboBox1.FormattingEnabled = true;
  165. this.comboBox1.Location = new System.Drawing.Point(216, 29);
  166. this.comboBox1.Name = "comboBox1";
  167. this.comboBox1.Size = new System.Drawing.Size(81, 20);
  168. this.comboBox1.TabIndex = 19;
  169. this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
  170. //
  171. // numericUpDown3
  172. //
  173. this.numericUpDown3.Location = new System.Drawing.Point(46, 112);
  174. this.numericUpDown3.Maximum = new decimal(new int[] {
  175. 100000,
  176. 0,
  177. 0,
  178. 0});
  179. this.numericUpDown3.Minimum = new decimal(new int[] {
  180. 1,
  181. 0,
  182. 0,
  183. 0});
  184. this.numericUpDown3.Name = "numericUpDown3";
  185. this.numericUpDown3.Size = new System.Drawing.Size(95, 21);
  186. this.numericUpDown3.TabIndex = 18;
  187. this.numericUpDown3.Value = new decimal(new int[] {
  188. 1,
  189. 0,
  190. 0,
  191. 0});
  192. this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);
  193. //
  194. // numericUpDown2
  195. //
  196. this.numericUpDown2.Location = new System.Drawing.Point(46, 84);
  197. this.numericUpDown2.Minimum = new decimal(new int[] {
  198. 1,
  199. 0,
  200. 0,
  201. 0});
  202. this.numericUpDown2.Name = "numericUpDown2";
  203. this.numericUpDown2.Size = new System.Drawing.Size(95, 21);
  204. this.numericUpDown2.TabIndex = 17;
  205. this.numericUpDown2.Value = new decimal(new int[] {
  206. 1,
  207. 0,
  208. 0,
  209. 0});
  210. this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);
  211. //
  212. // numericUpDown1
  213. //
  214. this.numericUpDown1.Location = new System.Drawing.Point(216, 60);
  215. this.numericUpDown1.Minimum = new decimal(new int[] {
  216. 1,
  217. 0,
  218. 0,
  219. 0});
  220. this.numericUpDown1.Name = "numericUpDown1";
  221. this.numericUpDown1.Size = new System.Drawing.Size(81, 21);
  222. this.numericUpDown1.TabIndex = 14;
  223. this.numericUpDown1.Value = new decimal(new int[] {
  224. 1,
  225. 0,
  226. 0,
  227. 0});
  228. this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
  229. //
  230. // panel2
  231. //
  232. this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  233. this.panel2.Location = new System.Drawing.Point(46, 28);
  234. this.panel2.Name = "panel2";
  235. this.panel2.Size = new System.Drawing.Size(95, 21);
  236. this.panel2.TabIndex = 16;
  237. this.panel2.BackColorChanged += new System.EventHandler(this.panel2_BackColorChanged);
  238. this.panel2.Click += new System.EventHandler(this.panel2_Click);
  239. //
  240. // checkBox1
  241. //
  242. this.checkBox1.AutoSize = true;
  243. this.checkBox1.Location = new System.Drawing.Point(183, 110);
  244. this.checkBox1.Name = "checkBox1";
  245. this.checkBox1.Size = new System.Drawing.Size(108, 16);
  246. this.checkBox1.TabIndex = 15;
  247. this.checkBox1.UseVisualStyleBackColor = true;
  248. //
  249. // radioButton2
  250. //
  251. this.radioButton2.AutoSize = true;
  252. this.radioButton2.Location = new System.Drawing.Point(99, 59);
  253. this.radioButton2.Name = "radioButton2";
  254. this.radioButton2.Size = new System.Drawing.Size(47, 16);
  255. this.radioButton2.TabIndex = 14;
  256. this.radioButton2.TabStop = true;
  257. this.radioButton2.UseVisualStyleBackColor = true;
  258. //
  259. // radioButton1
  260. //
  261. this.radioButton1.AutoSize = true;
  262. this.radioButton1.Location = new System.Drawing.Point(46, 59);
  263. this.radioButton1.Name = "radioButton1";
  264. this.radioButton1.Size = new System.Drawing.Size(47, 16);
  265. this.radioButton1.TabIndex = 13;
  266. this.radioButton1.TabStop = true;
  267. this.radioButton1.UseVisualStyleBackColor = true;
  268. this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
  269. //
  270. // label4
  271. //
  272. this.label4.AutoSize = true;
  273. this.label4.Location = new System.Drawing.Point(6, 59);
  274. this.label4.Name = "label4";
  275. this.label4.Size = new System.Drawing.Size(41, 12);
  276. this.label4.TabIndex = 12;
  277. //
  278. // label6
  279. //
  280. this.label6.AutoSize = true;
  281. this.label6.Location = new System.Drawing.Point(181, 63);
  282. this.label6.Name = "label6";
  283. this.label6.Size = new System.Drawing.Size(41, 12);
  284. this.label6.TabIndex = 5;
  285. //
  286. // label5
  287. //
  288. this.label5.AutoSize = true;
  289. this.label5.Location = new System.Drawing.Point(181, 32);
  290. this.label5.Name = "label5";
  291. this.label5.Size = new System.Drawing.Size(41, 12);
  292. this.label5.TabIndex = 4;
  293. //
  294. // label3
  295. //
  296. this.label3.AutoSize = true;
  297. this.label3.Location = new System.Drawing.Point(6, 114);
  298. this.label3.Name = "label3";
  299. this.label3.Size = new System.Drawing.Size(41, 12);
  300. this.label3.TabIndex = 2;
  301. //
  302. // label2
  303. //
  304. this.label2.AutoSize = true;
  305. this.label2.Location = new System.Drawing.Point(6, 88);
  306. this.label2.Name = "label2";
  307. this.label2.Size = new System.Drawing.Size(41, 12);
  308. this.label2.TabIndex = 1;
  309. //
  310. // label1
  311. //
  312. this.label1.AutoSize = true;
  313. this.label1.Location = new System.Drawing.Point(6, 32);
  314. this.label1.Name = "label1";
  315. this.label1.Size = new System.Drawing.Size(41, 12);
  316. this.label1.TabIndex = 0;
  317. //
  318. // groupBox3
  319. //
  320. this.groupBox3.Controls.Add(this.panel1);
  321. this.groupBox3.Location = new System.Drawing.Point(12, 223);
  322. this.groupBox3.Name = "groupBox3";
  323. this.groupBox3.Size = new System.Drawing.Size(319, 116);
  324. this.groupBox3.TabIndex = 3;
  325. this.groupBox3.TabStop = false;
  326. //
  327. // panel1
  328. //
  329. this.panel1.Location = new System.Drawing.Point(27, 17);
  330. this.panel1.Name = "panel1";
  331. this.panel1.Size = new System.Drawing.Size(270, 88);
  332. this.panel1.TabIndex = 0;
  333. this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
  334. //
  335. // SurveyPointStyleSettingDialog
  336. //
  337. this.ClientSize = new System.Drawing.Size(343, 351);
  338. this.Controls.Add(this.groupBox3);
  339. this.Controls.Add(this.groupBox2);
  340. this.Controls.Add(this.groupBox1);
  341. this.MaximizeBox = false;
  342. this.MaximumSize = new System.Drawing.Size(359, 390);
  343. this.MinimizeBox = false;
  344. this.MinimumSize = new System.Drawing.Size(359, 390);
  345. this.Name = "SurveyPointStyleSettingDialog";
  346. this.ShowInTaskbar = false;
  347. this.groupBox1.ResumeLayout(false);
  348. this.groupBox2.ResumeLayout(false);
  349. this.groupBox2.PerformLayout();
  350. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
  351. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
  352. ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
  353. this.groupBox3.ResumeLayout(false);
  354. this.ResumeLayout(false);
  355. }
  356. #endregion
  357. /// <summary>
  358. /// 初始化数据
  359. /// </summary>
  360. private void InitializeData()
  361. {
  362. this.fontsItems.Clear();
  363. //绑定字体数据
  364. System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();
  365. foreach (FontFamily fontFamily in fonts.Families)
  366. {
  367. fontsItems.Add(fontFamily.Name);
  368. }
  369. this.comboBox1.DataSource = fontsItems;
  370. CompoundRatioStyleModel compoundRatioStyleModel = XmlSerializeHelper.DESerializer<CompoundRatioStyleModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\SurvePointStyle.xml", FileMode.Open));
  371. if (compoundRatioStyleModel.survePointStyle != null)
  372. {
  373. this.panel2.BackColor = Color.FromArgb(compoundRatioStyleModel.survePointStyle.pointColor);
  374. if (compoundRatioStyleModel.survePointStyle.pointStyle == 0)
  375. this.radioButton1.Checked = true;
  376. else
  377. this.radioButton2.Checked = true;
  378. this.numericUpDown2.Value = compoundRatioStyleModel.survePointStyle.pointWidth;
  379. this.numericUpDown3.Value = compoundRatioStyleModel.survePointStyle.pointDiameter;
  380. this.comboBox1.Text = compoundRatioStyleModel.survePointStyle.font;
  381. this.numericUpDown1.Value = compoundRatioStyleModel.survePointStyle.fontSize;
  382. if (compoundRatioStyleModel.survePointStyle.pointMarkerSymbol)
  383. this.checkBox1.Checked = true;
  384. else
  385. this.checkBox1.Checked = false;
  386. }
  387. }
  388. /// <summary>
  389. /// 页面关闭
  390. /// </summary>
  391. /// <param name="sender"></param>
  392. /// <param name="e"></param>
  393. private void button1_Click(object sender, EventArgs e)
  394. {
  395. this.Close();
  396. }
  397. private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
  398. {
  399. }
  400. private void panel2_Click(object sender, EventArgs e)
  401. {
  402. this.colorsForm.UserPrimaryColor = ColorBgra.FromColor(this.panel2.BackColor);
  403. this.colorsForm.setSaveBtn_Click(new System.EventHandler(this.panel2Changed));
  404. this.colorsForm.ShowDialog();
  405. }
  406. private void panel2Changed(object sender, EventArgs e)
  407. {
  408. this.panel2.BackColor = this.colorsForm.UserPrimaryColor.ToColor();
  409. this.colorsForm.Close();
  410. }
  411. /// <summary>
  412. /// 保存按钮
  413. /// </summary>
  414. /// <param name="sender"></param>
  415. /// <param name="e"></param>
  416. private void button2_Click(object sender, EventArgs e)
  417. {
  418. CompoundRatioStyleModel compoundRatioStyleModel = new CompoundRatioStyleModel();
  419. compoundRatioStyleModel.survePointStyle = new CompoundRatioStyleModel.SurvePointStyle();
  420. compoundRatioStyleModel.survePointStyle.pointColor = Convert.ToInt32(this.panel2.BackColor.ToArgb());
  421. if(this.radioButton1.Checked)
  422. compoundRatioStyleModel.survePointStyle.pointStyle = 0;
  423. else
  424. compoundRatioStyleModel.survePointStyle.pointStyle = 1;
  425. compoundRatioStyleModel.survePointStyle.pointWidth = Convert.ToInt32(numericUpDown2.Value);
  426. compoundRatioStyleModel.survePointStyle.pointDiameter = Convert.ToInt32(numericUpDown3.Value);
  427. compoundRatioStyleModel.survePointStyle.font = this.comboBox1.Text;
  428. compoundRatioStyleModel.survePointStyle.fontSize = Convert.ToInt32(numericUpDown1.Value);
  429. if(this.checkBox1.Checked)
  430. compoundRatioStyleModel.survePointStyle.pointMarkerSymbol = true;
  431. else
  432. compoundRatioStyleModel.survePointStyle.pointMarkerSymbol = false;
  433. //以下保存xml文件信息
  434. string stageModelXml = XmlSerializeHelper.XmlSerialize<CompoundRatioStyleModel>(compoundRatioStyleModel);
  435. string filePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\SurvePointStyle.xml";
  436. FileOperationHelper.WriteStringToFile(stageModelXml, filePath, FileMode.Create);
  437. RecombinationRateDialog recombinationRateDialog = (RecombinationRateDialog)this.Owner;
  438. recombinationRateDialog.RefreshPanel();
  439. }
  440. /// <summary>
  441. /// 绘制预览图形
  442. /// </summary>
  443. /// <param name="sender"></param>
  444. /// <param name="e"></param>
  445. private void panel1_Paint(object sender, PaintEventArgs e)
  446. {
  447. DrawPreviewGraphics(e.Graphics);
  448. }
  449. /// <summary>
  450. /// 绘制预览图形
  451. /// </summary>
  452. private void DrawPreviewGraphics(Graphics g)
  453. {
  454. Pen pointPen = new Pen(this.panel2.BackColor, Convert.ToInt32(numericUpDown2.Value));
  455. SolidBrush brush = new SolidBrush(this.panel2.BackColor);
  456. Font textfont = new Font(this.comboBox1.Text, Convert.ToInt32(numericUpDown1.Value));
  457. this.panel1.BackColor = Color.Black;
  458. if (this.radioButton1.Checked)
  459. g.DrawEllipse(pointPen, this.panel1.Width / 2 - Convert.ToInt32(numericUpDown3.Value) / 2,
  460. this.panel1.Height / 2 - Convert.ToInt32(numericUpDown3.Value) / 2,
  461. Convert.ToInt32(numericUpDown3.Value), Convert.ToInt32(numericUpDown3.Value));
  462. else
  463. g.FillEllipse(brush, this.panel1.Width / 2 - Convert.ToInt32(numericUpDown3.Value) / 2,
  464. this.panel1.Height / 2 - Convert.ToInt32(numericUpDown3.Value) / 2,
  465. Convert.ToInt32(numericUpDown3.Value), Convert.ToInt32(numericUpDown3.Value));
  466. g.DrawString("文字预览", textfont, new SolidBrush(Color.Red), new PointF(0, 0));
  467. }
  468. /// <summary>
  469. /// 更改文字
  470. /// </summary>
  471. /// <param name="sender"></param>
  472. /// <param name="e"></param>
  473. private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  474. {
  475. this.panel1.Refresh();
  476. }
  477. /// <summary>
  478. /// 空实心样式改变
  479. /// </summary>
  480. /// <param name="sender"></param>
  481. /// <param name="e"></param>
  482. private void radioButton1_CheckedChanged(object sender, EventArgs e)
  483. {
  484. this.panel1.Refresh();
  485. }
  486. /// <summary>
  487. /// 字体大小改变
  488. /// </summary>
  489. /// <param name="sender"></param>
  490. /// <param name="e"></param>
  491. private void numericUpDown1_ValueChanged(object sender, EventArgs e)
  492. {
  493. this.panel1.Refresh();
  494. }
  495. /// <summary>
  496. /// 空心点线宽改变
  497. /// </summary>
  498. /// <param name="sender"></param>
  499. /// <param name="e"></param>
  500. private void numericUpDown2_ValueChanged(object sender, EventArgs e)
  501. {
  502. this.panel1.Refresh();
  503. }
  504. /// <summary>
  505. /// 点直径改变
  506. /// </summary>
  507. /// <param name="sender"></param>
  508. /// <param name="e"></param>
  509. private void numericUpDown3_ValueChanged(object sender, EventArgs e)
  510. {
  511. this.panel1.Refresh();
  512. }
  513. /// <summary>
  514. /// 点颜色改变
  515. /// </summary>
  516. /// <param name="sender"></param>
  517. /// <param name="e"></param>
  518. private void panel2_BackColorChanged(object sender, EventArgs e)
  519. {
  520. this.panel1.Refresh();
  521. }
  522. }
  523. }