コード例 #1
0
 public NativeHost(FormMain formMain)
 {
     this.formMain = formMain;
     //Enable Chrome Dev Tools when debugging WinForms
     #if DEBUG
     formMain.ChromiumBrowser.KeyboardHandler = new KeyboardHandler();
     #endif
 }
コード例 #2
0
        static void Main()
        {
            AppHost = new AppHost();
            SquirrelAwareApp.HandleEvents(
                OnInitialInstall,
                OnAppUpdate,
                onAppUninstall: OnAppUninstall,
                onFirstRun: OnFirstRun);

            Cef.EnableHighDPISupport();
            Cef.Initialize(new CefSettings());

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            AppHost.Init().Start("http://*:2337/");
            "ServiceStack SelfHost listening at {0} ".Fmt(HostUrl).Print();
            Form = new FormMain();
            Form.Disposed += (sender, args) => AppUpdater.Dispose();
            Application.Run(Form);
        }