Exemplo n.º 1
0
 //**************************************************************
 // AppUpdater Constructor
 //**************************************************************
 public AppDownloader(AppUpdater appMan)
 {
     AppMan = appMan;
     Log = new UpdateLog();
     UpdateEventArgs = new UpdateCompleteEventArgs();
     ConnStrengthEventArgs = new ConnectionStrengthChangeEventArgs();
 }
Exemplo n.º 2
0
        //**************************************************************
        // OnDownloaderComplete()
        //**************************************************************
        private void OnDownloaderComplete(object sender, UpdateCompleteEventArgs args)
        {
            if (OnUpdateComplete != null)
            {
                foreach (UpdateCompleteEventHandler UC in  OnUpdateComplete.GetInvocationList())
                {
                    EventControl.BeginInvoke(UC, new object[] { sender, args });
                }
            }

            EventControl.BeginInvoke(new UpdateCompleteEventHandler(UpdateCompleteOps), new object[] { sender, args });
        }
Exemplo n.º 3
0
        //**************************************************************
        // UpdateCompleteOps()
        //**************************************************************
        private void UpdateCompleteOps(object sender, UpdateCompleteEventArgs args)
        {
            if (ShowDefaultUI)
            {
                if (args.UpdateSucceeded)
                {
                    UpdateForm F = new UpdateForm();

                    if (F.ShowDialog() == DialogResult.Yes)
                    {
                        RestartApp();
                    }
                }
                else
                {
                    string ErrorMessage;
                    ErrorMessage = "The auto-update of this application failed with the following error message:  \r\n\r\n"
                                   + args.ErrorMessage + "\r\n\r\n"
                                   + "To correct this problem, try rebooting the computer & re-launching this application.";
                    MessageBox.Show(ErrorMessage, "Application Update Failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
Exemplo n.º 4
0
        //**************************************************************
        // UpdateCompleteOps()
        //**************************************************************
        private void UpdateCompleteOps(object sender, UpdateCompleteEventArgs args)
        {
            if (ShowDefaultUI)
            {
                if (args.UpdateSucceeded)
                {
                    UpdateForm F = new UpdateForm();

                    if (F.ShowDialog()==DialogResult.Yes)
                        RestartApp();
                }
                else
                {
                    string ErrorMessage;
                    ErrorMessage = "The auto-update of this application failed with the following error message:  \r\n\r\n"
                        + args.ErrorMessage + "\r\n\r\n"
                        + "To correct this problem, try connecting to a high-speed network or re-launching this application.";
                    MessageBox.Show(ErrorMessage,"Application Update Failed",MessageBoxButtons.OK,MessageBoxIcon.Warning);
                }
            }
        }
Exemplo n.º 5
0
        //**************************************************************
        // OnDownloaderComplete()
        //**************************************************************
        private void OnDownloaderComplete(object sender, UpdateCompleteEventArgs args)
        {
            if (OnUpdateComplete != null)
            {
                foreach ( UpdateCompleteEventHandler UC in  OnUpdateComplete.GetInvocationList())
                {
                    EventControl.BeginInvoke(UC,new object[] {sender, args});
                }
            }

            EventControl.BeginInvoke(new UpdateCompleteEventHandler(UpdateCompleteOps),new object[] {sender, args});
        }
Exemplo n.º 6
0
 //**************************************************************
 // AppUpdater Constructor
 //**************************************************************
 public AppDownloader(AppUpdater appMan)
 {
     AppMan          = appMan;
     Log             = new UpdateLog();
     UpdateEventArgs = new UpdateCompleteEventArgs();
 }