Наследование: LayoutFarm.UI.UIBox
Пример #1
0
        void SetupDockSpaces(SpaceConcept spaceConcept)
        {
            //1. controller
            this.dockspaceController = new DockSpacesController(this, spaceConcept);

            //2.
            this.dockspaceController.LeftTopSpace.Content     = boxLeftTop = CreateSpaceBox(SpaceName.LeftTop, leftTopColor);
            this.dockspaceController.RightTopSpace.Content    = boxRightTop = CreateSpaceBox(SpaceName.RightTop, rightTopColor);
            this.dockspaceController.LeftBottomSpace.Content  = boxLeftBottom = CreateSpaceBox(SpaceName.LeftBottom, leftBottomColor);
            this.dockspaceController.RightBottomSpace.Content = boxRightBottom = CreateSpaceBox(SpaceName.RightBottom, rightBottomColor);
            //3.
            this.dockspaceController.LeftSpace.Content   = boxLeft = CreateSpaceBox(SpaceName.Left, leftColor);
            this.dockspaceController.TopSpace.Content    = boxTop = CreateSpaceBox(SpaceName.Top, topColor);
            this.dockspaceController.RightSpace.Content  = boxRight = CreateSpaceBox(SpaceName.Right, rightColor);
            this.dockspaceController.BottomSpace.Content = boxBottom = CreateSpaceBox(SpaceName.Bottom, bottomColor);

            this.dockspaceController.CenterSpace.Content = boxCentral = CreateSpaceBox(SpaceName.Center, centerColor);

            //--------------------------------
            //left and right space expansion
            //dockspaceController.LeftSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
            //dockspaceController.RightSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
            dockspaceController.SetRightSpaceWidth(200);
            dockspaceController.SetLeftSpaceWidth(200);
            //------------------------------------------------------------------------------------
            this.ninespaceGrippers               = new NinespaceGrippers(this.dockspaceController);
            this.ninespaceGrippers.LeftGripper   = gripperLeft = CreateGripper(gripperColor, false);
            this.ninespaceGrippers.RightGripper  = gripperRight = CreateGripper(gripperColor, false);
            this.ninespaceGrippers.TopGripper    = gripperTop = CreateGripper(gripperColor, true);
            this.ninespaceGrippers.BottomGripper = gripperBottom = CreateGripper(gripperColor, true);
            this.ninespaceGrippers.UpdateGripperPositions();
            //------------------------------------------------------------------------------------
        }
Пример #2
0
 void SetupDockSpaces(SpaceConcept spaceConcept)
 {
     //1. controller
     this.dockspaceController = new DockSpacesController(this, spaceConcept);
     //2.  
     this.dockspaceController.LeftTopSpace.Content = boxLeftTop = CreateSpaceBox(SpaceName.LeftTop, leftTopColor);
     this.dockspaceController.RightTopSpace.Content = boxRightTop = CreateSpaceBox(SpaceName.RightTop, rightTopColor);
     this.dockspaceController.LeftBottomSpace.Content = boxLeftBottom = CreateSpaceBox(SpaceName.LeftBottom, leftBottomColor);
     this.dockspaceController.RightBottomSpace.Content = boxRightBottom = CreateSpaceBox(SpaceName.RightBottom, rightBottomColor);
     //3.
     this.dockspaceController.LeftSpace.Content = boxLeft = CreateSpaceBox(SpaceName.Left, leftColor);
     this.dockspaceController.TopSpace.Content = boxTop = CreateSpaceBox(SpaceName.Top, topColor);
     this.dockspaceController.RightSpace.Content = boxRight = CreateSpaceBox(SpaceName.Right, rightColor);
     this.dockspaceController.BottomSpace.Content = boxBottom = CreateSpaceBox(SpaceName.Bottom, bottomColor);
     this.dockspaceController.CenterSpace.Content = boxCentral = CreateSpaceBox(SpaceName.Center, centerColor);
     //--------------------------------
     //left and right space expansion
     //dockspaceController.LeftSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     //dockspaceController.RightSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     dockspaceController.SetRightSpaceWidth(200);
     dockspaceController.SetLeftSpaceWidth(200);
     //------------------------------------------------------------------------------------
     this.ninespaceGrippers = new NinespaceGrippers(this.dockspaceController);
     this.ninespaceGrippers.LeftGripper = gripperLeft = CreateGripper(gripperColor, false);
     this.ninespaceGrippers.RightGripper = gripperRight = CreateGripper(gripperColor, false);
     this.ninespaceGrippers.TopGripper = gripperTop = CreateGripper(gripperColor, true);
     this.ninespaceGrippers.BottomGripper = gripperBottom = CreateGripper(gripperColor, true);
     this.ninespaceGrippers.UpdateGripperPositions();
     //------------------------------------------------------------------------------------
 }
        void SetupActiveBoxProperties(LayoutFarm.CustomWidgets.EaseBox box)
        {
            //1. mouse down
            box.MouseDown += (s, e) =>
            {
                box.BackColor      = KnownColors.FromKnownColor(KnownColor.DeepSkyBlue);
                e.MouseCursorStyle = MouseCursorStyle.Pointer;
                //--------------------------------------------
                //move controller here
                controllerBox1.TargetBox = box;
                controllerBox1.SetLocation(box.Left - 5, box.Top - 5);
                controllerBox1.SetSize(box.Width + 10, box.Height + 10);
                controllerBox1.Visible = true;
                //--------------------------------------------
                e.CancelBubbling = true;

                e.SetMouseCapture(controllerBox1);
            };
            //2. mouse up
            box.MouseUp += (s, e) =>
            {
                e.MouseCursorStyle = MouseCursorStyle.Default;
                box.BackColor      = Color.LightGray;
                //hide controller
                controllerBox1.Visible   = false;
                controllerBox1.TargetBox = null;
                e.CancelBubbling         = true;
            };
        }
Пример #4
0
 void SetupBackgroundProperties(LayoutFarm.CustomWidgets.EaseBox backgroundBox)
 {
     ////if click on background
     //backgroundBox.MouseDown += (s, e) =>
     //{
     //    controllerBox1.TargetBox = null;//release target box
     //    controllerBox1.Visible = false;
     //};
 }
 void SetupDockSpaces()
 {
     //1. controller
     this.dockspaceController = new DockSpacesController(this, SpaceConcept.NineSpace);
     //2.  
     this.dockspaceController.LeftTopSpace.Content = boxLeftTop = CreateSpaceBox(SpaceName.LeftTop, Color.Red);
     this.dockspaceController.RightTopSpace.Content = boxRightTop = CreateSpaceBox(SpaceName.RightTop, Color.Red);
     this.dockspaceController.LeftBottomSpace.Content = boxLeftBottom = CreateSpaceBox(SpaceName.LeftBottom, Color.Red);
     this.dockspaceController.RightBottomSpace.Content = boxRightBottom = CreateSpaceBox(SpaceName.RightBottom, Color.Red);
     //3.
     this.dockspaceController.LeftSpace.Content = boxLeft = CreateSpaceBox(SpaceName.Left, Color.Blue);
     this.dockspaceController.TopSpace.Content = boxTop = CreateSpaceBox(SpaceName.Top, Color.Yellow);
     this.dockspaceController.RightSpace.Content = boxRight = CreateSpaceBox(SpaceName.Right, Color.Green);
     this.dockspaceController.BottomSpace.Content = boxBottom = CreateSpaceBox(SpaceName.Bottom, Color.Yellow);
     //------------------------------------------------------------------------------------
     //left and right space expansion
     dockspaceController.LeftSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     dockspaceController.RightSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     dockspaceController.SetRightSpaceWidth(200);
     dockspaceController.SetLeftSpaceWidth(200);
 }
 void SetupBackgroundProperties(LayoutFarm.CustomWidgets.EaseBox backgroundBox)
 {
 }
 void SetupDockSpaces()
 {
     //1. controller
     this.dockspaceController = new DockSpacesController(this, SpaceConcept.NineSpace);
     //2.  
     this.dockspaceController.LeftTopSpace.Content = boxLeftTop = CreateSpaceBox(SpaceName.LeftTop, Color.Red);
     this.dockspaceController.RightTopSpace.Content = boxRightTop = CreateSpaceBox(SpaceName.RightTop, Color.Red);
     this.dockspaceController.LeftBottomSpace.Content = boxLeftBottom = CreateSpaceBox(SpaceName.LeftBottom, Color.Red);
     this.dockspaceController.RightBottomSpace.Content = boxRightBottom = CreateSpaceBox(SpaceName.RightBottom, Color.Red);
     //3.
     this.dockspaceController.LeftSpace.Content = boxLeft = CreateSpaceBox(SpaceName.Left, Color.Blue);
     this.dockspaceController.TopSpace.Content = boxTop = CreateSpaceBox(SpaceName.Top, Color.Yellow);
     this.dockspaceController.RightSpace.Content = boxRight = CreateSpaceBox(SpaceName.Right, Color.Green);
     this.dockspaceController.BottomSpace.Content = boxBottom = CreateSpaceBox(SpaceName.Bottom, Color.Yellow);
     //--------------------------------
     //left and right space expansion
     dockspaceController.LeftSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     dockspaceController.RightSpaceVerticalExpansion = VerticalBoxExpansion.TopBottom;
     dockspaceController.SetRightSpaceWidth(200);
     dockspaceController.SetLeftSpaceWidth(200);
     //------------------------------------------------------------------------------------
     this.ninespaceGrippers = new NinespaceGrippers(this.dockspaceController);
     this.ninespaceGrippers.LeftGripper = gripperLeft = CreateGripper(Color.Red, false);
     this.ninespaceGrippers.RightGripper = gripperRight = CreateGripper(Color.Red, false);
     this.ninespaceGrippers.TopGripper = gripperTop = CreateGripper(Color.Red, true);
     this.ninespaceGrippers.BottomGripper = gripperBottom = CreateGripper(Color.Red, true);
     this.ninespaceGrippers.UpdateGripperPositions();
     //------------------------------------------------------------------------------------
 }