Page 1 of 1

AlarmViewer - filter by script

Posted: Mon Nov 04, 2013 3:18 am
by Joe
Hi,

Can I set filter to alarm groups in AlarmViewer using the script.

For example, I need -> AlarmGroup1 - set "Enabled" - ON, set "Normal" -OFF ...

Thanks for reply

Regards

Joe

Re: AlarmViewer - filter by script

Posted: Mon Nov 04, 2013 6:55 am
by Edmund
Here is a example with two buttons (show all, show only active).

Code: Select all

    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 AlarmScreen
    {	
		
		private List<string> alarmGroupsToShow;
		
		void AlarmScreen_Opened(System.Object sender, System.EventArgs e)
		{
			alarmGroupsToShow = new List<string>();
			alarmGroupsToShow.Add("Default"); 
		}
		
		
		void btnShowAll_Click(System.Object sender, System.EventArgs e)
		{
			AlarmViewer1.FilterAlarmView(true,true,true,true,alarmGroupsToShow);
		}
		
		void btnOnlyActive_Click(System.Object sender, System.EventArgs e)
		{
			
			AlarmViewer1.FilterAlarmView(true,false,false,false,alarmGroupsToShow); 
		}
	}
}	
Best Regards

Re: AlarmViewer - filter by script

Posted: Thu Jul 27, 2017 5:43 am
by kim
Hi.

I read this and it was helpful to me. I am not so skilled in scripting so I want to ask for some help.

I have two questions:
1. Additional to these functions to filter one group only, I also want a button that enables all groups to be shown, or more than one group. How to do this?
2. What settings does the "true,false, true...." represent? (something about Normal, Ack...)

Thank you,
Kim