Exemple #1
0
 public XApplication(XAppInfo applicationInfo)
 {
     this.appView = null;
     this.appInfo = applicationInfo;
     this.isDefaultApp = false;
     this.mode = XAppRunningMode.CreateMode(applicationInfo.RunningMode);
 }
Exemple #2
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();
     });
 }
Exemple #3
0
 public void SetApp(XAppWebView AppView)
 {
     this.AppView = AppView;
     this.AppView.IsVaild = true;
     XNativeExecution xFaceExec = new XNativeExecution(this.AppView.Browser, this);
     this.AppView.CDView.nativeExecution = (NativeExecution)xFaceExec;
     DOMStorageHelper = new XDOMStorageHelper();
     DOMStorageHelper.Browser = this.AppView.Browser;
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         this.AppView.Browser.Loaded += XAppWebView_Loaded;
         this.AppView.Browser.LoadCompleted += XAppWebView_LoadCompleted;
         this.AppView.Browser.ScriptNotify += XAppWebView_ScriptNotify;
         this.AppView.Browser.Navigated += XAppWebView_Navigated;
         this.AppView.Browser.Navigating += XAppWebView_Navigating;
         this.AppView.Browser.NavigationFailed += XAppWebView_NavigationFailed;
         this.AppView.Browser.Unloaded += XAppWebView_Unloaded;
     });
 }