Ejemplo n.º 1
0
 /// <summary>
 /// "Install app update" button click event handler.
 /// </summary>
 /// <param name="sender">Sender object.</param>
 /// <param name="e">Event arguments.</param>
 private void UpdAppStatus_Click(object sender, EventArgs e)
 {
     if (!WrkChkApp.IsBusy)
     {
         if (UpMan.CheckAppUpdate())
         {
             if (Platform.OS == CurrentPlatform.OSType.Windows)
             {
                 if (InstallBinaryUpdate(UpMan.AppUpdateURL))
                 {
                     Platform.Exit(ReturnCodes.AppUpdatePending);
                 }
             }
             else
             {
                 MessageBox.Show(String.Format(AppStrings.UPD_AppOtherPlatform, Platform.OSFriendlyName), Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             MessageBox.Show(AppStrings.UPD_LatestInstalled, Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show(AppStrings.DB_WrkInProgress, Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }