示例#1
0
 public Control()
 {
     BackgroundColor = new Color (1,1,1,0);
     Location = new Point (0,0);
     Size = new Size (0,0);
     IsVisible = true;
 }
示例#2
0
 public Size(Size s)
 {
     w = s.w;
     h = s.h;
 }
示例#3
0
        public override void OnMouseMove()
        {
            if (designService.IsPressed) {

                if (designService.IsMoving && (designService.SelectedTool as SectionTool) != null)
                {
                    if ((designService.SelectedTool as SectionTool).IsGripperPressed)
                    {
                        var section = designService.SelectedControl as SectionView;
                        Size newSize = new Size(section.ControlModel.Width, section.ControlModel.Height + designService.DeltaPoint.Y);
                        if(newSize.Height >= section.MinHeight)
                            section.ControlModel.Size = newSize;
                        else{
                            section.ControlModel.Size = new Size(newSize.Width,section.MinHeight);
                    }
                    }
                }

            }else if (designService.MouseOverSection != null) {
                if(designService.MouseOverSection.GripperAbsoluteBound.ContainsPoint(designService.MousePoint.X,designService.MousePoint.Y)) {
                    designService.MouseOverSection.IsSectionGripperHighligted = true;
                    designService.WorkspaceService.SetCursor (Gdk.CursorType.BottomSide);
                }else {
                    designService.MouseOverSection.IsSectionGripperHighligted = false;
                    designService.WorkspaceService.SetCursor (Gdk.CursorType.LeftPtr);
                }
            }
        }