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: Select all
//--------------------------------------------------------------
// 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)
{
}
}
}