/// <summary> /// Propogates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public virtual bool?PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { // Search all child docking elements for (int i = 0; i < Count; i++) { // If the child knows the exact answer then return it now bool?ret = this[i].PropogateBoolState(state, uniqueName); if (ret.HasValue) { return(ret); } } return(null); }
/// <summary> /// Propagates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public override bool?PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { switch (state) { case DockingPropogateBoolState.ContainsPage: { // Return definitive answer 'true' if the group controls contains the named page (but not for a placeholder) KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && !(page is KryptonStorePage)) { return(true); } } break; case DockingPropogateBoolState.ContainsStorePage: { // Return definitive answer 'true' if the group controls contains a store page for the unique name. KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if (page is KryptonStorePage) { return(true); } } break; case DockingPropogateBoolState.IsPageShowing: { // If requested page exists then return the visible state of the page (but not for a placeholder) KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && !(page is KryptonStorePage)) { return(page.LastVisibleSet); } } break; } // Let base class perform standard processing return(base.PropogateBoolState(state, uniqueName)); }
/// <summary> /// Propogates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public override bool?PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { switch (state) { case DockingPropogateBoolState.ContainsPage: { // Return the definitive answer 'true' if the control contains the named page KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if ((page != null) && !(page is KryptonStorePage)) { return(true); } } break; case DockingPropogateBoolState.ContainsStorePage: { // Return definitive answer 'true' if the group controls contains a store page for the unique name. KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if (page is KryptonStorePage) { return(true); } } break; case DockingPropogateBoolState.IsPageShowing: { // If we have the requested page then return the visible state of the page KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if ((page != null) && !(page is KryptonStorePage)) { return(page.LastVisibleSet); } } break; } // Let base class perform standard processing return(base.PropogateBoolState(state, uniqueName)); }
/// <summary> /// Propogates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public virtual bool? PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { // Search all child docking elements for (int i = 0; i < Count; i++) { // If the child knows the exact answer then return it now bool? ret = this[i].PropogateBoolState(state, uniqueName); if (ret.HasValue) return ret; } return null; }
/// <summary> /// Propogates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public override bool? PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { switch (state) { case DockingPropogateBoolState.ContainsPage: { // Return the definitive answer 'true' if the control contains the named page KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if ((page != null) && !(page is KryptonStorePage)) return true; } break; case DockingPropogateBoolState.ContainsStorePage: { // Return definitive answer 'true' if the group controls contains a store page for the unique name. KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if ((page != null) && (page is KryptonStorePage)) return true; } break; case DockingPropogateBoolState.IsPageShowing: { // If we have the requested page then return the visible state of the page KryptonPage page = SpaceControl.PageForUniqueName(uniqueName); if ((page != null) && !(page is KryptonStorePage)) return page.LastVisibleSet; } break; } // Let base class perform standard processing return base.PropogateBoolState(state, uniqueName); }
/// <summary> /// Propogates a boolean state request down the hierarchy of docking elements. /// </summary> /// <param name="state">Boolean state that is requested to be recovered.</param> /// <param name="uniqueName">Unique name of the page the request relates to.</param> /// <returns>True/False if state is known; otherwise null indicating no information available.</returns> public override bool? PropogateBoolState(DockingPropogateBoolState state, string uniqueName) { switch (state) { case DockingPropogateBoolState.ContainsPage: { // Return definitive answer 'true' if the group controls contains the named page (but not for a placeholder) KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && !(page is KryptonStorePage)) return true; } break; case DockingPropogateBoolState.ContainsStorePage: { // Return definitive answer 'true' if the group controls contains a store page for the unique name. KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && (page is KryptonStorePage)) return true; } break; case DockingPropogateBoolState.IsPageShowing: { // If requested page exists then return the visible state of the page (but not for a placeholder) KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && !(page is KryptonStorePage)) return page.LastVisibleSet; } break; } // Let base class perform standard processing return base.PropogateBoolState(state, uniqueName); }