|
- using MaiMuAOI.SysCtrl;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
-
- namespace MaiMuAOI.SysUI.SysSet
- {
- public partial class SysPointsFrm : Form
- {
- public SysPointsFrm()
- {
- InitializeComponent();
- UIStyle.SetUIStyle(this);
- this.uiTitel1.FatherForm = this;
- }
-
- private void InitUI()
- {
- numAxis0_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_X1;
- numAxis1_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_X2;
- numAxis2_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_Y;
- numAxis3_InitPT.Value = (decimal)ConfMgr.Instance.LoadPoint_Z;
-
- numHeightTime.Value = ConfMgr.Instance.HeightDoWait;
- numPdtTime.Value = ConfMgr.Instance.ProductDoWait;
- }
- private void SysPointsFrm_Load(object sender, EventArgs e)
- {
- InitUI();
- }
-
- private void tsbtnExit_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void tsbtnSave_Click(object sender, EventArgs e)
- {
- double x1 = (double)numAxis0_InitPT.Value;
- double x2 = (double)numAxis1_InitPT.Value;
- double y = (double)numAxis2_InitPT.Value;
- double z = (double)numAxis3_InitPT.Value;
-
- int ht = (int)numHeightTime.Value;
- int pt = (int)numPdtTime.Value;
- try
- {
- ConfMgr.Instance.WritePointsAndTime(x1, x2, y, z, ht, pt);
- MessageBox.Show("保存成功", "保存", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- catch
- {
- MessageBox.Show("保存失败!", "保存", MessageBoxButtons.OK, MessageBoxIcon.Error);
-
- }
- }
- }
- }
|