Ejemplo n.º 1
0
 void View_VisibilityChange(UIViewBase sender, UIViewVisibilityEventArgs args)
 {
     if (args.EventType == eViewEventType.DidShow)
     {
         OnShow();
     }
     else if (args.EventType == eViewEventType.DidHide)
     {
         OnHide();
     }
     else if (args.EventType == eViewEventType.WillShow)
     {
         try
         {
             WillShow();
         }
         catch (Exception e)
         {
             ErrorLog.Exception(string.Format("Exception in UIViewController.WillShow(), {0}", e.Message), e);
         }
     }
     else if (args.EventType == eViewEventType.WillHide)
     {
         WillHide();
     }
 }
Ejemplo n.º 2
0
 void Owner_VisibilityChange(UIViewController sender, UIViewVisibilityEventArgs args)
 {
     if (args.EventType == eViewEventType.WillHide && View.Visible)
     {
         View.Hide();
     }
 }
Ejemplo n.º 3
0
 void ViewController_VisibilityChange(UIViewController sender, UIViewVisibilityEventArgs args)
 {
     if (sender.Visible && ViewTimeOut != null)
     {
         ViewTimeOut.Set();
     }
 }
Ejemplo n.º 4
0
 void Page_VisibilityChange(UIViewBase sender, UIViewVisibilityEventArgs args)
 {
     if (args.EventType == eViewEventType.WillShow)
     {
         var page = sender as UIPage;
         if (page != null)
         {
             foreach (var otherPage in page.OtherPages)
             {
                 otherPage.Visible = false;
             }
         }
     }
     if (VisibilityChange != null)
     {
         VisibilityChange(sender, args);
     }
 }
Ejemplo n.º 5
0
        void SubPage_VisibilityChange(UIViewBase sender, UIViewVisibilityEventArgs args)
        {
#if DEBUG
            CrestronConsole.PrintLine("{0} SubPage Visibility Changed: {1}", this.GetType().ToString(), args.EventType.ToString());
#endif
            if (args.EventType == eViewEventType.WillShow)
            {
                this.Buttons.ButtonEvent += new UIButtonCollectionEventHandler(Buttons_ButtonEvent);
            }
            else if (args.EventType == eViewEventType.DidHide)
            {
                this.SubPage.VisibilityChange -= new UIViewBaseVisibitlityEventHandler(SubPage_VisibilityChange);
                this.Buttons.ButtonEvent      -= new UIButtonCollectionEventHandler(Buttons_ButtonEvent);
                if (this.CallBack != null)
                {
                    this.CallBack(this, action);
                }
            }
        }