コード例 #1
0
        public void SetState(TrayIconState state)
        {
            _state = state;
            switch (state)
            {
            case TrayIconState.Disabled:
                _setIcon(Properties.Resources.InactiveTrayIcon);
                break;

            case TrayIconState.Message:
                _setIcon(Properties.Resources.MessageTrayIcon);
                break;

            case TrayIconState.NotificationOff:
                _setIcon(Properties.Resources.NotifyOffTrayIcon);
                break;

            default:
                _setIcon(Properties.Resources.TrayIcon);
                break;
            }
        }
コード例 #2
0
        public void SetIconState(TrayIconState state)
        {
            State = state;

            switch (State)
            {
            case TrayIconState.LoginScreen:
                trayContext.MenuItems.Add(mnuAdvanced);
                SetIconResource(Resources.icon_bw);
                _stopActivityCheckThread = true;
                break;

            case TrayIconState.LoggedIn:
                SetIconResource(Resources.icon);
                trayContext.MenuItems.Remove(mnuAdvanced);
                _stopActivityCheckThread = true;
                break;

            case TrayIconState.AnimateIcon:
                StartActivityChecker();
                break;
            }
        }