private void addActor_Click(object sender, EventArgs e) { Diagram.Actor actor = new Diagram.Actor(); Diagram.Add(actor); diagram.Height = Diagram.Height; diagram.Invalidate(); }
private void actorLabel_Click(object sender, EventArgs e) { ActorLabel actorLabel = (ActorLabel)sender; Diagram.Actor actor = (Diagram.Actor)actorLabel.Tag; actors.Remove(actor); actorsBox.Controls.Remove(actorLabel); updateComboBox(); }
private void remove_Click(object sender, EventArgs e) { if (focusedObject.GetType() == typeof(Diagram.Actor)) { Diagram.Actor actor = (Diagram.Actor)focusedObject; foreach (Diagram.UseCase useCase in Diagram.UseCases) { useCase.Actors.Remove(actor); } } focusedObject.Remove(); diagram.Height = Diagram.Height; diagram.Invalidate(); actions.Hide(); }