Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AlarmViewer - filter by script
PostPosted: Mon Nov 04, 2013 3:18 am 

Joined: Tue Sep 18, 2012 4:53 am
Posts: 27

Offline
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


 Profile  
 
 Post subject: Re: AlarmViewer - filter by script
PostPosted: Mon Nov 04, 2013 6:55 am 
User avatar

Joined: Thu Nov 29, 2012 2:27 pm
Posts: 92

Offline
Here is a example with two buttons (show all, show only active).

Code:
    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

_________________
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group


 Profile  
 
 Post subject: Re: AlarmViewer - filter by script
PostPosted: Thu Jul 27, 2017 5:43 am 

Joined: Fri Feb 03, 2012 11:38 am
Posts: 8

Offline
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


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

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: