MethodCutOffDialog.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. using OpenCvSharp;
  2. using PaintDotNet.Base.CommTool;
  3. using PaintDotNet.Base.SettingModel;
  4. using System;
  5. using System.Collections;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Drawing;
  9. using System.Drawing.Drawing2D;
  10. using System.IO;
  11. using System.Windows.Forms;
  12. using Point = System.Drawing.Point;
  13. using PaintDotNet.Base.Functionodel;
  14. using PaintDotNet.Base.Enum;
  15. using PaintDotNet.Annotation.Enum;
  16. using PaintDotNet.CustomControl;
  17. using Application = System.Windows.Forms.Application;
  18. using GroupBox = System.Windows.Forms.GroupBox;
  19. using CheckBox = System.Windows.Forms.CheckBox;
  20. using Button = System.Windows.Forms.Button;
  21. using Label = System.Windows.Forms.Label;
  22. using TextBox = System.Windows.Forms.TextBox;
  23. using System.Data;
  24. using PaintDotNet.DbOpreate.DbModel;
  25. using PaintDotNet.Annotation;
  26. using PaintDotNet.DedicatedAnalysis.GrainSizeStandard.IntegrationClass;
  27. namespace PaintDotNet.DedicatedAnalysis.GrainSizeStandard.GBT24177
  28. {
  29. internal class MethodCutOffDialog : GrainSizeStandardDialog
  30. {
  31. /// <summary>
  32. /// 测定结果暂存
  33. /// </summary>
  34. private List<DataTable> dataTable1s = new List<DataTable>();
  35. /// <summary>
  36. /// 储存点击保存结果后的所有原图与分析图
  37. /// </summary>
  38. private Dictionary<string, List<Bitmap>> bitCeDingDic = new Dictionary<string, List<Bitmap>>();
  39. #region 组件
  40. private GroupBox groupBox10;
  41. private Button button10;
  42. private Button button7_0;
  43. private GroupBox groupBox11;
  44. private CheckBox checkBox5_0;
  45. private CheckBox checkBox4;
  46. private CheckBox checkBox3_0;
  47. private DataGridViewTextBoxColumn ColumnTotal1;
  48. private DataGridViewTextBoxColumn ColumnTotal2;
  49. private DataGridViewTextBoxColumn ColumnTotal3;
  50. private DataGridViewTextBoxColumn ColumnTotal4;
  51. private DataGridViewTextBoxColumn ColumnTotal5;
  52. private DataGridViewTextBoxColumn ColumnTotal6;
  53. private DataGridViewTextBoxColumn Column1;
  54. private DataGridViewTextBoxColumn Column2;
  55. private DataGridViewTextBoxColumn Column3;
  56. private DataGridViewTextBoxColumn Column4;
  57. private DataGridViewTextBoxColumn Column5;
  58. private DataGridViewTextBoxColumn Column6;
  59. private Button button8;
  60. private Button button6_0;
  61. #endregion 组件
  62. #region 构造函数
  63. public MethodCutOffDialog(AppWorkspace appWorkspace, PdnMenuItem menuItem) : base(appWorkspace, menuItem, null, 0)
  64. {
  65. }
  66. #endregion 构造函数
  67. #region 初始化组件
  68. private void InitializeLanguageText()
  69. {
  70. this.groupBox10.Text = PdnResources.GetString("Menu.sectionoperation.text");
  71. this.button8.Text = PdnResources.GetString("Menu.1.5/2section.text");
  72. this.button6_0.Text = PdnResources.GetString("Menu.0.5sectionstyle.text");
  73. this.button10.Text = PdnResources.GetString("Menu.Setting.Text");
  74. this.button7_0.Text = PdnResources.GetString("Menu.1section.text");
  75. this.groupBox11.Text = PdnResources.GetString("Menu.Displayparamssettings.text");
  76. this.checkBox5_0.Text = PdnResources.GetString("Menu.displaysections.text");
  77. this.checkBox4.Text = PdnResources.GetString("Menu.displaygrid.text");
  78. this.checkBox3_0.Text = PdnResources.GetString("Menu.displaygrainboundaries.text");
  79. this.Text = "GBT24177_2009(" + PdnResources.GetString("Menu.sectionmethod.text") + ")";
  80. this.ColumnTotal1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  81. this.ColumnTotal2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  82. this.ColumnTotal3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  83. this.ColumnTotal4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  84. this.ColumnTotal5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  85. this.ColumnTotal6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  86. this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  87. this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  88. this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  89. this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  90. this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  91. this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  92. this.dataGridView_Total.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  93. this.ColumnTotal3,
  94. this.ColumnTotal4,
  95. this.ColumnTotal5,
  96. this.ColumnTotal6});
  97. //
  98. // ColumnTotal1
  99. //
  100. this.ColumnTotal1.HeaderText = PdnResources.GetString("Menu.Intersectinggrainnumber.Text");
  101. this.ColumnTotal1.Name = "ColumnTotal1";
  102. this.ColumnTotal1.ReadOnly = true;
  103. //
  104. // ColumnTotal2
  105. //
  106. this.ColumnTotal2.HeaderText = PdnResources.GetString("Menu.Numberofgrainsingrid.Text");
  107. this.ColumnTotal2.Name = "ColumnTotal2";
  108. this.ColumnTotal2.ReadOnly = true;
  109. //
  110. // ColumnTotal3
  111. //
  112. this.ColumnTotal3.HeaderText = PdnResources.GetString("Menu.Totalmeshlength.Text") + "(μm)";
  113. this.ColumnTotal3.Name = "ColumnTotal3";
  114. this.ColumnTotal3.ReadOnly = true;
  115. //
  116. // ColumnTotal4
  117. //
  118. this.ColumnTotal4.HeaderText = PdnResources.GetString("Menu.umberofpoints.Text");
  119. this.ColumnTotal4.Name = "ColumnTotal4";
  120. this.ColumnTotal4.ReadOnly = true;
  121. //
  122. // ColumnTotal5
  123. //
  124. this.ColumnTotal5.HeaderText = PdnResources.GetString("Menu.averageintercept.text") + "(μm)";
  125. this.ColumnTotal5.Name = "ColumnTotal5";
  126. this.ColumnTotal5.ReadOnly = true;
  127. //
  128. // ColumnTotal6
  129. //
  130. this.ColumnTotal6.HeaderText = PdnResources.GetString("Menu.Averagegrainsizegrade.text");
  131. this.ColumnTotal6.Name = "ColumnTotal6";
  132. this.ColumnTotal6.ReadOnly = true;
  133. this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  134. this.Column1,
  135. this.Column2,
  136. this.Column3,
  137. this.Column4,
  138. this.Column5,
  139. this.Column6});
  140. //
  141. // Column1
  142. //
  143. this.Column1.HeaderText = PdnResources.GetString("Menu.picture.Text");
  144. this.Column1.Name = "Column1";
  145. this.Column1.ReadOnly = true;
  146. //
  147. // Column2
  148. //
  149. this.Column2.HeaderText = PdnResources.GetString("Menu.Tools.GridLine.Text");
  150. this.Column2.Name = "Column2";
  151. this.Column2.ReadOnly = true;
  152. //
  153. // Column3
  154. //
  155. this.Column3.HeaderText = PdnResources.GetString("Menu.Gridlength.text") + "(μm)";
  156. this.Column3.Name = "Graisize";
  157. this.Column3.ReadOnly = true;
  158. //
  159. // Column4
  160. //
  161. this.Column4.HeaderText = PdnResources.GetString("Menu.Thenumberofsections.text");
  162. this.Column4.Name = "Grainnumber";
  163. this.Column4.ReadOnly = true;
  164. //
  165. // Column5
  166. //
  167. this.Column5.HeaderText = PdnResources.GetString("Menu.averageintercept.text") + "(μm)";
  168. this.Column5.Name = "Grainintercept";
  169. this.Column5.ReadOnly = true;
  170. //
  171. // Column6
  172. //
  173. this.Column6.HeaderText = PdnResources.GetString("Menu.Averagegrainsizegrade.text");
  174. this.Column6.Name = "Graingrade";
  175. this.Column6.ReadOnly = true;
  176. this.Load += new System.EventHandler(this.MethodCutOffDialog_Load);
  177. }
  178. private void InitializeComponent()
  179. {
  180. this.groupBox10 = new System.Windows.Forms.GroupBox();
  181. this.button8 = new System.Windows.Forms.Button();
  182. this.button6_0 = new System.Windows.Forms.Button();
  183. this.button10 = new System.Windows.Forms.Button();
  184. this.button7_0 = new System.Windows.Forms.Button();
  185. this.groupBox11 = new System.Windows.Forms.GroupBox();
  186. this.checkBox5_0 = new System.Windows.Forms.CheckBox();
  187. this.checkBox4 = new System.Windows.Forms.CheckBox();
  188. this.checkBox3_0 = new System.Windows.Forms.CheckBox();
  189. this.groupBox_analysisResult1.SuspendLayout();
  190. this.groupBox10.SuspendLayout();
  191. this.groupBox11.SuspendLayout();
  192. this.SuspendLayout();
  193. //
  194. // groupBox10
  195. //
  196. this.groupBox10.Controls.Add(this.button8);
  197. this.groupBox10.Controls.Add(this.button6_0);
  198. this.groupBox10.Controls.Add(this.button10);
  199. this.groupBox10.Controls.Add(this.button7_0);
  200. this.groupBox10.Location = new System.Drawing.Point(179, 370);
  201. this.groupBox10.Name = "groupBox10";
  202. this.groupBox10.Size = new System.Drawing.Size(208, 74);
  203. this.groupBox10.TabIndex = 38;
  204. this.groupBox10.TabStop = false;
  205. //
  206. // button8
  207. //
  208. this.button8.BackColor = System.Drawing.SystemColors.Control;
  209. this.button8.Location = new System.Drawing.Point(107, 42);
  210. this.button8.Name = "button8";
  211. this.button8.Size = new System.Drawing.Size(95, 26);
  212. this.button8.TabIndex = 13;
  213. this.button8.UseVisualStyleBackColor = false;
  214. this.button8.Click += new System.EventHandler(this.button8_Click);
  215. //
  216. // button6_0
  217. //
  218. this.button6_0.BackColor = System.Drawing.SystemColors.Control;
  219. this.button6_0.Location = new System.Drawing.Point(6, 43);
  220. this.button6_0.Name = "button6_0";
  221. this.button6_0.Size = new System.Drawing.Size(95, 26);
  222. this.button6_0.TabIndex = 12;
  223. this.button6_0.UseVisualStyleBackColor = false;
  224. this.button6_0.Click += new System.EventHandler(this.button6_0_Click);
  225. //
  226. // button10
  227. //
  228. this.button10.BackColor = System.Drawing.SystemColors.Control;
  229. this.button10.Location = new System.Drawing.Point(107, 15);
  230. this.button10.Name = "button10";
  231. this.button10.Size = new System.Drawing.Size(95, 26);
  232. this.button10.TabIndex = 11;
  233. this.button10.UseVisualStyleBackColor = false;
  234. this.button10.Click += new System.EventHandler(this.button10_Click);
  235. //
  236. // button7_0
  237. //
  238. this.button7_0.BackColor = System.Drawing.SystemColors.Control;
  239. this.button7_0.Location = new System.Drawing.Point(6, 15);
  240. this.button7_0.Name = "button7_0";
  241. this.button7_0.Size = new System.Drawing.Size(95, 26);
  242. this.button7_0.TabIndex = 8;
  243. this.button7_0.UseVisualStyleBackColor = false;
  244. this.button7_0.Click += new System.EventHandler(this.button7_0_Click);
  245. //
  246. // groupBox11
  247. //
  248. this.groupBox11.Controls.Add(this.checkBox5_0);
  249. this.groupBox11.Controls.Add(this.checkBox4);
  250. this.groupBox11.Controls.Add(this.checkBox3_0);
  251. this.groupBox11.Location = new System.Drawing.Point(393, 370);
  252. this.groupBox11.Name = "groupBox11";
  253. this.groupBox11.Size = new System.Drawing.Size(142, 74);
  254. this.groupBox11.TabIndex = 39;
  255. this.groupBox11.TabStop = false;
  256. //
  257. // checkBox5_0
  258. //
  259. this.checkBox5_0.AutoSize = true;
  260. this.checkBox5_0.Checked = true;
  261. this.checkBox5_0.CheckState = System.Windows.Forms.CheckState.Checked;
  262. this.checkBox5_0.Location = new System.Drawing.Point(15, 53);
  263. this.checkBox5_0.Name = "checkBox5_0";
  264. this.checkBox5_0.Size = new System.Drawing.Size(72, 16);
  265. this.checkBox5_0.TabIndex = 2;
  266. this.checkBox5_0.UseVisualStyleBackColor = true;
  267. this.checkBox5_0.CheckedChanged += new System.EventHandler(this.checkBox5_0_CheckedChanged);
  268. //
  269. // checkBox4
  270. //
  271. this.checkBox4.AutoSize = true;
  272. this.checkBox4.Checked = true;
  273. this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked;
  274. this.checkBox4.Location = new System.Drawing.Point(15, 35);
  275. this.checkBox4.Name = "checkBox4";
  276. this.checkBox4.Size = new System.Drawing.Size(72, 16);
  277. this.checkBox4.TabIndex = 1;
  278. this.checkBox4.UseVisualStyleBackColor = true;
  279. this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
  280. //
  281. // checkBox3_0
  282. //
  283. this.checkBox3_0.AutoSize = true;
  284. this.checkBox3_0.Checked = true;
  285. this.checkBox3_0.CheckState = System.Windows.Forms.CheckState.Checked;
  286. this.checkBox3_0.Location = new System.Drawing.Point(15, 17);
  287. this.checkBox3_0.Name = "checkBox3_0";
  288. this.checkBox3_0.Size = new System.Drawing.Size(72, 16);
  289. this.checkBox3_0.TabIndex = 0;
  290. this.checkBox3_0.UseVisualStyleBackColor = true;
  291. this.checkBox3_0.CheckedChanged += new System.EventHandler(this.checkBox3_0_CheckedChanged);
  292. //
  293. // MethodCutOffDialog
  294. //
  295. this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
  296. this.ClientSize = new System.Drawing.Size(1127, 810);
  297. this.Controls.Add(this.groupBox10);
  298. this.Controls.Add(this.groupBox11);
  299. this.Name = "MethodCutOffDialog";
  300. this.Controls.SetChildIndex(this.groupBox11, 0);
  301. this.Controls.SetChildIndex(this.groupBox10, 0);
  302. this.Controls.SetChildIndex(this.groupBox6groupBox_analysisResult2, 0);
  303. this.Controls.SetChildIndex(this.groupBox_img, 0);
  304. this.Controls.SetChildIndex(this.groupBox_review, 0);
  305. this.Controls.SetChildIndex(this.groupBox_analysisResult1, 0);
  306. this.Controls.SetChildIndex(this.groupBox_report, 0);
  307. this.groupBox_analysisResult1.ResumeLayout(false);
  308. this.groupBox10.ResumeLayout(false);
  309. this.groupBox11.ResumeLayout(false);
  310. this.groupBox11.PerformLayout();
  311. this.ResumeLayout(false);
  312. }
  313. #endregion 初始化组件
  314. #region 需继承方法
  315. /// <summary>
  316. /// 是否显示晶界
  317. /// </summary>
  318. /// <returns></returns>
  319. protected override Boolean ShowGrainBoundryChecked()
  320. {
  321. return checkBox3_0.Checked;
  322. }
  323. //是否绘制辅助线
  324. protected override bool showGridChecked()
  325. {
  326. return checkBox4.Checked;
  327. }
  328. //是否绘制截点
  329. protected override bool drawGuidePoints()
  330. {
  331. return (imageMat != null && this.checkBox5_0.Checked);
  332. }
  333. //是否显示截点
  334. protected override Boolean drawDisplaySections()//##1
  335. {
  336. return this.checkBox5_0.Checked;
  337. }
  338. //辅助线类型
  339. protected override string[] getTypeNames()
  340. {
  341. return new string[] {
  342. PdnResources.GetString("Menu.Verticalauxiliaryline.text"),
  343. PdnResources.GetString("Menu.Horizontalauxiliaryline.text"),
  344. PdnResources.GetString("Menu.Singlecircleauxiliaryline.text"),
  345. PdnResources.GetString("Menu.Three-circleauxiliaryline.text"),
  346. PdnResources.GetString("Menu.Compositeauxiliaryline.text")};
  347. }
  348. protected override string getTemplateName()
  349. {
  350. return "Template.Manager.item3.GrainSizeCutOff24177Method";
  351. }
  352. protected override string getProjectEngineeringName()
  353. {
  354. return "Menu.DedicatedAnalysis.BlackMetal.GrainSize.Text";
  355. }
  356. protected override string getModelName()
  357. {
  358. return "GrainSizeGuideStyleModel.xml";
  359. }
  360. protected override void SubclassInitialize()
  361. {
  362. InitializeComponent();
  363. InitializeLanguageText();
  364. DetailListNotDoubleIndex.Add(0);
  365. DetailListNotDoubleIndex.Add(1);
  366. }
  367. #endregion
  368. private void MethodCutOffDialog_Load(object sender, EventArgs e)
  369. {
  370. object ShowGrainBoundry;
  371. if (GetParamValue1(ParamKey_displaygrainboundaries, out ShowGrainBoundry))//显示晶界
  372. this.checkBox3_0.Checked = (bool)ShowGrainBoundry;
  373. if (GetParamValue1(ParamKey_displaygrid, out ShowGrainBoundry))//显示网格
  374. this.checkBox4.Checked = (bool)ShowGrainBoundry;
  375. if (GetParamValue1(ParamKey_displaysections, out ShowGrainBoundry))//显示截点
  376. this.checkBox5_0.Checked = (bool)ShowGrainBoundry;
  377. //this.groupBox_img.Size = new System.Drawing.Size(158, 722);
  378. //this.groupBox_review.Size = new System.Drawing.Size(575, 722);
  379. //this.groupBox_analysisResult1.Location = new System.Drawing.Point(12, 800);
  380. //this.groupBox6groupBox_analysisResult2.Location = new System.Drawing.Point(242, 800);
  381. //this.groupBox_report.Location = new System.Drawing.Point(974, 800);
  382. }
  383. protected override void refreshWhileImgChanged()
  384. {
  385. object ShowGrainBoundry;
  386. if (GetParamValue1(ParamKey_displaygrainboundaries, out ShowGrainBoundry))//显示晶界
  387. this.checkBox3_0.Checked = (bool)ShowGrainBoundry;
  388. if (GetParamValue1(ParamKey_displaygrid, out ShowGrainBoundry))//显示网格
  389. this.checkBox4.Checked = (bool)ShowGrainBoundry;
  390. if (GetParamValue1(ParamKey_displaysections, out ShowGrainBoundry))//显示截点
  391. this.checkBox5_0.Checked = (bool)ShowGrainBoundry;
  392. }
  393. /// <summary>
  394. /// 是否显示网格
  395. /// </summary>
  396. /// <param name="sender"></param>
  397. /// <param name="e"></param>
  398. private void checkBox4_CheckedChanged(object sender, EventArgs e)
  399. {
  400. this.documentWorkspace.Refresh();
  401. }
  402. /// <summary>
  403. /// 是否显示截点
  404. /// </summary>
  405. /// <param name="sender"></param>
  406. /// <param name="e"></param>
  407. private void checkBox5_0_CheckedChanged(object sender, EventArgs e)
  408. {
  409. if (!this.checkBox4.Checked)
  410. MessageBox.Show(PdnResources.GetString("Menu.Nogrid.text")+"!");
  411. this.documentWorkspace.Refresh();
  412. }
  413. /// <summary>
  414. /// 是否显示晶界
  415. /// </summary>
  416. /// <param name="sender"></param>
  417. /// <param name="e"></param>
  418. private void checkBox3_0_CheckedChanged(object sender, EventArgs e)
  419. {
  420. if (!bcOriginChecked() && getGrainBoundryChecked() && checkBox3_0.Checked)
  421. {
  422. this.documentWorkspace.PhaseModels[1].choise = true;
  423. }
  424. else
  425. {
  426. this.documentWorkspace.PhaseModels[1].choise = false;
  427. }
  428. this.documentWorkspace.Refresh();
  429. }
  430. /// <summary>
  431. /// 设置截点样式
  432. /// </summary>
  433. /// <param name="sender"></param>
  434. /// <param name="e"></param>
  435. private void button10_Click(object sender, EventArgs e)
  436. {
  437. ShowGrainSurveyPointStyleSettingDialog();
  438. }
  439. /// <summary>
  440. /// 鼠标按下
  441. /// </summary>
  442. /// <param name="drawArea"></param>
  443. /// <param name="e"></param>
  444. protected override void OnMouseDown(object sender, MouseEventArgs e)
  445. {
  446. if (this.documentWorkspace.CompositionSurface == null)
  447. return;
  448. // 换算后的点
  449. PointF point1 = documentWorkspace.GetScalePoint(e.Location);
  450. if (point1.X <= this.documentWorkspace.CompositionSurface.Width
  451. && point1.X >= 0
  452. && point1.Y >= 0
  453. && point1.Y <= this.documentWorkspace.CompositionSurface.Height)
  454. {
  455. RectangleF rectangleF;
  456. // 复合辅助线
  457. int add = GSSClass.GuideClass.getAddOfRStyle(point1, this.comboBox1.SelectedItem, out rectangleF);
  458. if (add == 0 && GSSClass.styleClass.PointKb > 0)
  459. rectangleF = GSSClass.GuideClass.guideModel.RectangleFLine;
  460. //手动添加截点
  461. if (this.documentWorkspace.ActiveTool == Annotation.Enum.DrawToolType.InclusionNoEffect && GSSClass.styleClass.OnMouseDownNext(point1, sender, e))
  462. GSSClass.styleClass.OnMouseDownFirst(point1, rectangleF, GSSClass.standardModel.linePointList, e);
  463. }
  464. if (GSSClass.styleClass.PointKb == 0)
  465. {
  466. //辅助线缩放
  467. GSSClass.GuideClass.OnMouseDown(point1, sender, e);
  468. //辅助线移动
  469. base.OnMouseDown(sender, e);//##
  470. }
  471. ////手动删除截点或取消添加截点
  472. //GSSClass.styleClass.OnMouseDownNext(point1, sender, e);
  473. }
  474. private void AllShow()
  475. {
  476. this.dataGridView2.Rows.Clear();
  477. for (int i = 0; i < this.dataTables.Count; i++)
  478. {
  479. DataGridViewRow dgvr = new DataGridViewRow();
  480. dgvr.Tag = this.dataTables[i].TableName;
  481. foreach (DataGridViewColumn Column in this.dataGridView2.Columns)
  482. {
  483. dgvr.Cells.Add(Column.CellTemplate.Clone() as DataGridViewCell);
  484. }
  485. for (int c = 0; c < this.dataTables[i].Columns.Count; c++)
  486. {
  487. //if (c > 2 && c < 4)
  488. // dgvr.Cells[c].Value = Math.Round((double)Convert.ToDecimal(this.dataTables[i].Rows[0][c]), Convert.ToInt32(this.numericUpDown1_0.Value)).ToString();
  489. //else
  490. dgvr.Cells[c].Value = this.dataTables[i].Rows[0][c].ToString();
  491. }
  492. this.dataGridView2.Rows.Add(dgvr);
  493. }
  494. }
  495. private void button6_0_Click(object sender, EventArgs e)
  496. {
  497. if (this.imageMat != null)
  498. {
  499. //MessageBox.Show(PdnResources.GetString("Menu.ftbuttontoaddainterceptadd.Text")+"!");
  500. GSSClass.styleClass.PointKb = 1;
  501. }
  502. else
  503. {
  504. MessageBox.Show(PdnResources.GetString("Menu.Pleaseselectapicture.text")+"!");
  505. }
  506. }
  507. /// <summary>
  508. /// 1截点添加
  509. /// </summary>
  510. /// <param name="sender"></param>
  511. /// <param name="e"></param>
  512. private void button7_0_Click(object sender, EventArgs e)
  513. {
  514. if (this.imageMat != null)
  515. {
  516. //MessageBox.Show(PdnResources.GetString("Menu.ftbuttontoaddainterceptadd.Text")+"!");
  517. GSSClass.styleClass.PointKb = 2;
  518. }
  519. else
  520. {
  521. MessageBox.Show(PdnResources.GetString("Menu.Pleaseselectapicture.text")+"!");
  522. }
  523. }
  524. private void button8_Click(object sender, EventArgs e)
  525. {
  526. if (this.imageMat != null)
  527. {
  528. //MessageBox.Show(PdnResources.GetString("Menu.ftbuttontoaddainterceptadd.Text")+"!");
  529. GSSClass.styleClass.PointKb = 3;
  530. }
  531. else
  532. {
  533. MessageBox.Show(PdnResources.GetString("Menu.Pleaseselectapicture.text")+"!");
  534. }
  535. }
  536. }
  537. }