Beispiel #1
0
        public Application(string initialPage, string cefAdapterPath = "./CefAdapter")
        {
            _interProcessCommunicator = new InterProcessCommunicator();
            _interProcessCommunicator.MessageReceived += OnMessageReceived;

            if (!initialPage.StartsWith("http://") && !initialPage.StartsWith("https://"))
            {
                var rootDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
                initialPage = string.Format("file:///{0}", Path.GetFullPath(Path.Combine(rootDirectory, initialPage)));
            }

            _initialUrl = initialPage;
        }
Beispiel #2
0
 internal BrowserWindow(int id, InterProcessCommunicator nativeInterface)
 {
     _id = id;
     _nativeInterface         = nativeInterface;
     _javaScriptQueryHandlers = new Dictionary <string, Action <JavaScriptRequest> >();
 }