Holds all necessary information for the event that the update status of an application changed.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        private static void updater_StatusChanged(object sender, Updater.JobStatusChangedEventArgs e)
        {
            if (e.NewStatus == Updater.Status.Downloading)
            {
                // No status of interest
                return;
            }

            string status = e.ApplicationJob.Name + ": ";

            switch (e.NewStatus)
            {
            case Updater.Status.Failure:
                status += "Failed.";
                break;

            case Updater.Status.NoUpdate:
                status += "No update available.";
                break;

            case Updater.Status.UpdateSuccessful:
                status += "Update successful.";
                break;
            }

            Console.WriteLine(status);

            if (m_Icon != null)
            {
                m_Icon.ShowBalloonTip(2000, "Ketarin", status, (e.NewStatus == Updater.Status.Failure ? ToolTipIcon.Error : ToolTipIcon.Info));
            }
        }
Exemplo n.º 2
0
        private void m_Updater_StatusChanged(object sender, Updater.JobStatusChangedEventArgs e)
        {
            this.BeginInvoke((MethodInvoker) delegate() {
                olvJobs.RefreshObject(e.ApplicationJob);
                int index = olvJobs.IndexOf(e.ApplicationJob);
                if (index >= 0 && mnuAutoScroll.Checked)
                {
                    olvJobs.EnsureVisible(index);
                }

                UpdateNumByStatus();

                // Icon text length limited to 64 chars
                string text = "Currently working on: " + e.ApplicationJob.Name;
                if (text.Length >= 64)
                {
                    text = text.Substring(0, 60) + "...";
                }
                ntiTrayIcon.Text = text;
            });
        }