コード例 #1
0
ファイル: ControlPointContainer.cs プロジェクト: siegjan6/HMI
        public ControlPointContainer(IHMIForm container)
        {
            Debug.Assert(container != null);

            _container  = container;
            _selectObjs = new SelectObjectManager(this);

            _node    = new NodePoint(_selectObjs);
            _custom  = new CustomPoint(_selectObjs);
            _frame   = new FramePoint(_selectObjs);
            _segment = new SegmentPoint(_selectObjs);
            _form    = new FormPoint((HMIForm)_container);
        }
コード例 #2
0
        public FramePoint(SelectObjectManager objects)
        {
            _objects = objects;

            for (int i = 0; i < FrameCount; i++)
            {
                _framePath[i] = new GraphicsPath();
            }
            for (int i = 0; i < RotateCount; i++)
            {
                _rotatePath[i] = new GraphicsPath();
            }
            for (int i = 0; i < ShearCount; i++)
            {
                _shearPath[i] = new GraphicsPath();
            }
        }
コード例 #3
0
        public void ResetSelectObjs()
        {
            SelectObjectManager selectObjs = _controlPoint.SelectObjs;

            if (selectObjs.IsEmpty)
            {
                SelectObject(_controlPoint.Container);
            }
            else if (selectObjs.IsSingle)
            {
                SelectObject(selectObjs.List[0]);
            }
            else
            {
                SelectObject(selectObjs);
            }
        }
コード例 #4
0
        public void StatusLabelChanged()
        {
            Point point;
            Size  size;
            SelectObjectManager objs = _controlPoint.SelectObjs;

            if (objs.IsEmpty)                   //form
            {
                point = Container.Rect.Location;
                size  = Container.Rect.Size;
            }
            else                                                                //drawobj
            {
                point = Point.Ceiling(objs.Rect.Location);
                size  = Size.Ceiling(objs.Rect.Size);
            }

            Container.toolStripLocation.Text = string.Format("{0,-4},{1,-4}", point.X, point.Y);
            Container.toolStripSize.Text     = string.Format("{0,-4}x{1,-4}", size.Width, size.Height);
        }
コード例 #5
0
        internal void SetToolStripEnabled()
        {
            SelectObjectManager selectOjbs = _studio.ControlPoint.SelectObjs;
            int  count               = selectOjbs.List.Count;
            bool isVector            = selectOjbs.IsVector;
            bool isSingleSelect      = (count == 1);
            bool isMultiSelect       = (count > 1);
            bool isMultiSelectVector = isMultiSelect && isVector;
            bool isSelectVector      = (count > 0) && isVector;
            bool existGroup          = selectOjbs.ExistGroup;

            toolStripTop.Enabled   = isSingleSelect;
            toolStripLast.Enabled  = isSingleSelect;
            toolStripFront.Enabled = isSingleSelect;
            toolStripBack.Enabled  = isSingleSelect;

            toolStripAlignLeft.Enabled   = isMultiSelectVector;
            toolStripAlignCenter.Enabled = isMultiSelectVector;
            toolStripAlignRight.Enabled  = isMultiSelectVector;
            toolStripAlignTop.Enabled    = isMultiSelectVector;
            toolStripAlignMiddle.Enabled = isMultiSelectVector;
            toolStripAlignBottom.Enabled = isMultiSelectVector;
            toolStripSameWidth.Enabled   = isMultiSelectVector;
            toolStripSameHeight.Enabled  = isMultiSelectVector;
            toolStripSameSize.Enabled    = isMultiSelectVector;
            toolStripHSpace.Enabled      = isMultiSelectVector;
            toolStripIncrHSpace.Enabled  = isMultiSelectVector;
            toolStripDecrHSpace.Enabled  = isMultiSelectVector;
            toolStripVSpace.Enabled      = isMultiSelectVector;
            toolStripIncrVSpace.Enabled  = isMultiSelectVector;
            toolStripDecrVSpace.Enabled  = isMultiSelectVector;

            toolStripFlipX.Enabled = isSelectVector;
            toolStripFlipY.Enabled = isSelectVector;

            toolStripGroup.Enabled   = isMultiSelect;
            toolStripUnGroup.Enabled = existGroup;
        }
コード例 #6
0
 public SegmentPoint(SelectObjectManager objects)
 {
     _objects = objects;
 }
コード例 #7
0
ファイル: NodePoint.cs プロジェクト: siegjan6/HMI
 public NodePoint(SelectObjectManager objects)
 {
     _objects = objects;
 }
コード例 #8
0
ファイル: CustomPoint.cs プロジェクト: siegjan6/HMI
 public CustomPoint(SelectObjectManager objects)
 {
     _objects = objects;
 }