Ejemplo n.º 1
0
        /// <summary>
        /// Runs the main Xwt GUI thread.
        /// </summary>
        /// <remarks>
        /// Blocks until the main GUI loop exits. Use <see cref="Application.Exit"/>
        /// to stop the Xwt application.
        /// </remarks>
        public static void Run()
        {
            if (XwtSynchronizationContext.AutoInstall)
            {
                if (SynchronizationContext.Current == null ||
                    (!((engine.IsGuest) || (SynchronizationContext.Current is XwtSynchronizationContext))))
                {
                    SynchronizationContext.SetSynchronizationContext(toolkit.SynchronizationContext);
                }
            }

            toolkit.InvokePlatformCode(engine.RunApplication);
        }
Ejemplo n.º 2
0
 public Command Run(WindowFrame parent)
 {
     Toolkit.InvokePlatformCode(delegate {
         Backend.RunLoop((IWindowFrameBackend)WidgetRegistry.GetBackend(parent));
     });
     return(resultCommand);
 }
Ejemplo n.º 3
0
 public static void Run()
 {
     toolkit.InvokePlatformCode(delegate {
         engine.RunApplication();
     });
 }
Ejemplo n.º 4
0
 public static void Exit()
 {
     Toolkit.InvokePlatformCode(delegate {
         engine.ExitApplication();
     });
 }