Esempio n. 1
0
        private void PlatManger_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dr = MessageBox.Show("关闭页面测试将会终止,是否关闭",
                                              "系统提示!",
                                              MessageBoxButtons.OKCancel,
                                              MessageBoxIcon.Question,
                                              MessageBoxDefaultButton.Button1,
                                              MessageBoxOptions.DefaultDesktopOnly);

            if (dr == DialogResult.OK)
            {
                CommonFunction.myServer.Stop();
                CommonFunction.flag_listener = false;
                CommonFunction.frmWelcome.Show();
                if (der != null)
                {
                    der.Close();
                }
                //未写完,需要考虑测试表的状态
            }
            else
            {
                e.Cancel = true;
            }
        }
Esempio n. 2
0
 private void DGV_result_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (DGV_result.Columns[e.ColumnIndex].Name == "MeterDetil")
     {
         if (der != null)
         {
             der.Close();
         }
         string fla = "";
         fla += this.DGV_result.Rows[e.RowIndex].Cells["MeterChuState"].Value.ToString().Equals("不测") ? "5" : "A";
         fla += this.DGV_result.Rows[e.RowIndex].Cells["MeterIcState"].Value.ToString().Equals("不测") ? "5" : "A";
         fla += this.DGV_result.Rows[e.RowIndex].Cells["MeterComState"].Value.ToString().Equals("不测") ? "5" : "A";
         fla += this.DGV_result.Rows[e.RowIndex].Cells["MeterZhongState"].Value.ToString().Equals("不测") ? "5" : "A";
         string id   = this.DGV_result.Rows[e.RowIndex].Cells[0].Value.ToString();
         string ever = this.DGV_result.Rows[e.RowIndex].Cells["MeterEvery"].Value.ToString();
         der = new DetailResult(id, 6, ever, fla);
         der.Show();
     }
 }