protected void BeginRenameType(UmlDesigner owner) { var inputBounds = new Rectangle(Bounds.Left + Margins.typeBoxSideMargin, Bounds.Top + 4, Bounds.Width - 25 - Margins.typeBoxSideMargin, 20); Action endRenameType = () => { DataSource.TypeName = owner.GetInput(); }; owner.BeginInput(inputBounds, DataSource.TypeName, Fonts.DefaultTypeName, endRenameType); }
private void BeginRenameProperty(UmlDesigner owner, UmlTypeMember property) { Rectangle bounds = owner.GetItemBounds(property); if (bounds == Rectangle.Empty) bounds = owner.GetItemBounds(AddNewPropertyIdentifier); var inputBounds = new Rectangle(bounds.X + Margins.TypeMemberNameIndent, bounds.Y, bounds.Width - Margins.TypeMemberNameIndent, bounds.Height); object oldSelectedObject = SelectedObject; SelectedObject = null; Action endRenameProperty = () => { property.DataSource.Name = owner.GetInput(); if (property.DataSource.Name == "") { SelectedObject = property; DeleteSelectedMember(); } else { SelectedObject = oldSelectedObject; } }; Font font = GetTypeMemberFont(); owner.BeginInput(inputBounds, property.DataSource.Name, font, endRenameProperty); }
private void BeginEditText(UmlDesigner owner) { Rectangle inputBounds = Bounds; inputBounds.Inflate(-10, -10); Action endEditText = () => { DataSource.Text = owner.GetInput(); }; owner.BeginInputMultiLine(inputBounds, DataSource.Text, Fonts.CommentText, endEditText); }