/// <summary>Starts the window of the application, and then runs the provided installer program.</summary> /// <param name="installer">The installer program to run..</param> private static void StartVisualApp(UpdateInstaller installer, bool showInstallationWindow, int timeoutAfterSuccessfullInstallation) { if (null == app) { app = new System.Windows.Application(); } if (null == mainWindow) { mainWindow = new InstallerMainWindow(showInstallationWindow, timeoutAfterSuccessfullInstallation) { _installer = installer }; app.Run(mainWindow); } }
/// <summary>Starts the window of the application, and then presents the provided error message message.</summary> /// <param name="eventName">Name of the event that is used to signal to Altaxo that Altaxo should be stopped.</param> /// <param name="message">The error message to present.</param> private static void StartVisualAppWithErrorMessage(string eventName, string message) { if (null != eventName) { UpdateInstaller.SetEvent(eventName); // Altaxo is waiting for this event to finish itself } if (null == app) { app = new System.Windows.Application(); } if (null == mainWindow) { mainWindow = new InstallerMainWindow(true, int.MaxValue); mainWindow.SetErrorMessage(message); app.Run(mainWindow); } else { mainWindow.SetErrorMessage(message); } }