Exemple #1
0
 private void JovoUpdateWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if ((string)e.Result == "UPDATE")
     {
         if (!Convert.ToBoolean(Jovo.Default["Jovo_Automatic_Updates"]))
         {
             utility.LogEvent("Update Notification Shown");
             formNotification = new formNotification("Jovo Update Available", "Click to Install", 0, true, utility);
             DialogResult dr = formNotification.ShowDialog();
             if (dr == DialogResult.OK)
             {
                 utility.LogEvent("Processing Update - Killing Jovo and Starting Jovo_Updater @ " + Jovo.Default.Jovo_Updater_Local_Path, true);
                 icon.Visible = false;
                 module.DoJovoUpdate(Jovo.Default.Jovo_Updater_Local_Path);
             }
         }
         else
         {
             utility.LogEvent("Processing Update - Killing Jovo and Starting Jovo_Updater @ " + Jovo.Default.Jovo_Updater_Local_Path, true);
             icon.Visible = false;
             module.DoJovoUpdate(Jovo.Default.Jovo_Updater_Local_Path);
         }
     }
     else
     {
         JovoUpdateWorker.RunWorkerAsync();
     }
 }
Exemple #2
0
        private void UpdateWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            NotificationData data = (NotificationData)e.UserState;

            if (data.Method == "Show")
            {
                formNotification = new formNotification(data.Title, data.Text, data.Timeout, false, utility);
                formNotification.Show();
            }
            else
            {
                try
                {
                    formNotification.Hide();
                }
                catch (Exception) { }
            }
        }