Beispiel #1
0
            /// <summary>
            /// Mac support:
            ///   Display the specified panel in a floating window on Mac, the floating
            ///   window will only contain the specified panel.
            ///
            /// Windows support:
            ///   On Windows this will show or hide the floating container containing the
            ///   specified panel.  If the tab is docked with other tabs it will be
            ///   floated in a new container.
            /// </summary>
            /// <param name="panelTypeId">
            /// Guid for the panel type to show/hide.
            /// </param>
            /// <param name="mode">
            /// Show, hide or toggle the visibility state of the specified panel
            /// </param>
            /// <returns>
            /// Return <c>true</c> if the panel visibility state was changed, <c>false</c> otherwise.
            /// </returns>
            /// <since>6.2</since>
            public static bool FloatPanel(Guid panelTypeId, FloatPanelMode mode)
            {
                switch (mode)
                {
                case FloatPanelMode.Show:
                    return(UnsafeNativeMethods.RHC_FloatPanel(0u, panelTypeId, UnsafeNativeMethods.RhCmnPanelFloatPanelMode.Show));

                case FloatPanelMode.Hide:
                    return(UnsafeNativeMethods.RHC_FloatPanel(0u, panelTypeId, UnsafeNativeMethods.RhCmnPanelFloatPanelMode.Hide));

                case FloatPanelMode.Toggle:
                    return(UnsafeNativeMethods.RHC_FloatPanel(0u, panelTypeId, UnsafeNativeMethods.RhCmnPanelFloatPanelMode.Toggle));
                }
                return(UnsafeNativeMethods.RHC_FloatPanel(0u, panelTypeId, UnsafeNativeMethods.RhCmnPanelFloatPanelMode.Toggle));
            }
Beispiel #2
0
 /// <summary>
 /// Mac support:
 ///   Display the specified panel in a floating window on Mac, the floating
 ///   window will only contain the specified panel.
 ///
 /// Windows support:
 ///   On Windows this will show or hide the floating container containing the
 ///   specified panel.  If the tab is docked with other tabs it will be
 ///   floated in a new container.
 /// </summary>
 /// <param name="panelType">
 /// Panel type to show/hide.
 /// </param>
 /// <param name="mode">
 /// Show, hide or toggle the visibility state of the specified panel
 /// </param>
 /// <returns>
 /// Return <c>true</c> if the panel visibility state was changed, <c>false</c> otherwise.
 /// </returns>
 /// <since>6.2</since>
 public static bool FloatPanel(Type panelType, FloatPanelMode mode) => panelType != null && FloatPanel(panelType.GUID, mode);