Example #1
0
        private void BT_TrajDelete_Click(object sender, EventArgs e)
        {
            if (gv.GetFocusedDataSourceRowIndex() < 0 || gv.RowCount < 1)
            {
                MessageBox.Show("没有路径");
                return;
            }
            //2013.11.19
            //添加批处理删除路径

            Batch_DeleteTraj frmChoose = new Batch_DeleteTraj(CBE_RecipeName.EditValue.ToString(), gv.GetSelectedRows()[0]);

            frmChoose.ShowDialog();
            if (TxtData.PublicData.DeleteTrajIndex == null)
            {
                return;
            }



            if (MessageBox.Show("确定需要删除路径吗?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
            {
                return;
            }
            TxtData.PublicData.ErrorCode = 0;
            OperIndex = 4;
            System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(PollImport));
            Frm_Wait frm = new Frm_Wait(CBE_RecipeName.EditValue.ToString(), false);

            frm.ShowDialog();
            CBE_RecipeName_TextChanged(this, null);
        }
Example #2
0
        private void BT_TrajDelete_Click(object sender, EventArgs e)
        {
            if (gv.GetFocusedDataSourceRowIndex() < 0 || gv.RowCount < 1)
            {
                MessageBox.Show("没有路径");
                return;
            }
            //2013.11.19
            //添加批处理删除路径

            Batch_DeleteTraj frmChoose = new Batch_DeleteTraj(CBE_RecipeName.EditValue.ToString(), gv.GetSelectedRows()[0]);
            frmChoose.ShowDialog();
            if (TxtData.PublicData.DeleteTrajIndex==null)
            {
                return;
            }

            if (MessageBox.Show("确定需要删除路径吗?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
            {
                return;
            }
            TxtData.PublicData.ErrorCode = 0;
            OperIndex = 4;
            System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(PollImport));
            Frm_Wait frm = new Frm_Wait(CBE_RecipeName.EditValue.ToString(), false);
            frm.ShowDialog();
            CBE_RecipeName_TextChanged(this, null);
        }