Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extensibility using a Simphony Timer.

Status
Not open for further replies.

Evan Camilleri

Programmer
Feb 14, 2018
31
0
6
MT
Is there a way to use a Simphony timer?

There is OpsTimerEvent but I do not know how to set it to fire every 1 minute (for example)
 

You can try with the below. Hope it will work


Code:
[COLOR=#A40000]aTimer = new System.Timers.Timer();
            aTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
            aTimer.Interval = 10000;[/color]

Code:
[COLOR=#4E9A06]
private void OnTimedEvent(object source, System.Timers.ElapsedEventArgs e)
        {
            
            try
            {
                // Perform the required action 
              OpsContext.ShowMessage("OnTimedEvent: Test message");
            }
            catch
            {
            }
        }[/color]
 
No!
OpsContext is not accessible since the Timer runs on a separate thread!

Untitled_zdzw8x.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top