public void SetupPage(string page_from_res_folder) { string url = "archive://app/" + page_from_res_folder; bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public Host(SciterWindow window) : base(window : window) { this.RegisterBehaviorHandler(typeof(ImgDrawBehavior)) .AttachEventHandler(new HostEventHandler()); #if DEBUG string location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); location += "\\..\\..\\..\\..\\.."; string path = Path.Combine(location, "res", "index.html"); Uri uri = new Uri(path, UriKind.Absolute); Debug.Assert(uri.IsFile); Debug.Assert(File.Exists(uri.AbsolutePath)); #else Uri uri = new Uri("file:///Users/midiway/Documents/SciterSharp/Tests/SciterTest.Mac/res/index.html", UriKind.Absolute); #endif window.LoadPage(uri: uri); window.CenterWindow() .Show(); }
public Host(SciterWindow wnd) : base(wnd) { RegisterBehaviorHandler(typeof(ImgDrawBehavior)); wnd.LoadPage("file:///Users/midiway/Documents/SciterSharp/Tests/TestOSX/res/index.html"); wnd.CenterTopLevelWindow(); wnd.Show(); }
protected void SetupPage(string pageFromResFolder) { #if DEBUG string path = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, "../../data/app/", pageFromResFolder)); Debug.Assert(File.Exists(path)); string url = "file://" + path.Replace('\\', '/'); #else string url = "archive://app/" + pageFromResFolder; #endif bool result = window.LoadPage(url); Debug.Assert(result); }
public Host(SciterWindow wnd) { SetupWindow(wnd); RegisterBehaviorHandler(typeof(ImgDrawBehavior)); wnd.LoadPage("/Users/midiway/Documents/SciterSharp/Tests/TestOSX/res/index.html"); wnd.CallFunction("CallMe", new SciterValue((args) => { return(new SciterValue(123)); })); wnd.CenterTopLevelWindow(); wnd.Show(); }
public static void Run() { #if X64 SciterX.Use3264DLLNaming = true; #endif PInvokeWindows.OleInitialize(IntPtr.Zero); var window = new SciterWindow(); window.CreateMainWindow(500, 500); window.CenterTopLevelWindow(); var host = new AppHost(window); window.LoadPage("archive://app/acrylic-window/acrylic-window-sketch.htm"); window.Show(); PInvokeUtils.RunMsgLoop(); }
public void SetupPage(string path) { #if DEBUG string cwd = System.Environment.CurrentDirectory; Debug.Assert(File.Exists(cwd + "\\res\\" + path)); string url = "file:///" + cwd + "\\res\\" + path; url = url.Replace('\\', '/'); #else string url = "archive://app/" + path; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public void SetupPage(string page_from_res_folder) { #if DEBUG string path = Environment.CurrentDirectory + "/../../../res/" + page_from_res_folder; Debug.Assert(File.Exists(path)); path = path.Replace('\\', '/'); string url = "file://" + path; #else string url = "archive://app/" + page_from_res_folder; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public void SetupPage(string page_from_res_folder) { string path = _rescwd + page_from_res_folder; Debug.Assert(File.Exists(path)); #if DEBUG string url = "file://" + path; #else string url = "archive://app/" + page_from_res_folder; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public void SetupPage(string path) { string cwd = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); System.Environment.CurrentDirectory = cwd; #if DEBUG Debug.Assert(File.Exists(cwd + "/res/" + path)); string url = "file:///" + cwd + "/res/" + path; #else string url = "archive://app/" + path; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public void SetupPage(string page_from_res_folder) { #if DEBUG string path = Path.GetDirectoryName(Consts.APP_EXE) + "/../../res/" + page_from_res_folder; Debug.Assert(File.Exists(path)); path = path.Replace('\\', '/'); path = Path.GetFullPath(path); Debug.Assert(File.Exists(path)); string url = "file://" + path; #else string url = "archive://app/" + page_from_res_folder; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }
public void SetupPage(string page) { #if DEBUG string location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string path = Path.Combine(location ?? string.Empty, "wwwroot", page); Uri uri = new Uri(path, UriKind.Absolute); Debug.Assert(uri.IsFile); Debug.Assert(File.Exists(uri.AbsolutePath)); #else Uri uri = new Uri(baseUri: _archive.Uri, page); #endif _window.LoadPage(uri: uri); }
public void SetupPage(string page_from_res_folder) { #if DEBUG string cwd = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).Replace('\\', '/'); #if OSX Environment.CurrentDirectory = cwd + "/../../../../.."; #else Environment.CurrentDirectory = cwd + "/../.."; #endif string path = Environment.CurrentDirectory + "/res/" + page_from_res_folder; Debug.Assert(File.Exists(path)); string url = "file://" + path; #else string url = "archive://app/" + page_from_res_folder; #endif bool res = _wnd.LoadPage(url); Debug.Assert(res); }