public BtfUpdateAcceptWindow(string applicationName, BtfUpdateXml updateInfo) { InitializeComponent(); Title = applicationName + " - Update Avilable"; lblNewVersion.Text = $"New Version: {updateInfo.Version}"; }
private static void bgWorker_DoWork(object sender, DoWorkEventArgs e) { if (!BtfUpdateXml.ExistsOnServer(UpdateXmlLocation)) { e.Cancel = true; } else { e.Result = BtfUpdateXml.Parse(UpdateXmlLocation, ApplicationId); } }
private void DownloadUpdate(BtfUpdateXml update) { var form = new BtfUpdateDownloadWindow(update.Uri); var showDialog = form.ShowDialog(); var result = showDialog != null && (bool)showDialog; if (!result) { return; } var currentPath = ApplicationAssembly.Location; var newPath = Path.GetDirectoryName(currentPath) + "\\" + update.FileName; UpdateApplication(form.TempFilePath, currentPath, newPath, update.LaunchArgs); Environment.Exit(0); }