Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Alarm Group Filter via Script
PostPosted: Thu Jul 14, 2016 3:52 am 

Joined: Wed Jan 16, 2013 3:18 am
Posts: 13

Offline
Hello there!

I have two (or more) Alarm Groups. Using code from scrap I created a script to filter the Alarm Viewer regarding the Group (button4 & button5). It works but I don't know how to "clear" (button6) the filter, so to display again all the Alarm list.

Can anyone help?

Code:
//--------------------------------------------------------------
// Press F1 to get help about using script.
// To access an object that is not located in the current class, start the call with Globals.
// When using events and timers be cautious not to generate memoryleaks,
// please see the help for more information.
//---------------------------------------------------------------

namespace Neo.ApplicationFramework.Generated
{
    using System.Windows.Forms;
    using System;
    using System.Drawing;
    using Neo.ApplicationFramework.Tools;
    using Neo.ApplicationFramework.Common.Graphics.Logic;
    using Neo.ApplicationFramework.Controls;
    using Neo.ApplicationFramework.Interfaces;
   using System.Collections.Generic;
   
   
    public partial class Screen1
    {
   private List <string> alarmGroup1ToShow;
   private List <string> alarmGroup2ToShow;

      void Screen1_Opened(System.Object sender, System.EventArgs e)
      {
         alarmGroup1ToShow = new List<string>();
         alarmGroup1ToShow.Add("Group1");    
         alarmGroup2ToShow = new List<string>();
         alarmGroup2ToShow.Add("Group2");

      }
      
      void Button4_Click(System.Object sender, System.EventArgs e)
      {
         AlarmViewer.FilterAlarmView(true,false,true,false,alarmGroup1ToShow);
         Button4.Fill = System.Drawing.Color.Red;
         Button5.Fill = System.Drawing.Color.FromArgb(214,227,244);
      }         
      void Button5_Click(System.Object sender, System.EventArgs e)
      {
         AlarmViewer.FilterAlarmView(true,false,true,false,alarmGroup2ToShow);
         Button5.Fill = System.Drawing.Color.Yellow;
         Button4.Fill = System.Drawing.Color.FromArgb(214,227,244);   
      }         
      void Button6_Click(System.Object sender, System.EventArgs e)
      {
         
      }      
         
    }
}

_________________
Best Regards,
Nikos X


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: