版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

67 satır
2.1 KiB

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