示例#1
0
 /// <summary>
 /// 终止
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BT_Abort_Click(object sender, EventArgs e)
 {
     Frm_Monitor frm = new Frm_Monitor(10);
     frm.ShowDialog();
     CB_TotalAlarm.Focus();
     // PB_R.GotFocus();
 }
示例#2
0
        private void BT_Clear_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("清零前请务必确认垛区无料盒!\n确定需要清零吗?", "垛区清零", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
            {
                return;
            }

            Frm_Monitor frm = new Frm_Monitor(12);
            frm.ShowDialog();
            CB_TotalAlarm.Focus();
        }
示例#3
0
        /// <summary>
        /// 暂停按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BT_Hold_Click(object sender, EventArgs e)
        {
            //if (PublicPunc.WriteSoap("nStateCmd", 3) && PublicPunc.WriteDeviceSoap("nDeviceStateCmd", 3))
            //{
            //    MessageBox.Show("设备已暂停");
            //}
            //else
            //{
            //    MessageBox.Show("设备启动暂停");

            //}
            //if ()
            //{
            //}

            if (PublicPunc._dInHold)
            {
                Frm_Monitor frm = new Frm_Monitor(5);
                frm.ShowDialog();
                BT_Restting.Focus();
                return;
            }
            if (BT_Hold.Text == "暂停")
            {
                Frm_Monitor frm = new Frm_Monitor(5);
                frm.ShowDialog();
                CB_TotalAlarm.Focus();
                return;
            }
            else
            {
                this.BT_UnHold_Click(this, null);
            }

            //PB_R.GotFocus();
        }
示例#4
0
 /// <summary>
 /// 继续
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BT_UnHold_Click(object sender, EventArgs e)
 {
     Frm_Monitor frm = new Frm_Monitor(7);
     frm.ShowDialog();
     CB_TotalAlarm.Focus();
     CB_TotalAlarm.Focus();
 }
示例#5
0
        /// <summary>
        /// 停止按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BT_Stop_Click(object sender, EventArgs e)
        {
            //if (PublicPunc.WriteSoap("nStateCmd", 5) && PublicPunc.WriteDeviceSoap("nDeviceStateCmd", 5))
            //{
            //    MessageBox.Show("设备已停止");
            //}
            //else
            //{
            //    MessageBox.Show("设备停止异常");

            //}

            if (PublicPunc._dInStop == false && PublicPunc._bPalletFull[2] == false)
            {

                if (MessageBox.Show("确定需要停止吗?", "停止", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
                {
                    return;
                }

            }

            try
            {
                Frm_Monitor frm = new Frm_Monitor(8);

                frm.ShowDialog();
                CB_TotalAlarm.Focus();
            }
            catch
            {
            }
        }
示例#6
0
        /// <summary>
        /// 开始按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BT_Start_Click(object sender, EventArgs e)
        {
            //if (PublicPunc.WriteSoap("nStateCmd", 1)&&PublicPunc.WriteDeviceSoap("nDeviceStateCmd",1))
            //{
            //    MessageBox.Show("设备已启动");
            //}
            //else
            //{
            //    MessageBox.Show("设备启动异常");

            //}
            //if (MessageBox.Show("确定需要开始吗?", "开始", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
            //{
            //    return;
            //}
            Frm_Monitor frm = new Frm_Monitor(2);
            frm.ShowDialog();
            CB_TotalAlarm.Focus();
        }
示例#7
0
        /// <summary>
        /// 重设按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BT_Reset_Click(object sender, EventArgs e)
        {
            //if (PublicPunc.WriteSoap("nStateCmd", 2) && PublicPunc.WriteDeviceSoap("nDeviceStateCmd", 2))
            //{
            //    MessageBox.Show("设备已重设");
            //}
            //else
            //{
            //    MessageBox.Show("设备重设异常");

            //}
            if (!PublicPunc._dInReset)
            {

                if (MessageBox.Show("确定需要复位吗?", "复位", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
                {
                    return;
                }

            }
            PublicPunc.Recipe[0] = RD_C.Checked;
            PublicPunc.Recipe[1] = RD_L.Checked;
            Frm_Monitor frm = new Frm_Monitor(4);
            frm.ShowDialog();
            CB_TotalAlarm.Focus();
        }
示例#8
0
 private void BT_Recipe_Click(object sender, EventArgs e)
 {
     PublicPunc.Recipe[0] = RD_C.Checked;
     PublicPunc.Recipe[1] = RD_L.Checked;
     int i = (PublicPunc.Recipe[0] ? 1 : 0) * 2 + (PublicPunc.Recipe[1] ? 1 : 0);
     string[] Str = new string[] { "停止料斗", "方", "开启料斗" };
     if (MessageBox.Show("产品确定要设置为" + Str[i] + "吗", "产品", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
     {
         return;
     }
     Frm_Monitor frm = new Frm_Monitor(11);
     frm.ShowDialog();
     CB_TotalAlarm.Focus();
 }