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