Ejemplo n.º 1
0
        /// <summary>
        /// 关闭application
        /// </summary>
        /// <param name="app">待关闭的application</param>
        public void CloseApp(XWebApplication app)
        {
            appController.CloseView(app);
            app.CloseApp();

            this.appManagement.HandleAppEvent(app, XAppManagement.kAppEventClose, "");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 关闭指定app的appView
 /// </summary>
 /// <param name="app">待关闭指定的app</param>
 public void CloseView(XWebApplication app)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         XAppWebView appView = app.AppView;
         this.layoutRoot.Children.Remove(appView.CDView);
         appView.IsVaild = false;
         app.AppView = null;
     });
 }
Ejemplo n.º 3
0
 public void CreateView(XWebApplication app)
 {
     Uri startPage = app.mode.GetURL(app);
     XAppWebView appView = new XAppWebView(startPage);
     CurrentAppView = appView;
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         //注册WebApp关联View
         app.SetApp(appView);
         this.layoutRoot.Children.Add(appView.CDView);
         appView.CDView.UpdateLayout();
     });
 }
Ejemplo n.º 4
0
 public static XApplication Create(XAppInfo info)
 {
     if (info.Type.Equals(XFACE_APP_XAPP) || info.Type.Equals(XFACE_APP_APP))
     {
         XWebApplication app = new XWebApplication(info);
         return app;
     }
     else if (info.Type.Equals(NATIVE_APP_NAPP))
     {
         XNativeApplication app = new XNativeApplication(info);
         return app;
     }
     return null;
 }
Ejemplo n.º 5
0
 public XJavaScriptEvaluator(XWebApplication app)
 {
     this.app = app;
     this.jsInvoker = new XSafeBrowserScriptInvoker();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 启动application
 /// </summary>
 /// <param name="app">待启动的application</param>
 public void StartApp(XWebApplication app)
 {
     CheckVersion(app);
     this.appController.CreateView(app);
     //app start 事件的 js eval
     this.appManagement.HandleAppEvent(app, XAppManagement.kAppEventStart, "");
 }
Ejemplo n.º 7
0
 public XNativeExecution(WebBrowser browser, XWebApplication application)
     : base(ref browser)
 {
     this.app = application;
 }