-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
55 lines (48 loc) · 2.04 KB
/
Program.cs
File metadata and controls
55 lines (48 loc) · 2.04 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
48
49
50
51
52
53
54
55
// ---------------------------------------------------------------------------------------------------------------------
// Imports
// ---------------------------------------------------------------------------------------------------------------------
using InfiniFrame;
using InfiniFrame.BlazorWebView;
using InfiniFrameExample.BlazorWebView.Components;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using System.Drawing;
namespace InfiniFrameExample.BlazorWebView;
// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
public static class Program {
[STAThread]
private static void Main(string[] args) {
var appBuilder = InfiniFrameBlazorAppBuilder.CreateDefault(args);
appBuilder.Services.AddLogging(config => {
config.ClearProviders();
config.AddSerilog();
});
appBuilder.Services.AddSerilog(config => {
config.WriteTo.Async(static c => c.Console())
.MinimumLevel.Debug();
});
// register the root component and selector
appBuilder.RootComponents.Add<App>("app");
appBuilder.WithInfiniFrameWindowBuilder(builder => {
builder
// .SetTransparent(true)
// .SetChromeless(true)
// .SetResizable(true)
.SetIconFile("favicon.ico")
// .Center()
// .SetUseOsDefaultSize(true)
// .SetUseOsDefaultLocation(true);
// .SetTitle("InfiniLore InfiniFrame.Blazor Sample")
.SetLocation(new Point(100, 100))
.SetSize(new Size(800, 600))
// .SetMaxSize(new Size(800, 600))
// .SetMinSize(new Size(600, 400))
;
});
InfiniFrameBlazorApp app = appBuilder.Build();
app.Run();
}
}