Exemple #1
0
        //--------------------------------------------------------------------------------------
        /// <summary>
        /// Reset - put defaults back and clear any attached events
        /// </summary>
        //--------------------------------------------------------------------------------------
        public void Reset()
        {
            if (OnComplete != null)
            {
                foreach (Action handler in OnComplete.GetInvocationList())
                {
                    OnComplete -= handler;
                }
            }

            IsComplete          = false;
            _animationStartTime = null;
        }
Exemple #2
0
        public void Complete()
        {
            if (Conn != null)
            {
                Conn.OnReceive -= Conn_OnReceive;
                OnComplete?.Invoke();

                foreach (var handler in OnReceive?.GetInvocationList())
                {
                    OnReceive -= (MWEventHandler <Message>)handler;
                }
                foreach (var handler in OnComplete?.GetInvocationList())
                {
                    OnComplete -= (MWEventHandler)handler;
                }

                InternalComplete();
            }
        }