RadioDld.Main.UpdateTrayStatus C# (CSharp) Method

UpdateTrayStatus() private method

private UpdateTrayStatus ( bool active ) : void
active bool
return void
        private void UpdateTrayStatus(bool active)
        {
            if (OsUtils.WinSevenOrLater())
            {
                if (Model.Download.CountErrored() > 0)
                {
                    this.tbarNotif.SetOverlayIcon(this, Properties.Resources.overlay_error, "Error");
                    this.tbarNotif.SetThumbnailTooltip(this, this.Text + ": Error");
                }
                else
                {
                    if (active)
                    {
                        this.tbarNotif.SetOverlayIcon(this, Properties.Resources.overlay_downloading, "Downloading");
                        this.tbarNotif.SetThumbnailTooltip(this, this.Text + ": Downloading");
                    }
                    else
                    {
                        this.tbarNotif.SetOverlayIcon(this, null, string.Empty);
                        this.tbarNotif.SetThumbnailTooltip(this, null);
                    }
                }
            }

            if (this.NotifyIcon.Visible)
            {
                if (Model.Download.CountErrored() > 0)
                {
                    this.NotifyIcon.Icon = Properties.Resources.icon_error;
                    this.NotifyIcon.Text = this.Text + ": Error";
                }
                else
                {
                    if (active)
                    {
                        this.NotifyIcon.Icon = Properties.Resources.icon_working;
                        this.NotifyIcon.Text = this.Text + ": Downloading";
                    }
                    else
                    {
                        this.NotifyIcon.Icon = Properties.Resources.icon_main;
                        this.NotifyIcon.Text = this.Text;
                    }
                }
            }
        }
Main