版博士V2.0程序
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

65 rader
2.0 KiB

  1. using MaiMuAOI.SysCtrl;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. namespace MaiMuAOI.SysUI.SysSet
  12. {
  13. public partial class SysPointsFrm : Form
  14. {
  15. public SysPointsFrm()
  16. {
  17. InitializeComponent();
  18. UIStyle.SetUIStyle(this);
  19. this.uiTitel1.FatherForm = this;
  20. }
  21. private void InitUI()
  22. {
  23. numAxis0_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_X1;
  24. numAxis1_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_X2;
  25. numAxis2_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_Y;
  26. numAxis3_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_Z;
  27. numHeightTime.Value = ConfMgr.Instance.HeightDoWait;
  28. numPdtTime.Value = ConfMgr.Instance.ProductDoWait;
  29. }
  30. private void SysPointsFrm_Load(object sender, EventArgs e)
  31. {
  32. InitUI();
  33. }
  34. private void tsbtnExit_Click(object sender, EventArgs e)
  35. {
  36. this.Close();
  37. }
  38. private void tsbtnSave_Click(object sender, EventArgs e)
  39. {
  40. double x1 = (double)numAxis0_InitPT.Value;
  41. double x2 = (double)numAxis1_InitPT.Value;
  42. double y = (double)numAxis2_InitPT.Value;
  43. double z = (double)numAxis3_InitPT.Value;
  44. int ht = (int)numHeightTime.Value;
  45. int pt = (int)numPdtTime.Value;
  46. try
  47. {
  48. ConfMgr.Instance.WritePointsAndTime(x1, x2, y, z, ht, pt);
  49. MessageBox.Show("保存成功", "保存", MessageBoxButtons.OK, MessageBoxIcon.Information);
  50. }
  51. catch
  52. {
  53. MessageBox.Show("保存失败!", "保存", MessageBoxButtons.OK, MessageBoxIcon.Error);
  54. }
  55. }
  56. }
  57. }