protected override void OnStartup(StartupEventArgs e) { PlasmaTools.Logger.DebugFormat("Starting up Sun.Plasma"); base.OnStartup(e); PlasmaTrayIcon.InitializeTrayIcon(); // Set static property to store the startup argument if (e.Args.Length == 1 && e.Args[0] == "UpdateSelfUpdater") { UpdateSelfUpdater = true; } else { UpdateSelfUpdater = false; } // Start application using the correct window if (UpdateSelfUpdater) { PlasmaTools.Logger.InfoFormat("Application was started with the \"UpdateSelfUpdater\" parameter. Updating SelfUpdater."); var window = new UpdateSelfUpdater(); window.Show(); } else { var window = new CheckForUpdates(); window.Show(); } }
protected override void OnExit(ExitEventArgs e) { PlasmaTools.Logger.DebugFormat("Exiting Sun.Plasma"); base.OnExit(e); PlasmaTrayIcon.Dispose(); }