public CordovaView() { InitializeComponent(); if (DesignerProperties.IsInDesignTool) { return; } StartupMode mode = PhoneApplicationService.Current.StartupMode; if (mode == StartupMode.Launch) { PhoneApplicationService service = PhoneApplicationService.Current; service.Activated += new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(AppActivated); service.Launching += new EventHandler<LaunchingEventArgs>(AppLaunching); service.Deactivated += new EventHandler<DeactivatedEventArgs>(AppDeactivated); service.Closing += new EventHandler<ClosingEventArgs>(AppClosing); } else { } configHandler = new ConfigHandler(); configHandler.LoadAppPackageConfig(); if (configHandler.ContentSrc != null) { if (Uri.IsWellFormedUriString(configHandler.ContentSrc, UriKind.Absolute)) { this.StartPageUri = new Uri(configHandler.ContentSrc, UriKind.Absolute); } else { this.StartPageUri = new Uri(AppRoot + "www/" + configHandler.ContentSrc, UriKind.Relative); } } browserDecorators = new Dictionary<string, IBrowserDecorator>(); // initializes native execution logic nativeExecution = new NativeExecution(ref this.CordovaBrowser); bmHelper = new BrowserMouseHelper(ref this.CordovaBrowser); CreateDecorators(); }
public CordovaView() { InitializeComponent(); if (DesignerProperties.IsInDesignTool) { return; } StartupMode mode = PhoneApplicationService.Current.StartupMode; if (mode == StartupMode.Launch) { PhoneApplicationService service = PhoneApplicationService.Current; service.Activated += new EventHandler<Microsoft.Phone.Shell.ActivatedEventArgs>(AppActivated); service.Launching += new EventHandler<LaunchingEventArgs>(AppLaunching); service.Deactivated += new EventHandler<DeactivatedEventArgs>(AppDeactivated); service.Closing += new EventHandler<ClosingEventArgs>(AppClosing); } else { } configHandler = new ConfigHandler(); configHandler.LoadAppPackageConfig(); // initializes native execution logic nativeExecution = new NativeExecution(ref this.CordovaBrowser); bmHelper = new BrowserMouseHelper(ref this.CordovaBrowser); }
public CordovaView() { InitializeComponent(); if (DesignerProperties.IsInDesignTool) { return; } // initializes native execution logic configHandler = new ConfigHandler(); configHandler.LoadAppPackageConfig(); if (configHandler.ContentSrc != null) { if (Uri.IsWellFormedUriString(configHandler.ContentSrc, UriKind.Absolute)) { this.StartPageUri = new Uri(configHandler.ContentSrc, UriKind.Absolute); } else { this.StartPageUri = new Uri(AppRoot + "www/" + configHandler.ContentSrc, UriKind.Relative); } } browserDecorators = new Dictionary<string, IBrowserDecorator>(); nativeExecution = new NativeExecution(ref this.CordovaBrowser); bmHelper = new BrowserMouseHelper(ref this.CordovaBrowser); ApplyConfigurationPreferences(); CreateDecorators(); }