Example #1
0
        public BtfUpdateAcceptWindow(string applicationName, BtfUpdateXml updateInfo)
        {
            InitializeComponent();

            Title = applicationName + " - Update Avilable";
            lblNewVersion.Text = $"New Version: {updateInfo.Version}";
        }
Example #2
0
 private static void bgWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     if (!BtfUpdateXml.ExistsOnServer(UpdateXmlLocation))
     {
         e.Cancel = true;
     }
     else
     {
         e.Result = BtfUpdateXml.Parse(UpdateXmlLocation, ApplicationId);
     }
 }
Example #3
0
        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);
        }