public override bool ExecuteAction() { if (form == null || form.IsDisposed) { form = new AnimationForm(this); } if (parentWindow == null) { parentWindow = new NativeWindow(); } if (parentWindow.Handle == IntPtr.Zero) { parentWindow.AssignHandle(Loader.Core.MAXHWnd); } if (!form.Visible) { form.Show(parentWindow); } form.WindowState = FormWindowState.Normal; form.BringToFront(); return(true); }
private void Cleanup() { if (form != null) { if (!form.IsDisposed) { form.Dispose(); } form = null; } if (parentWindow != null) { parentWindow.ReleaseHandle(); parentWindow = null; } }