public void Start() { if (!IConfigurationStore.GetByType <WebPageConfig>().EnableThreadPage) { return; } this.Page = IApiPage.Create("Thread CPU Usage", Color.Aqua, IConfigurationStore.GetByType <WebPageConfig>().ThreadPageHandle); var tmr = new System.Timers.Timer(1000) { AutoReset = true }; tmr.Elapsed += Tick; tmr.Start(); }
public void Start() { if (!IConfigurationStore.GetByType <WebPageConfig>().EnableExceptionsPage) { return; } AppDomain.CurrentDomain.FirstChanceException += OnException; this.Page = IApiPage.Create( "Exceptions / second", Color.Red, IConfigurationStore.GetByType <WebPageConfig>().ExceptionsPageHandle); var tmr = new Timer(1000) { AutoReset = true }; tmr.Elapsed += Tick; tmr.Start(); }