public void Finish(AppWorkspace appWorkspace) { // Assumes we are running in the main UI thread if (this.finishing) { return; } try { if (this.haveFinished) { throw new ApplicationException("already called Finish()"); } this.finishing = true; this.haveFinished = true; // Verify the update's signature bool verified = Security.VerifySignedFile(StateMachine.UIContext, this.installerPath, true, false); CloseAllWorkspacesAction cawa = new CloseAllWorkspacesAction(); appWorkspace.PerformAction(cawa); if (verified && !cawa.Cancelled) { // we're in the clear, launch the update! Settings.CurrentUser.SetString(PdnSettings.UpdateMsiFileName, this.installerPath); if (0 == string.Compare(Path.GetExtension(this.installerPath), ".exe", true)) { const string arguments = "/skipConfig"; Shell.Execute(appWorkspace, this.installerPath, arguments, true, Shell.ExecuteWaitType.RelaunchPdnOnExit); Startup.CloseApplication(); } else { } } else { try { File.Delete(this.installerPath); } catch (Exception) { } } } finally { this.finishing = false; } }
private void MenuHelpSendFeedback_Click(object sender, EventArgs e) { AppWorkspace.PerformAction(new SendFeedbackAction()); }
private void ClearList_Click(object sender, EventArgs e) { AppWorkspace.PerformAction(new ClearMruListAction()); }
private void MenuFileAcquireFromScannerOrCamera_Click(object sender, System.EventArgs e) { AppWorkspace.PerformAction(new AcquireFromScannerOrCameraAction()); }
private void MenuFileNew_Click(object sender, System.EventArgs e) { AppWorkspace.PerformAction(new NewImageAction()); }
private void MenuFileOpen_Click(object sender, System.EventArgs e) { AppWorkspace.PerformAction(new OpenFileAction()); }
private void MenuEditPasteInToNewImage_Click(object sender, EventArgs e) { AppWorkspace.PerformAction(new PasteInToNewImageAction()); }