/// <summary> /// Show Properties dialog. Return true if list is changed /// </summary> /// <param name="parent"></param> /// <returns></returns> public bool ShowPropertiesDialog(BaseControls.ImageBox.ImageCtl parent) { if (SelectionCount < 1) { return(false); } GraphicsProperties properties = GetProperties(); PropertiesDialog dlg = new PropertiesDialog(); dlg.Properties = properties; CommandChangeState c = new CommandChangeState(this); if (dlg.ShowDialog(parent) != DialogResult.OK) { return(false); } if (ApplyProperties(properties)) { c.NewState(this); parent.AddCommandToHistory(c); } return(true); }
/// <summary> /// Right mouse button is released /// </summary> /// <param name="drawArea"></param> /// <param name="e"></param> public override void OnMouseUp(ImageCtl drawArea, MouseEventArgs e) { if (selectMode == SelectionMode.NetSelection) { // Remove old selection rectangle ControlPaint.DrawReversibleFrame( drawArea.RectangleToScreen(DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint)), Color.Red, FrameStyle.Dashed); // Make group selection drawArea.GraphicsList.SelectInRectangle( DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint)); selectMode = SelectionMode.None; } if (resizedObject != null) { // after resizing resizedObject.Normalize(); resizedObject = null; } drawArea.Capture = false; drawArea.Refresh(); if (commandChangeState != null && wasMove) { // Keep state after moving/resizing and add command to history commandChangeState.NewState(drawArea.GraphicsList); drawArea.AddCommandToHistory(commandChangeState); commandChangeState = null; } }