Esempio n. 1
0
 internal static bool IsValid(DockTreePosition? dockTreePosition, AllowedDockTreePositions allowedDockTreePositions)
 {
     if (dockTreePosition == null)
         return true;
     else if (dockTreePosition == DockTreePosition.Floating)
         return (allowedDockTreePositions & AllowedDockTreePositions.Floating) == AllowedDockTreePositions.Floating;
     else if (dockTreePosition == DockTreePosition.Left)
         return (allowedDockTreePositions & AllowedDockTreePositions.Left) == AllowedDockTreePositions.Left;
     else if (dockTreePosition == DockTreePosition.Right)
         return (allowedDockTreePositions & AllowedDockTreePositions.Right) == AllowedDockTreePositions.Right;
     else if (dockTreePosition == DockTreePosition.Top)
         return (allowedDockTreePositions & AllowedDockTreePositions.Top) == AllowedDockTreePositions.Top;
     else if (dockTreePosition == DockTreePosition.Bottom)
         return (allowedDockTreePositions & AllowedDockTreePositions.Bottom) == AllowedDockTreePositions.Bottom;
     else
     {
         Debug.Assert(dockTreePosition == DockTreePosition.Document);
         return (allowedDockTreePositions & AllowedDockTreePositions.Document) == AllowedDockTreePositions.Document;
     }
 }
Esempio n. 2
0
 internal static bool IsValid(DockPosition dockPosition, AllowedDockTreePositions allowedDockTreePositions)
 {
     return IsValid(GetDockTreePosition(dockPosition), allowedDockTreePositions);
 }