/// <summary> /// Alerts listeners that the shape has been assigned as a child shape to a parent shape. /// </summary> public override void OnShapeInserted() { base.OnShapeInserted(); using (Transaction transaction = Store.TransactionManager.BeginTransaction("Adjust size")) { ShapeHelper.ResizeToContent(this); IsExpanded = false; transaction.Commit(); } }
/// <summary> /// Alerts listeners when the mouse is double-clicked over the shape. /// </summary> /// <param name="e">The diagram point event arguments.</param> public override void OnDoubleClick(DiagramPointEventArgs e) { base.OnDoubleClick(e); using (Transaction transaction = Store.TransactionManager.BeginTransaction("Adjust size")) { ShapeHelper.ResizeToContent(this); transaction.Commit(); } }
/// <summary> /// Alerts listeners that the shape has been assigned as a child shape to a parent shape. /// </summary> public override void OnShapeInserted() { base.OnShapeInserted(); if (!Store.InUndoRedoOrRollback) { using (Transaction transaction = Store.TransactionManager.BeginTransaction("Adjust size")) { ShapeHelper.ResizeToContent(this); transaction.Commit(); } } }
/// <summary> /// Alerts listeners when the mouse is double-clicked over the shape. /// </summary> /// <param name="e">The diagram point event arguments.</param> public override void OnDoubleClick(DiagramPointEventArgs e) { base.OnDoubleClick(e); if (Utils.IsKeyPressed(Keys.Shift)) { using (Transaction transaction = Store.TransactionManager.BeginTransaction("Adjust size")) { ShapeHelper.ResizeToContent(this); transaction.Commit(); } return; } Entity entity = ModelElement as Entity; if (entity != null) { Mapper.Instance.ShowCode(entity.Id, entity.Name, null); } }
/// <summary> /// Alerts listeners when the mouse is double-clicked over the shape. /// </summary> /// <param name="e">The diagram point event arguments.</param> public override void OnDoubleClick(DiagramPointEventArgs e) { base.OnDoubleClick(e); // Avec shift = AdjustSize if (Utils.IsKeyPressed(Keys.Shift)) { using (Transaction transaction = Store.TransactionManager.BeginTransaction("Adjust size")) { ShapeHelper.ResizeToContent(this); transaction.Commit(); } return; } ClassImplementation clazz = ModelElement as ClassImplementation; if (clazz != null) { Mapper.Instance.ShowCode(clazz.Id, clazz.Name, null); } }
/// <summary> /// Arranges the shapes. /// </summary> public void ArrangeShapes() { ShapeHelper.ResizeToContent(this); }