Example #1
0
 //When the help form is closed it's link points to a disposed object, we have to update our options form with a new one
 public void updateParentForm(Form form)
 {
     if (form is Form1)
         parentForm1 = (Form1)form;
     if (form is HelpForm)
         parentHelpForm = (HelpForm)form;
 }
Example #2
0
 //Passing main and help form links so that i know whose functions to call
 internal Options(Form1 parentForm1,HelpForm parentHelpForm,CombinePerformer CP)
 {
     this.parentForm1 = parentForm1;
     this.parentHelpForm = parentHelpForm;
     this.CP = CP;
     InitializeComponent();
 }
Example #3
0
 public Form1()
 {
     InitializeComponent();
     helpForm = new HelpForm();
     optionsForm = new Options(this, helpForm,CP);
 }
Example #4
0
 // Display help
 private void helpButton_Click(object sender, EventArgs e)
 {
     if (!helpForm.Visible)
     {
         helpForm = new HelpForm();
         optionsForm.updateParentForm(helpForm);
     }
     helpForm.Show();
 }