-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
47 lines (40 loc) · 1.94 KB
/
Program.cs
File metadata and controls
47 lines (40 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// ---------------------------------------------------------------------------------------------------------------------
// Imports
// ---------------------------------------------------------------------------------------------------------------------
using InfiniFrame;
using InfiniFrame.WebServer;
using System.Drawing;
namespace InfiniFrameExample.WebApp.Vue;
// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
public static class Program {
[STAThread]
public static void Main(string[] args) {
InfiniFrameWebApplicationBuilder appBuilder = InfiniFrameWebApplication.CreateBuilder(args);
// WebApplicationBuilder appBuilder = builder.WebApp;
appBuilder.WindowBuilder
.Center()
// .SetTransparent(true)
// .SetUseOsDefaultSize(false)
.SetTitle("InfiniLore InfiniFrame.NET VUE Sample")
.SetSize(new Size(800, 600))
.SetLocation(1000, 0)
.SetBrowserControlInitParameters("--remote-debugging-port=9222")
.RegisterFullScreenWebMessageHandler()
.RegisterOpenExternalTargetWebMessageHandler()
.RegisterTitleChangedWebMessageHandler()
.RegisterWindowManagementWebMessageHandler()
.RegisterWebMessageReceivedHandler((_, message) => {
// ReSharper disable twice UnusedVariable
string response = $"Received message: \"{message}\"";
// ... do something with the message
})
;
InfiniFrameWebApplication application = appBuilder.Build();
application.UseAutoServerClose();
application.WebApp.UseStaticFiles();
application.WebApp.MapStaticAssets();
application.Run();
}
}