public XApplication(XAppInfo applicationInfo) { this.appView = null; this.appInfo = applicationInfo; this.isDefaultApp = false; this.mode = XAppRunningMode.CreateMode(applicationInfo.RunningMode); }
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(); }); }
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; }); }