Пример #1
0
 public ITransition Dismiss(IWindow window)
 {
     HideTransition transition = new HideTransition(this, (Window)window, true);
     GetTransitionExecutor().Execute(transition);
     return transition.OnStateChanged((w, state) =>
         {
             Debug.LogFormat("Dismiss Window:{0} State:{1}", w.Name, state);
             /* Control the layer of the window */
             if (state == WindowState.INVISIBLE)
                 this.MoveToLast(w);
         });
 }
Пример #2
0
        public ITransition Dismiss(IWindow window)
        {
            HideTransition transition = new HideTransition(this, (Window)window, true);

            GetTransitionExecutor().Execute(transition);
            return(transition.OnStateChanged((w, state) =>
            {
                /* Control the layer of the window */
                if (state == WindowState.INVISIBLE)
                {
                    this.MoveToLast(w);
                }
            }));
        }
Пример #3
0
        public virtual void Cancel()
        {
            Action sendEvent = () =>
            {
                Action handler = Cancelled;
                if (handler != null)
                {
                    handler();
                }
            };

            if (HideTransition != null)
            {
                Storyboard transition = HideTransition.Clone();

                transition.Completed += (s, e) => sendEvent();
                transition.Begin(this, Template);
            }
            else
            {
                sendEvent();
            }
        }
Пример #4
0
 protected virtual void Awake()
 {
     showTransition = GetComponent <ShowTransition>();
     hideTransition = GetComponent <HideTransition>();
 }