void Process_Loaded(object sender, RoutedEventArgs e) { //开始安装 InstallProcess install = new InstallProcess(); install.Start(); }
public static void Main(string[] args) { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; case "export": var exportArgs = new ExportArgs(args); var exportProcess = new ExportProcess(); exportProcess.Execute(exportArgs); break; case "import": var importArgs = new ImportArgs(args); var importProcess = new ImportProcess(); importProcess.Execute(importArgs); break; } }
public InstallPageViewModel() { installProcess = new InstallProcess(); installProcess.OnConsoleNotifyOut += InstallProcess_OnConsoleNotifyOut; installProcess.OnConsoleOut += InstallProcess_OnConsoleOut; installProcess.OnConsoleErrorOut += InstallProcess_OnConsoleOut; installProcess.StartProcess(); }
public static void Main(string[] args) { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; case "export": var exportArgs = new ExportArgs(args); var exportProcess = new ExportProcess(); exportProcess.Execute(exportArgs); break; } }
private void BtnInstallClick(object sender, EventArgs e) { BtnNext_Click(sender, e); this.pnlControl.Enabled = false; var process = pnlMain.Controls.OfType <FrmInstall>().FirstOrDefault(); if (process == null) { return; } isInstalling = true; Global.Log = process; new Thread(() => { var installer = new InstallProcess(this.context, process, this); installer.Install(); this.pnlControl.Enabled = true; this.btnPrev.Enabled = false; this.btnCancel.Enabled = false; isInstalling = false; Thread.CurrentThread.Abort(); }).Start(); }