Пример #1
0
        public override void DidFinishLaunching(NSNotification notification)
        {
            Mono.Setup();
            App.Run();

            // Set our custom menu with Cocoa
            var menu = new NSMenu();

            menu.AddItem(new NSMenuItem("Quit", "q", (sender, e) => NSApplication.SharedApplication.Terminate(menu)));
            var menubar = new NSMenu();

            menubar.AddItem(new NSMenuItem {
                Submenu = menu
            });

            NSApplication.SharedApplication.MainMenu = menubar;
        }
Пример #2
0
        static void Main(string[] args)
        {
            if (IntPtr.Size == 4)
            {
                Debug.Assert(false, "sciter.dll that comes bundled in DeveloperArsenal is the x64 version, make sure to change it to the x86 version if building for x86 (Windows only)");
            }

            SciterX.API.SciterSetOption(IntPtr.Zero, SciterXDef.SCITER_RT_OPTIONS.SCITER_SET_GFX_LAYER, (IntPtr)SciterXDef.GFX_LAYER.GFX_LAYER_D2D);

#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

            App.Run();
        }