private void runProgram(object sender, EventArgs e) { if (animationRadioButton.Checked) { // Tasks 5.1 and 5.2 AnimationForm form = new AnimationForm(); form.Show(); } else if (flyMeRadioButton.Checked) { // Tasks 5.3, 5.4 and 5.5 FlyMeForm form = new FlyMeForm(); form.Show(); } else if (unit6RadioButton.Checked) { // Tasks 6.1 to 6.6 GraphicsForm form = new GraphicsForm(); form.Show(); } else if (bouncingBallRadio.Checked) { Bouncing_ball bouncing_Ball = new Bouncing_ball(); bouncing_Ball.Show(); } else if (unit7RadioButton.Checked) { SketchForm sketchForm = new SketchForm(); sketchForm.Show(); } }
public override void OnClick() { try { SketchForm sketchForm = WorkBench.FindDocument <SketchForm>(); if (sketchForm == null) { sketchForm = WorkBench.ShowDocument <SketchForm>(); if (PubishFunction.LoadDataState) { sketchForm.LoadMapData(); } } else { sketchForm.Activate(); } }catch (Exception ex) { throw new Exception(ex.ToString()); } }