MethodCutOffDialog.cs 23 KB

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