Exemplo n.º 1
0
 protected virtual void OnAnimationFinished(NotifyIconState animation)
 {
     if (AnimationFinished != null)
     {
         AnimationFinished(this, animation);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Set the new state. If it is an animation, it starts immediatly
        /// and iterates the animation as defined within the NotifyIconState.AniLoops
        /// property. If it was set to -1, this will be an endless animation.
        /// </summary>
        /// <param name="stateKey"></param>
        /// <returns></returns>
        public NotifyIconState SetState(string stateKey)
        {
            // set the new state
            if (_iconStates.ContainsKey(stateKey))
            {
                _currentState = (NotifyIconState)_iconStates[stateKey];
            }
            else
            {
                _currentState = new NotifyIconState();
            }

            // refresh current display state
            if (_currentState.IsIcon)
            {
                SetIcon();
            }

            SetText();

            return(_currentState);
        }
Exemplo n.º 3
0
 public NotifyIconAnimation(IContainer container, NotifyIconState notifyIconState)
     : this(container)
 {
     _currentState = this.AddState(notifyIconState);
 }
Exemplo n.º 4
0
 public NotifyIconState AddState(NotifyIconState newState)
 {
     _iconStates.Add(newState.Key, newState);
     return(newState);
 }
Exemplo n.º 5
0
 public NotifyIconAnimation(NotifyIconState notifyIconState)
     : this()
 {
     _currentState = this.AddState(notifyIconState);
 }