示例#1
0
 private void tabControl_TabePageClosing(object sender, TabPageEventArgs e)
 {
     if (e.ColseTabPage.Text.Equals(GlobalData.Process))
     {
         DlgBox.Show("禁止关闭当前页面.", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         CancelEventArgs e1 = new CancelEventArgs();
         e1.Cancel = true;
         TabPag_Validating(e.ColseTabPage, e1);
         return;
     }
 }
示例#2
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     if (CHDriver_WorkState)
     {
         DialogResult diaR = DlgBox.Show("工单【" + cmbWorkOrder.Text + "】正在生产中,是否暂停生产?.", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
         if (diaR == DialogResult.OK)
         {
             DelegateState.MsgView?.Invoke(ColorHelper.MsgGray, "工单已暂停...");
             DelegateState.CHDriverWorkStateChange?.Invoke(false);
             CHDriver_WorkState = false;
         }
     }
 }
示例#3
0
        /// <summary>
        /// 主窗口关闭处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dr = DlgBox.Show("确定退出本系统吗", "退出系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.No)
            {
                e.Cancel = true;
                return;
            }
            else
            {
                log.OnDisplayLog -= OnDisplayLog;
            }
        }
示例#4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (cmbWorkOrder.SelectedIndex == -1)
            {
                DlgBox.Show("请选择制令单.", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (dgvList.Rows.Count == 0)
            {
                DlgBox.Show("待生产工单数量为0.", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            SendFactory(FunCode.ISR.ToString());
        }