/// <summary> /// Recreates the monitor from the latest settings. /// </summary> public void RestartMonitor() { try { Settings = SettingsControl.GetSettings(); if (MonitorControl != null) { if (MonitorControl.WebMonitor != null) { MonitorControl.WebMonitor.CancelAsync(); } if (MonitorControl.PackageMonitor != null) { MonitorControl.PackageMonitor.CancelAsync(); } } MonitorControl = new MonitorControl(Settings); statusIndicator.Value = 0; statusLabel.Text = "Mobu Web Service Status: Waiting..."; flowHostedPackages.Controls.Clear(); } catch (Exception e) { LoggingControl.Log("Error while refreshing/recreating manager.", e); } }
/// <summary> /// Default constructor for package monitor. /// </summary> /// <param name="ctrMonitor">Reference to parent monitor control class.</param> public PackageMonitor(MonitorControl ctrMonitor, MobuWsClient webService) { this.monitorControl = ctrMonitor; WorkerSupportsCancellation = true; RunWorkerAsync(); }
/// <summary> /// Default constructor for web monitor. /// </summary> /// <param name="ctrMonitor">Reference to parent monitor control class.</param> public WebMonitor(MonitorControl ctrMonitor) { this.monitorControl = ctrMonitor; WorkerSupportsCancellation = true; RunWorkerAsync(); }