コード例 #1
0
 private void addUseCase_Click(object sender, EventArgs e)
 {
     Diagram.UseCase useCase = new Diagram.UseCase();
     Diagram.Add(useCase);
     diagram.Height = Diagram.Height;
     diagram.Invalidate();
 }
コード例 #2
0
 public PropertiesForm(Diagram.UseCase useCase, PictureBox diagram)
 {
     this.useCase = useCase;
     this.diagram = diagram;
     InitializeComponent();
     actors = useCase.Actors;
     foreach (Diagram.Actor actor in actors)
     {
         ActorLabel actorLabel = new ActorLabel();
         actorLabel.Text   = actor.Name;
         actorLabel.Tag    = actor;
         actorLabel.Click += new EventHandler(actorLabel_Click);
         actorsBox.Controls.Add(actorLabel);
     }
     updateComboBox();
     useCaseName.Text        = useCase.Name;
     useCaseSummary.Text     = useCase.Summary;
     useCaseAssuming.Text    = useCase.Assuming;
     useCaseDescription.Text = useCase.Description;
     useCaseExceptions.Text  = useCase.Exceptions;
     useCaseResult.Text      = useCase.Result;
 }