Esempio n. 1
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            initTiSettings();

            Logger.init(settings);

            requestHandlers["download"] = new DownloadRequestHandler();
            requestHandlers["file"] = new FileRequestHandler();
            requestHandlers["log"]  = new LogRequestHandler();
            requestHandlers["reflection"] = new ReflectionRequestHandler(app, browser, root);

            xhrProxy = new XHRProxy(9999);
        }
		private async void browser_Loaded(object sender, RoutedEventArgs e) {
			await Logger.init(settings);

			requestHandlers["download"] = new DownloadRequestHandler();
			requestHandlers["file"] = new FileRequestHandler();
			requestHandlers["log"] = new LogRequestHandler();
			requestHandlers["reflection"] = new ReflectionRequestHandler(app, browser, root);

			// generate the security token
			this.securityToken = Guid.NewGuid().ToString();
			this.xhrProxy.securityToken = this.securityToken;

			Logger.log("WebBrowser", "Browser loaded, opening index.html");
			
			browser.Navigate(new Uri("index.html#" + this.securityToken, UriKind.Relative));
		}