static void Main(string[] args) { // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); // Create the window var wnd = new SciterWindow(); wnd.CreateMainWindow(1500, 800); wnd.CenterTopLevelWindow(); wnd.Title = "SciterBootstrap"; wnd.Icon = Properties.Resources.IconMain; // Prepares SciterHost and then load the page var host = new Host(); host.Setup(wnd); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); }
static void Main(string[] args) { // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); // Create the window var wnd = WndGlobal = new Window(); // Prepares SciterHost and then load the page var host = AppHost = new Host(); host.Setup(wnd); host.AttachEvh(new HostEvh()); host.RegisterBehaviorHandler(typeof(AreaChart)); host.SetupPage("index.html"); //host.SetupPage("widgets/dolar.html"); HookerInstance.SetMessageHook(); // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); HookerInstance.ClearHook(); FinalizeApp(); }
static void Main(string[] args) { if (IntPtr.Size == 4) { Debug.Assert(false, "sciter.dll that comes bundled in Omni is the x64 version, make sure to change it to the x86 version if building for x86 (Windows only)"); } #if WINDOWS // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); #endif #if GTKMONO PInvokeGTK.gtk_init(IntPtr.Zero, IntPtr.Zero); Mono.Setup(); #endif /* * NOTE: * In Linux, if you are getting a System.TypeInitializationException below, it is because you don't have 'libsciter-gtk-64.so' in your LD_LIBRARY_PATH. * Run 'sudo bash install-libsciter.sh' contained in this package to install it in your system. */ App.ParseArgs(args); if (App.Setup()) { SaveRegistryRunPath(); PInvokeUtils.RunMsgLoop(); GC.Collect(); GC.WaitForPendingFinalizers(); } }
static void Main(string[] args) { MessageBox.Show(IntPtr.Zero, "ola", "mnundo"); if (IntPtr.Size == 4) { Debug.Assert(false, "sciter.dll that comes bundled in TestGTK is the x64 version, make sure to change it to the x86 version if building for x86 (Windows only)"); } #if WINDOWS // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); #endif #if GTKMONO PInvokeGTK.gtk_init(IntPtr.Zero, IntPtr.Zero); Mono.Setup(); #endif /* * NOTE: * In Linux, if you are getting a System.TypeInitializationException below, it is because you don't have 'libsciter-gtk-64.so' in your LD_LIBRARY_PATH. * Run 'sudo bash install-libsciter.sh' contained in this package to install it in your system. */ // Create the window AppWindow = new Window(); // Prepares SciterHost and then load the page AppHost = new Host(AppWindow); // Run message loop PInvokeUtils.RunMsgLoop(); }
static void Main(string[] args) { #if WINDOWS // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); #endif Console.WriteLine("Sciter: " + SciterX.Version); // Create the window var wnd = new SciterWindow(); wnd.CreateMainWindow(1500, 800); wnd.CenterTopLevelWindow(); wnd.Title = "Sciter Bootstrap"; #if WINDOWS wnd.Icon = Properties.Resources.IconMain; #endif // Prepares SciterHost and then load the page var host = new Host(); host.SetupWindow(wnd); host.RegisterBehaviorHandler(typeof(DrawBitmapBehavior), "DrawBitmap"); host.RegisterBehaviorHandler(typeof(DrawTextBehavior), "DrawText"); host.RegisterBehaviorHandler(typeof(DrawGeometryBehavior), "DrawGeometry"); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); GC.Collect(); GC.WaitForPendingFinalizers(); }
public static void Run() { Debug.WriteLine("Sciter: " + SciterX.Version); Joiner.Setup(); double tooktime = (DateTime.Now - Process.GetCurrentProcess().StartTime).TotalSeconds; Debug.WriteLine($"{tooktime}ms to start"); if (true) { CreateApp(); } else { CreateUnittest(); } //AppHost.DebugInspect(); #if !OSX PInvokeUtils.RunMsgLoop(); #endif }
static void Main(string[] args) { // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); // Create the window var wnd = WndGlobal = new Window(); wnd.CreateMainWindow(100, 100, SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_MAIN | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_ALPHA | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_ENABLE_DEBUG); wnd.HideTaskbarIcon(); wnd.Title = Window.WND_TITLE; wnd.Icon = Properties.Resources.IconMain; // Prepares SciterHost and then load the page var host = new Host(); host.Setup(wnd); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); HookerInstance.SetMessageHook(); // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); HookerInstance.ClearHook(); FinalizeApp(); }
static void Main(string[] args) { #if WINDOWS // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); #endif #if GTKMONO PInvokeGTK.gtk_init(IntPtr.Zero, IntPtr.Zero); Mono.Setup(); #endif /* * NOTE: * In Linux, if you are getting a System.TypeInitializationException below, it is because you don't have 'libsciter-gtk-64.so' in your LD_LIBRARY_PATH. * Run 'sudo bash install-libsciter.sh' contained in this package to install it in your system. */ // Create the window AppWindow = new Window(); // Prepares SciterHost and then load the page AppHost = new Host(AppWindow); // Run message loop PInvokeUtils.RunMsgLoop(); }
public static void Run() { // Create the window AppWnd = new Window(); // Prepares SciterHost and then load the page AppHost = new Host(AppWnd); #if !OSX PInvokeUtils.RunMsgLoop(); #endif }
static void Main(string[] args) { #region Args handling bool arg_in_test = false; if (args.Length > 0) { if (args[0].StartsWith("-jumplist:")) { MainWindow.SendJumplistCmd(args[0].Substring(10)); return; } } #endregion //UpdateControl.Setup(); // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); Debug.WriteLine("Sciter " + SciterX.Version); // Create the window var wnd = WndMain = new MainWindow(); wnd.CreateMainWindow(1, 1); wnd.CreateTaskbarIcon(); wnd.CreateJumplists(); wnd.Title = MainWindow.WND_TITLE; // Prepares SciterHost and then load the page var host = new BaseHost(); host.Setup(wnd); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); //HookerInstance.SetMessageHook(); if (!arg_in_test && SingleInstance.IsRunningAndAcquire()) { Debug.WriteLine("ALREADY RUNNING!"); return; } //MainWindow.SendJumplistCmd("BringToFront"); //wnd.CreateNote(); // Run message loop PInvokeUtils.RunMsgLoop(); Exit(); }
public static void Run() { // Create the window mainWnd = new WndMain(); // Prepares SciterHost and then load the page AppHost = new Host(mainWnd); mainWnd.getMsg(); #if !OSX PInvokeUtils.RunMsgLoop(); FinalizeApp(); #endif }
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(); }
static void Main(string[] args) { var list = new List <int> { 123 }; var ss = SciterValue.FromObject(new { aa = list }); Console.WriteLine("Sciter: " + SciterX.Version); Console.WriteLine("Bitness: " + IntPtr.Size); // Sciter needs this for drag'n'drop support; STAThread is required for OleInitialize succeess int oleres = PInvokeWindows.OleInitialize(IntPtr.Zero); Debug.Assert(oleres == 0); // Create the window AppWnd = new SciterWindow(); var rc = new PInvokeUtils.RECT(); rc.right = 800; rc.bottom = 600; var wnd = AppWnd; //wnd.CreateWindow(rc, SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_POPUP | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_MAIN | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_RESIZEABLE); wnd.CreateMainWindow(1500, 800); wnd.CenterTopLevelWindow(); wnd.Title = "TestCore"; wnd.Icon = Properties.Resources.IconMain; // Prepares SciterHost and then load the page AppHost = new Host(); var host = AppHost; host.Setup(wnd); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); //host.DebugInspect(); //byte[] css_bytes = File.ReadAllBytes(@"D:\ProjetosSciter\AssetsDrop\AssetsDrop\res\css\global.css"); //SciterX.API.SciterAppendMasterCSS(css_bytes, (uint) css_bytes.Length); Debug.Assert(!host.EvalScript("Utils").IsUndefined); // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); }
public static void Run() { IsRunning = true; AppWindow = new SciterWindow(); AppWindow.CreateMainWindow(1280, 720); AppWindow.CenterTopLevelWindow(); AppWindow.Title = Reference.NAME; Win32.EnableWindowBlur(AppWindow._hwnd); AppHost = new Host(AppWindow); PInvokeUtils.RunMsgLoop(); IsRunning = false; }
public static void Run() { Console.WriteLine("Sciter " + SciterX.Version); Console.WriteLine("SciterSharp " + LibVersion.AssemblyVersion); AppWnd = new Window(); AppHost = new Host(AppWnd); AppWnd.Show(); /*#if OSX * AppWnd._nsview.Window.StyleMask = AppKit.NSWindowStyle.Borderless | AppKit.NSWindowStyle.Resizable; #endif*/ #if !OSX PInvokeUtils.RunMsgLoop(); #endif }
static void Main(string[] args) { // TODO: think Andrew corrected child window creation PInvokeWindows.OleInitialize(IntPtr.Zero); // Create the window var wnd = new SciterWindow(); wnd.CreateMainWindow(1500, 800); var r = wnd.RootElement; wnd.Icon = Properties.Resources.Icon1; //wnd.EnableDwmClientArea(); //wnd.CenterTopLevelWindow(); //wnd.AfterWindowCreate(); //wnd.Title = "Sciter Bootstrap"; // Prepares SciterHost and then load the page var host = new Host(); host.SetupWindow(wnd); host.AttachEvh(new HostEvh()); host.SetupPage("index.html"); //host.DebugInspect(); // get the page <body> var se_body = wnd.RootElement.SelectFirst("body"); // append a <h1> header to it se_body.TransformHTML("<h1>Wow, this header was created natively!</h1>", SciterXDom.SET_ELEMENT_HTML.SIH_INSERT_AT_START); // set <h1> color to blue se_body[0].SetStyle("color", "#00F"); /*SciterWindow wnd_popup = new SciterWindow(); * wnd_popup.CreatePopupAlphaWindow(400, 400, wnd._hwnd); * wnd_popup.LoadHtml("<html><body><style>html { background: red; }</style></body></html>"); * wnd_popup.Show();*/ // Show window and Run message loop wnd.Show(); PInvokeUtils.RunMsgLoop(); }
public static void Run() { AppWnd = new SciterWindow(); var wnd = AppWnd; wnd.CreateMainWindow(800, 600); wnd.CenterTopLevelWindow(); wnd.Title = "FontLister"; #if WINDOWS wnd.Icon = Properties.Resources.IconMain; #endif // Prepares SciterHost and then load the page AppHost = new Host(AppWnd); Data.GAPI.Setup(); #if !OSX PInvokeUtils.RunMsgLoop(); #endif }
public static void Run() { SciterHost.InjectLibConsoleDebugPeer = false; Joiner.Setup(); double tooktime = (DateTime.Now - Process.GetCurrentProcess().StartTime).TotalSeconds; Debug.WriteLine($"{tooktime}ms to start"); if (true) { CreateApp(); } else { CreateUnittest(); } #if !OSX PInvokeUtils.RunMsgLoop(); Environment.Exit(0); #endif }
public void ShowModal() { Show(); PInvokeUtils.RunMsgLoop(); }