protected override void OnClick() { //The first time button is clicked if (toolIsInitialized == false) { theCamForm = new VisualizeCameraPathForm(); //Add event handlers for form's button click events theCamForm.playButton.Click += new System.EventHandler(formPlayButtonClickEventHandler); theCamForm.stopButton.Click += new System.EventHandler(formStopButtonClickEventHandler); theCamForm.generatePathButton.Click += new System.EventHandler(formGeneratePathButtonClickEventHandler); theCamForm.generateCamPathCheckBox.CheckedChanged += new EventHandler(formCheckbox1CheckedChanged); theCamForm.Closing += new CancelEventHandler(theCamForm_Closing); animEnv = new AGAnimationEnvironmentClass(); //True = Button has been already clicked toolIsInitialized = true; } //If the main form is already open - do not open another one else if (toolIsInitialized == true) { //Clear the list of animation tracks theCamForm.animTracksListBox.Items.Clear(); } //Get the list of animation tracks this.getCameraAnimationTracksFromGlobe(); theCamForm.Show(); }
protected override void OnClick() { //The first time button is clicked if(toolIsInitialized == false) { theCamForm = new VisualizeCameraPathForm(); //Add event handlers for form's button click events theCamForm.playButton.Click+= new System.EventHandler(formPlayButtonClickEventHandler); theCamForm.stopButton.Click+= new System.EventHandler(formStopButtonClickEventHandler); theCamForm.generatePathButton.Click+= new System.EventHandler(formGeneratePathButtonClickEventHandler); theCamForm.generateCamPathCheckBox.CheckedChanged += new EventHandler(formCheckbox1CheckedChanged); theCamForm.Closing += new CancelEventHandler(theCamForm_Closing); animEnv = new AGAnimationEnvironmentClass(); //True = Button has been already clicked toolIsInitialized = true; } //If the main form is already open - do not open another one else if (toolIsInitialized == true) { //Clear the list of animation tracks theCamForm.animTracksListBox.Items.Clear(); } //Get the list of animation tracks this.getCameraAnimationTracksFromGlobe(); theCamForm.Show(); }