private static void LoadApp(IWebHost webHost) { var app = new App(); app.InitializeComponent(); var uiBuilder = new PositronUiBuilder() .SetWebHost(webHost) .ConfigureServices(services => { services .AddSingleton <IGlobalScriptObject, TestScriptObject>() .AddSingleton <IPositronDialogHandler, DialogHandler>(); });; uiBuilder.UseConsoleLogger(new TestLogger()); int debugPort; if (int.TryParse(ConfigurationManager.AppSettings["debugPort"], out debugPort)) { uiBuilder.UseDebugPort(debugPort); } WindowHandler = uiBuilder.Build(); System.Windows.Forms.Application.Run(new MainForm()); }
private static void LoadApp(IWebHost webHost) { var app = new App(); app.InitializeComponent(); var uiBuilder = new PositronUiBuilder() .SetWebHost(webHost) .UseDebugPort(8080) .ConfigureServices(services => { services .AddSingleton <IGlobalScriptObject, TestScriptObject>() .AddSingleton <IPositronDialogHandler, DialogHandler>(); }); var windowHandler = uiBuilder.Build(); app.Run(windowHandler.CreateWindow((Window)null, "http://positron/Positron.Application")); }