private async void UpdateButton_MouseUp(object sender, MouseButtonEventArgs e) { if (PyRevitUpdaterCLI.RevitsAreRunning()) { MessageBox.Show("Close all running instances of Revit please.", PyRevitConsts.AddinFileName); return; } if (!Updated) { UpdateButton.IsIndeterminate = true; UpdateButton.Tag = "updating..."; await Task.Run(() => { PyRevitUpdaterCLI.RunUpdate(ClonePath); }); UpdateButton.IsIndeterminate = false; Updated = true; UpdateButton.Tag = "update completed"; UpdateButton.ToolTip = "click to close"; } else { Close(); } }
private void ApplicationStartup(object sender, StartupEventArgs e) { PyRevitUpdaterCLI.ProcessArguments(e.Args); Environment.Exit(0); }