Author Topic: Message Handler  (Read 4783 times)

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Message Handler
« on: June 15, 2019, 08:48:19 AM »
Archie;

I cannot remember how the Message Handler works. I know I need to enter the SMPT info, but what calls the message handler itself. Example, I have a button called send message. How does that run the message handler. Also there is a variable in the property called Value. Is that the # in the emailer that will be used? Example 5 would use the fifth line in the file which has the number of the person to email, the time to wait, the number of the second person to email, the time to wait, and the number of the third person to email.

Thanks,
Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #1 on: June 15, 2019, 10:33:04 AM »
The value indicates the message number and a change in value will initiate sending an email as defined in the AlarmToEmail.txt

The first digit in AlarmToEmail.txt indicates the message number

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #2 on: June 15, 2019, 12:44:42 PM »
Archie;

I assume the following is what you mean by changing the value. Keep in mind it starts with 0
MessageHandler1.Value = 1

It does not work. We tested MessageHandlerPLC I don't remember if we tested MessageHandler.

I have tried sending from three different email servers including yours.

Any more ideas?

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #3 on: June 15, 2019, 01:06:25 PM »
- Set EnableEventLogging to True
- Run the Application
- Post the contents of ErrorLog.txt and EventLog.txt

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: *!*#@**!!! VS
« Reply #4 on: June 15, 2019, 01:26:30 PM »
VS SUCKS!!!!
Why do they think they are better at deciding when and what to save. They Crashed another form. If I was able to save it when I wanted to and not have to worry about them overwritting I could simply go back to the last copy and start over without having to redesign the entire form. How %&*#@
stupid.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #5 on: June 15, 2019, 01:39:10 PM »
Any time you run the application Visual Studio will save all the files, so you will at least have up until the last time you ran the application.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: *&*%#@ VS
« Reply #6 on: June 15, 2019, 01:40:11 PM »
Now I have a blank form. On this page is supposed to be 48 radio buttons. if I try to load a radio button from the tool box it labels it radio button 49. How can I delete the form to get rid everything associated with the form and start over?

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #7 on: June 15, 2019, 01:47:00 PM »
- Windows -> Close All Documents
- Close Visual Studio
- Re-open the project in VS
- Build->Rebuild Solution
- In Solution Explorer double click the form you want to open

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS SUCKS
« Reply #8 on: June 15, 2019, 02:10:21 PM »
I did one better I rebooted restarted VS and loaded operator reports. Blank Screen. The code is there yet but the controls are not on the screen.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #9 on: June 15, 2019, 02:27:47 PM »
With VS 2019, it is important to close all document because it has a startup bug when a design view is open.

In VS2019, "Reopen documents on solution load" is actually a good option to uncheck (Found in Tools->Options->Projects and Solutions):

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #10 on: June 15, 2019, 02:56:57 PM »
How do I now get rid of that form to start over.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #11 on: June 15, 2019, 03:04:06 PM »
If you are sure you want to completely delete it with no recovery possible, then right click it in Solution Explorer and select Delete

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #12 on: June 15, 2019, 03:26:54 PM »
I did as you suggested now I have a copy of the correct form in the second solution. But again I cannot right click and click use existing as the form operator reports.vb[Design] or any form with [Design] are not found. In other words how do I get that back to the first solution that has the corrupted designer form?

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #13 on: June 15, 2019, 03:30:07 PM »
In the second solution in Solution Explorer, right click AdvancedHMI project and select Open Folder in File Explorer.
Do you then see these 2 files?

OperatorReports.designer.vb
OperatorReports.vb

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #14 on: June 15, 2019, 03:35:38 PM »
yes