Esempio n. 1
0
        private void btnCalibCal_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("是否进行标定计算?", "标定计算", MessageBoxButtons.OKCancel);

            if (result == DialogResult.Cancel)
            {
                return;
            }
            if (tray == null)
            {
                MessageBox.Show("托盘信息为空!");
                return;
            }
            try
            {
                IsWrite = true;
                var ret = TrayFactory.Calibration(PlateKey);
                if (!ret)
                {
                    MessageBox.Show("托盘标定失败!");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("托盘标定失败!" + ex.ToString());
            }
            IsWrite = false;
        }
Esempio n. 2
0
        private void frmMotionCardSetting_Load(object sender, EventArgs e)
        {
            var Keys  = TrayFactory.GetTrayDict.Keys;
            var count = Keys.Count;

            foreach (var key in Keys)
            {
                if (PlateKey == key)
                {
                    tray = TrayFactory.GetTrayFactory(PlateKey);
                    ndnRowXoffset.Value    = (decimal)tray.RowXoffset;
                    ndnRowYoffset.Value    = (decimal)tray.RowYoffset;
                    ndnColumnXoffset.Value = (decimal)tray.ColumnXoffset;
                    ndnColumnYoffset.Value = (decimal)tray.ColumnYoffset;
                    lblPlateID.Text        = PlateKey;
                    lblTrayName.Text       = tray.Name;
                    InitdgvPlatePositionRows();
                    InitTray();
                    tray.SetNumColor(tray.BaseIndex, Color.Blue);
                    tray.SetNumColor(tray.RowIndex, Color.Blue);
                    tray.SetNumColor(tray.ColumnIndex, Color.Blue);
                    tray.updateColor();
                }
                ;
            }
            if (tray == null)
            {
                MessageBox.Show("托盘不存在!");
                this.Close();
            }
            else
            {
                lblJogSpeed.Text = "点动速度:" + tbrJogSpeed.Value.ToString("0.00") + "mm/s";
                m_Xaxis.Speed    = tbrJogSpeed.Value;
                m_Yaxis.Speed    = tbrJogSpeed.Value;
                m_Zaxis.Speed    = tbrJogSpeed.Value;

                timer1.Enabled = true;
            }
        }