/// <summary> /// Check if we have filled the form, delete the risk otherwise. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void checkIfControlHasBeenFilledOnClose(object sender, OpenContentFormEvent e) { if (e.Form == this) { return; } deleteControlIfItIsNotFilled(); }
/// <summary> /// Handler when the the user wants to set the main content panel. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void onOpenContentFormEvent(object sender, OpenContentFormEvent e) { //if (this.contentPanel.Controls[0] != e.Form) //{ setPanelForm(e.Form, this.contentPanel); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); GC.WaitForPendingFinalizers(); //} }