public void Dispose() { Destroy(); Instance = null; Host = null; }
public static void ShowDialog() { var wnd = Instance = new DlgLicense(); wnd.CreateMainWindow(740, 520, SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_MAIN | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_ENABLE_DEBUG | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_POPUP | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_TITLEBAR ); wnd.CenterTopLevelWindow(); wnd.Title = Consts.AppName; #if WINDOWS wnd.Icon = Properties.Resources.IconMain; new Win32Hwnd(wnd._hwnd).ModifyStyle(0, PInvoke.User32.SetWindowLongFlags.WS_SYSMENU); #endif Host = new DlgLicenseHost(wnd); // For testing to work wnd.Show(); #if false PInvokeWindows.MSG msg; while (PInvokeWindows.GetMessage(out msg, IntPtr.Zero, 0, 0) != 0) { PInvokeWindows.TranslateMessage(ref msg); PInvokeWindows.DispatchMessage(ref msg); } #else wnd.ShowModal(); #endif }