Get Alarm text with name of alarm
Posted: Thu Aug 13, 2015 9:36 am
Hello
Struggling with a problem on how to get the text of an alarm with the name of the alarm.
I got a screen to show info on alarm when pressing request alarm info which works perfectly, but I would like to have the "Text" of the alarm parsed to that screen aswell.
Using a Text Library to handle the alarm info, but would like to have the alarm text handled automaticly when adding new alarms.
Posted my code to show the screen.
Struggling with a problem on how to get the text of an alarm with the name of the alarm.
I got a screen to show info on alarm when pressing request alarm info which works perfectly, but I would like to have the "Text" of the alarm parsed to that screen aswell.
Using a Text Library to handle the alarm info, but would like to have the alarm text handled automaticly when adding new alarms.
Posted my code to show the screen.
Code: Select all
void AlarmViewer_AlarmEventInfoRequested(System.Object sender, Neo.ApplicationFramework.Interfaces.Events.AlarmEventEventArgs e)
{
try
{
int aNumber = Int32.Parse( e.AlarmEvent.AlarmItemDisplayName.Replace("F", ""));
Globals.Tags.AlarmToShow.Value = aNumber;
Globals.scn_AlarmInfo.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}