public static void CommonTerminate() { #if DEBUG Debug.Assert(ShutdownBlocker.Instance == null); Debug.Assert(!SendInputEx.IsSending); // GC.Collect(); // Force invocation of destructors #endif AppLogEx.Close(); if (m_tempFilesPool != null) { m_tempFilesPool.Clear(TempClearFlags.All); m_tempFilesPool.WaitForThreads(); } EnableThemingInScope.StaticDispose(); MonoWorkarounds.Terminate(); #if KP_DEVSNAP if (m_bAsmResReg) { AppDomain.CurrentDomain.AssemblyResolve -= Program.AssemblyResolve; m_bAsmResReg = false; } else { Debug.Assert(false); } #endif }
public DialogResult ShowDialog(Control parent) { #if TODO_XAML // EnableThemingInScope was removed as it uses PInvoke using (var visualStyles = new EnableThemingInScope(ApplicationHandler.EnableVisualStyles)) #endif { var messageDialog = new wup.MessageDialog(Text ?? "", Caption ?? ""); messageDialog.ShowAsync(); #if TODO_XAML var element = parent == null ? null : parent.GetContainerControl(); var window = element == null ? null : element.GetParent <sw.Window>(); sw.MessageBoxResult result; var buttons = Convert(Buttons); var defaultButton = Convert(DefaultButton, Buttons); var icon = Convert(Type); var caption = Caption ?? ((parent != null && parent.ParentWindow != null) ? parent.ParentWindow.Title : null); if (window != null) { result = WpfMessageBox.Show(window, Text, caption, buttons, icon, defaultButton); } else { result = WpfMessageBox.Show(Text, caption, buttons, icon, defaultButton); } return(Convert(result)); #else return(DialogResult.Ok); // TODO: this returns immediately, but the MessageDialog appears asynchronously. Fix the Eto API to be asynchronous. #endif } }
public static void CommonTerminate() { #if DEBUG Debug.Assert(ShutdownBlocker.Instance == null); #endif AppLogEx.Close(); EnableThemingInScope.StaticDispose(); }
public static void CommonTerminate() { #if DEBUG Debug.Assert(ShutdownBlocker.Instance == null); Debug.Assert(!SendInputEx.IsSending); // GC.Collect(); // Force invocation of destructors #endif AppLogEx.Close(); EnableThemingInScope.StaticDispose(); }
public static void CommonTerminate() { #if DEBUG Debug.Assert(ShutdownBlocker.Instance == null); Debug.Assert(!SendInputEx.IsSending); // GC.Collect(); // Force invocation of destructors #endif AppLogEx.Close(); if (m_tempFilesPool != null) { m_tempFilesPool.Clear(TempClearFlags.All); m_tempFilesPool.WaitForThreads(); } EnableThemingInScope.StaticDispose(); }
public static void CommonTerminate() { AppLogEx.Close(); EnableThemingInScope.StaticDispose(); }
private static void Start() { #if !USING_MONO VerifyDependencies(); #endif if ( !isRunning ) { WebCoreConfig config = configuration ?? new WebCoreConfig { SaveCacheAndCookies = true, EnablePlugins = true }; StringHelper userDataPathStr = new StringHelper( config.UserDataPath ); StringHelper pluginPathStr = new StringHelper( config.PluginPath ); StringHelper logPathStr = new StringHelper( config.LogPath ); StringHelper childProcessPathStr = new StringHelper( config.ChildProcessPath ); StringHelper acceptLanguageStr = new StringHelper( config.AcceptLanguageOverride ); StringHelper defaultCharsetStr = new StringHelper( config.DefaultCharsetOverride ); StringHelper userAgentOverrideStr = new StringHelper( config.UserAgentOverride ); StringHelper proxyServerStr = new StringHelper( config.ProxyServer ); StringHelper proxyConfigScriptStr = new StringHelper( config.ProxyConfigScript ); StringHelper authServerWhitelistStr = new StringHelper( config.AuthServerWhitelist ); StringHelper customCSSStr = new StringHelper( config.CustomCSS ); #if !USING_MONO EnableThemingInScope activationContext = null; if ( config.EnableVisualStyles ) activationContext = new EnableThemingInScope(); #endif awe_webcore_initialize( config.EnablePlugins, config.EnableJavascript, config.EnableDatabases, userDataPathStr.Value, pluginPathStr.Value, logPathStr.Value, config.LogLevel, config.ForceSingleProcess, childProcessPathStr.Value, config.EnableAutoDetectEncoding, acceptLanguageStr.Value, defaultCharsetStr.Value, userAgentOverrideStr.Value, proxyServerStr.Value, proxyConfigScriptStr.Value, authServerWhitelistStr.Value, config.SaveCacheAndCookies, config.MaxCacheSize, config.DisableSameOriginPolicy, config.DisableWinMessagePump, customCSSStr.Value ); updatePeriod = config.AutoUpdatePeriod; #if !USING_MONO homeURL = config.HomeURL; if ( activationContext != null ) activationContext.Dispose(); #endif activeWebViews = new List<IWebView>(); syncCtx = SynchronizationContext.Current; // Just to be sure. StopUpdateTimer(); // In some scenarios (like when using Mono) just the // SynchronizationContext is not enough to ensure thread affinity. coreThreadID = Thread.CurrentThread.ManagedThreadId; // We will not start auto-update unless we get a synchronization context. if ( syncCtx != null ) updateTimer = new Timer( UpdateTimerCallback, null, 20, updatePeriod ); isRunning = true; } }