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); } }
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); } } }
public UIViewController(UIController uiController, UIViewBase view) { UIController = uiController; View = view; View.VisibilityChange += View_VisibilityChange; }
public UIViewController(UIViewController ownerViewController, UIViewBase view) : this(ownerViewController.UIController, view) { Owner = ownerViewController; }
public UIButton(UIViewController ownerViewController, uint pressDigitalJoinNumber, UIViewBase targetView) : this(ownerViewController.UIController.Device, pressDigitalJoinNumber) { TargetView = targetView; this.SubscribeToSigChanges(); }