Author Topic: How to use MessageDisplayByValue IniFileName property  (Read 1853 times)

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
How to use MessageDisplayByValue IniFileName property
« on: October 21, 2015, 10:58:41 AM »
I would like to define my messages for the MessageDisplayByValue  control in a text file.

Does it support individual BackColor for each message?

What is the structure of the file?

is the file to have a .ini or .txt extension?

When specifying the property IniFileName property, do you include the file extension?

Is there a way to export an existing message collection to create the .ini file?

Thanks!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: How to use MessageDisplayByValue IniFileName property
« Reply #1 on: October 21, 2015, 12:54:12 PM »
This is the files format:

1,Motor Overloaded
2,UnderLayer Side Saftey Door Open -OR- Material Choke in Screw Feed
3,UL Carrier Alarm,Red
4,FM Carrier Alarm,Red
5,Poke or Level Alarm
6,Auto Checker Alarm
7,Press Alarm,Red

I usually create them as a .txt file, but I do believe it will also accept any extension. You do have to specify the extension in the IniFileName property

This is the technique I use:

- Right click the AdvancedHMI project in Solution Explorer and select Add->New Item
- From the list select Text file
- Enter the alarms in the file
- With the alarm file selected in Solution Explorer, go to the Properties Window
- Set CopyToOutputDirectory to Copy if Newer
- Select the MessageDisplayByValue and set the IniFileName property to the name of the text file


Unfortunately there is no easy way to transfer existing messages into a Text file.

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: How to use MessageDisplayByValue IniFileName property
« Reply #2 on: October 12, 2018, 01:19:38 PM »
As of v399yBeta12, its latest format:

1, Description go here, [BackgroundColor], [ForegroundColor], [BlinkerBoolean]

This site is also useful to select color:

http://www.flounder.com/csharp_color_table.htm
« Last Edit: October 12, 2018, 01:26:45 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: How to use MessageDisplayByValue IniFileName property
« Reply #3 on: August 31, 2023, 11:41:27 AM »
I just noticed the wiki page does not have the MesssageDisplayByValue.  Would you please add it in. TIA.

https://advancedhmi.com/documentation/index.php/Special:AllPages

===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================