public void Start() { Log.Info("MiniDisplay.Start(): called"); Log.Info("MiniDisplay.Start(): {0}", MiniDisplayHelper.Plugin_Version); Log.Info("MiniDisplay.Start(): plugin starting..."); if (!File.Exists(Config.GetFile(Config.Dir.Config, "MiniDisplay.xml"))) { Log.Info("MiniDisplay.Start(): plugin not configured... Unable to start"); } else { MiniDisplayHelper.MPStatus = new SystemStatus(); MiniDisplayHelper.InitSystemStatus(ref MiniDisplayHelper.MPStatus); this.GetTVSource(); if (Settings.Instance.ShowPropertyBrowser) { lock (MiniDisplayHelper.PropertyBrowserMutex) { Log.Info("MiniDisplay.Start(): opening PropertyBrowser."); this.browser = new PropertyBrowser(); this.browser.FormClosing += new FormClosingEventHandler(this.browser_Closing); this.browser.Show(); MiniDisplayHelper._PropertyBrowserAvailable = true; } } this.DoStart(); Log.Info("MiniDisplay.Start(): completed"); } }
private void browser_Closing(object sender, FormClosingEventArgs e) { if (Settings.Instance.ExtensiveLogging) { Log.Info("MiniDisplay.browser_Closing(): PropertyBrowser is closing."); } this.browser = null; }
public void Stop() { Settings.Instance.LogInfo("MiniDisplay.Stop(): called"); Settings.Instance.LogDebug("MiniDisplay: Plugin is being stopped."); MiniDisplayHelper._PropertyBrowserAvailable = false; SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(this.SystemEvents_PowerModeChanged); this.DoStop(); if (this.browser != null) { Log.Info("MiniDisplay.Stop(): closing PropertyBrowser."); this.browser.Close(); this.browser = null; } if (this.display != null) { this.display.Dispose(); this.display = null; } Log.Info("MiniDisplay.Stop(): completed"); }
private void browser_Closing(object sender, FormClosingEventArgs e) { Settings.Instance.LogInfo("MiniDisplay.browser_Closing(): PropertyBrowser is closing."); this.browser = null; }