예제 #1
0
 protected virtual void OnAnimationFinished(NotifyIconState animation)
 {
     if (AnimationFinished != null)
     {
         AnimationFinished(this, animation);
     }
 }
예제 #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);
        }
예제 #3
0
 public NotifyIconAnimation(IContainer container, NotifyIconState notifyIconState)
     : this(container)
 {
     _currentState = this.AddState(notifyIconState);
 }
예제 #4
0
 public NotifyIconState AddState(NotifyIconState newState)
 {
     _iconStates.Add(newState.Key, newState);
     return(newState);
 }
예제 #5
0
 public NotifyIconAnimation(NotifyIconState notifyIconState)
     : this()
 {
     _currentState = this.AddState(notifyIconState);
 }