/// /// Icon handling /// /// <summary> /// Updates the NotifyIcon icon and tooltip text /// depending on the current player state. /// </summary> private void UpdateIcon() { Icon icon; String text; // player state if (isIdle) { icon = idleIcon; text = "Idle"; } else if (player.IsMuted) { icon = playingMutedIcon; text = "Playing (muted)"; } else { icon = playingIcon; text = "Playing"; } // separator: text += " - "; // source state: if (source == null) { text += "No stream selected"; } else { text += source.Name; } notifyIcon.Icon = icon; notifyIcon.SetToolTipText(text); }