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); }
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(); } }
public void ResetSelectObjs() { SelectObjectManager selectObjs = _controlPoint.SelectObjs; if (selectObjs.IsEmpty) { SelectObject(_controlPoint.Container); } else if (selectObjs.IsSingle) { SelectObject(selectObjs.List[0]); } else { SelectObject(selectObjs); } }
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); }
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; }
public SegmentPoint(SelectObjectManager objects) { _objects = objects; }
public NodePoint(SelectObjectManager objects) { _objects = objects; }
public CustomPoint(SelectObjectManager objects) { _objects = objects; }