Пример #1
0
        public virtual void ShowPage(string pageData)
        {
            var str = Directory.GetCurrentDirectory() + "/Content/Web/Cache/HN_OS_WebCache.html";

            Utils.writeToFile(pageData, str);
            WebRenderer.navigateTo(str);
        }
Пример #2
0
 private static void TextureUpdated(IntPtr buffer)
 {
     try
     {
         Marshal.Copy(buffer, WebRenderer.texBuffer, 0, WebRenderer.texBuffer.Length);
         WebRenderer.texture.SetData <byte>(WebRenderer.texBuffer);
         WebRenderer.loadingPage = false;
     }
     catch (AccessViolationException ex)
     {
         Console.WriteLine((object)ex);
         WebRenderer.navigateTo(WebRenderer.url);
     }
 }
Пример #3
0
        public virtual void ShowPage(string pageData)
        {
            string str = Directory.GetCurrentDirectory() + "/Content/Web/Cache/HN_OS_WebCache.html";

            if (Settings.IsInExtensionMode)
            {
                string path = Path.Combine(Directory.GetCurrentDirectory(), ExtensionLoader.ActiveExtensionInfo.FolderPath, "Web", "Cache");
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                str = path + "/HN_OS_WebCache.html";
            }
            Utils.writeToFile(pageData, str);
            WebRenderer.navigateTo(str);
        }