Welcome Guest ( Login | Register )

All times are UTC - 7 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Helptextsts/ Events
PostPosted: Fri Nov 27, 2015 4:36 am 

Joined: Tue Oct 20, 2015 7:24 am
Posts: 1

Hello Together
I am new to this forum. Now I am really running into issues.

My enterprise is constantly making its Prodcts better. I now face the challenge to integrate a helptext to the Alarmmessages.

At this point I will Explain Goal and what does work, and then where the problem is:

My enterprise produces 10 different components, then puts them in different arangements and Quantity(0-99) together. The Panel mus be pretty standard, sofar that works well.
Now the Custumers desire is that er is not only a simple alarm like
"Element xyz did not reach endposition"
but in addition to that ( as their staff can be completly untechnical) an other information like
-check if element xyz can move freely
-check if all sensors are attatched to the module and not free hanging
- call maintenance for help

Now that my enterprise exports to any given country like: USA, Germany, Czech Republic, China and so on, everything must be translatable, as most of the staff can only speak their native language.

i have defined a class
   public class DefAlm
      public AlarmItem AlmItm{ get; set; }
      public int grp{ get; set; }
      public int alm{ get; set; }
      public string helpText{get; set;}

Where i get every alarmitem, with the helptext and write it to a list
foreach(AlarmGroup z in this.AlarmGroups )// For each alarmgroup
               int i=0;

               foreach(AlarmItem x in z.AlarmItems )// For Each Alarm Item
                  tempstring=helpText[0].Text; //Set Helptext to "No helptext avalible" as Standard
                  foreach(TextLibTexts help in helpText) //Search heltext for the acual message
                     if((help.belt== grp) && (help.aux==i) )
                  almList.Add(new DefAlm(){ //Define new DefAlm and add it to DefAlm List
                  grp= grp,


And Finally i Add an eventhandler to each alarm element on the list.
         foreach(DefAlm x in almList) //Add eventhandler to  every item and Readout the almList to logfile
            x.AlmItm.AlarmActive+= new EventHandler(AlmActiv) ;   

Until here Everything is fine.
Now is the hard Part:

if an Event goes off i just log what happens
      private void AlmActiv(System.Object sender, System.EventArgs e)
         Globals.Logger.WriteLog("Sender\t"+sender.ToString(), true);

Which returns me following:
Sender [TestFault2 (69)][State: Active][Id: b987d84b-7195-4678-8d9c-103829af13fd][ItemId: d8f19072-4382-4c57-864a-0a9721c93d2a]

i would expec something like the Displayname of the alarm element, which gave out tuhe event, what i find here is the Text of the alarmelement. the(69) is some parameter, which is not always there and not really related to the Position in the List or whatever! How can I now get somthing usefull out of this?
The Testfault2 could be a text that does not mean to be the same Helptext.... Can someone help? i would really be very thankfull!

Greetings MrMaus

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: