Example #1
0
        private void btnStopReport_Click(object sender, EventArgs e)
        {
            ThreeStateTreeNode myNode = MainForm.myCarList.tvList.getNodeById(this.sCarID);

            if (myNode != null)
            {
                MainForm.myCarList.tvList.SetSelectedNodes(myNode);
                ThreeStateTreeNode node2 = MainForm.myCarList.tvTrackCar.getNodeById(this.sCarID);
                if (node2 != null)
                {
                    MainForm.myCarList.tvTrackCar.SetSelectedNodes(node2);
                }
                int platalarmType = -1;
                if (this.lblAlermTypeValue.Text.IndexOf("平台偏离路线") >= 0)
                {
                    platalarmType = 0;
                    itmStopReport report2 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType)
                    {
                        Text = "停止报警"
                    };
                    report2.ShowDialog();
                }
                else if (this.lblAlermTypeValue.Text.IndexOf("平台区域") >= 0)
                {
                    platalarmType = 1;
                    itmStopReport report4 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType)
                    {
                        Text = "停止报警"
                    };
                    report4.ShowDialog();
                }
                else if (this.lblAlermTypeValue.Text.IndexOf("平台分路段限速") >= 0)
                {
                    platalarmType = 2;
                    itmStopReport report6 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType)
                    {
                        Text = "停止报警"
                    };
                    report6.ShowDialog();
                }
                else
                {
                    itmStopReport report8 = new itmStopReport(CmdParam.OrderCode.停止报警)
                    {
                        Text = "停止报警"
                    };
                    report8.ShowDialog();
                }
            }
        }
Example #2
0
 private void btnStopReport_Click(object sender, EventArgs e)
 {
     ThreeStateTreeNode myNode = MainForm.myCarList.tvList.getNodeById(this.sCarID);
     if (myNode != null)
     {
         MainForm.myCarList.tvList.SetSelectedNodes(myNode);
         ThreeStateTreeNode node2 = MainForm.myCarList.tvTrackCar.getNodeById(this.sCarID);
         if (node2 != null)
         {
             MainForm.myCarList.tvTrackCar.SetSelectedNodes(node2);
         }
         int platalarmType = -1;
         if (this.lblAlermTypeValue.Text.IndexOf("平台偏离路线") >= 0)
         {
             platalarmType = 0;
             itmStopReport report2 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType) {
                 Text = "停止报警"
             };
             report2.ShowDialog();
         }
         else if (this.lblAlermTypeValue.Text.IndexOf("平台区域") >= 0)
         {
             platalarmType = 1;
             itmStopReport report4 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType) {
                 Text = "停止报警"
             };
             report4.ShowDialog();
         }
         else if (this.lblAlermTypeValue.Text.IndexOf("平台分路段限速") >= 0)
         {
             platalarmType = 2;
             itmStopReport report6 = new itmStopReport(CmdParam.OrderCode.停止报警, platalarmType) {
                 Text = "停止报警"
             };
             report6.ShowDialog();
         }
         else
         {
             itmStopReport report8 = new itmStopReport(CmdParam.OrderCode.停止报警) {
                 Text = "停止报警"
             };
             report8.ShowDialog();
         }
     }
 }