Exemple #1
0
 void ll_Click(object sender, EventArgs e)
 {
     LinkLabel ll = (LinkLabel)sender;
     if (ll.LinkColor == Color.Red)
     {
         switch (ll.Text)
         {
             case "超时报警":
                 try
                 {
                     froti1.Show();
                 }
                 catch
                 {
                     froti1 = new FrmRealtimeOverTimeInfo(true);
                     froti1.Show();
                 }
                 froti1.Activate();
                 break;
             case "区域报警":
                 try
                 {
                     frtit1.Show();
                 }
                 catch
                 {
                     frtit1 = new RealTimeSpecialWorkTypeTerrialAlarm();
                     frtit1.Show();
                 }
                 frtit1.Activate();
                 break;
             case "分站故障报警":
                 try
                 {
                     frsb1.Show();
                 }
                 catch
                 {
                     frsb1 = new FrmRealtimeStationBreak(true);
                     frsb1.Show();
                 }
                 frsb1.Activate();
                 break;
             case "超员报警":
                 try
                 {
                     frtoe1.Show();
                 }
                 catch
                 {
                     frtoe1 = new FrmRealTimeOverEmp();
                     frtoe1.Show();
                 }
                 frtoe1.Activate();
                 break;
             case "低电量报警":
                 try
                 {
                     frae1.Show();
                 }
                 catch
                 {
                     frae1 = new FrmRealtimeAlarmElectricity();
                     frae1.Show();
                 }
                 frae1.Activate();
                 break;
             case "接收器故障报警":
                 try
                 {
                     frtshb1.Show();
                 }
                 catch
                 {
                     frtshb1 = new FrmRealTimeStaHeadBreak(true);
                     frtshb1.Show();
                 }
                 frtshb1.Activate();
                 break;
             case "工作异常报警":
                 try
                 {
                     frtap.Show();
                 }
                 catch
                 {
                     frtap = new FrmRealTimeAlarmPath();
                     frtap.Show();
                 }
                 break;
             default:
                 break;
         }
     }
 }
        void ll_Click(object sender, EventArgs e)
        {
            LinkLabel ll = (LinkLabel)sender;
            if (ll.LinkColor == Color.Red)
            {
                switch (ll.Text)
                {
                    case "超时报警":
                        
                        if (!Searcher.FindFormByName("FrmRealtimeOverTimeInfo"))
                        {
                            FrmRealtimeOverTimeInfo froti1 = new FrmRealtimeOverTimeInfo(true);
                            OpenForm(froti1);
                        }
                        break;
                    case "区域报警":

                        if (!Searcher.FindFormByName("RealTimeSpecialWorkTypeTerrialAlarm"))
                        {
                            RealTimeSpecialWorkTypeTerrialAlarm frtit1 = new RealTimeSpecialWorkTypeTerrialAlarm();
                            OpenForm(frtit1);
                        }
                        break;
                    case "传输分站故障报警":
                        if (!Searcher.FindFormByName("FrmRealtimeStationBreak"))
                        {
                            FrmRealtimeStationBreak frsb1 = new FrmRealtimeStationBreak(true);
                            OpenForm(frsb1);
                        }
                        break;
                    case "超员报警":
                        if (!Searcher.FindFormByName("FrmRealTimeOverEmp"))
                        {
                            FrmRealTimeOverEmp frtoe1 = new FrmRealTimeOverEmp();
                            OpenForm(frtoe1);
                        }
                        break;
                    case "低电量报警":
                        if (!Searcher.FindFormByName("FrmRealtimeAlarmElectricity"))
                        {
                            FrmRealtimeAlarmElectricity frae1 = new FrmRealtimeAlarmElectricity();
                            OpenForm(frae1);
                        }
                        break;
                    case "读卡分站故障报警":
                        if (!Searcher.FindFormByName("FrmRealTimeStaHeadBreak"))
                        {
                            FrmRealTimeStaHeadBreak frtshb1 = new FrmRealTimeStaHeadBreak(true);
                            OpenForm(frtshb1);
                        }
                        break;
                    case "工作异常报警":
                        if (!Searcher.FindFormByName("FrmRealTimeAlarmPath"))
                        {
                            FrmRealTimeAlarmPath frtap = new FrmRealTimeAlarmPath();
                            OpenForm(frtap);
                        }
                        break;
                    default:
                        break;
                }
            }
        }