public UI(string title, bool closeable) { SetupEOBrowser(); _essentialForm = new EssentialForm(title, closeable); _essentialForm.Notify += Form_Notify; _essentialForm.Loaded += Form_Loaded; _essentialForm.Unloaded += Form_Unloaded; }
public void Dispose() { if (_essentialForm != null) { _essentialForm.Hide(); _essentialForm.Dispose(); _essentialForm = null; } GC.Collect(); // Start .NET CLR Garbage Collection GC.WaitForPendingFinalizers(); // Wait for Garbage Collection to finish }