Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
Latest commit
56 lines (49 loc) · 2.14 KB
/
Copy pathProgram.cs
File metadata and controls
56 lines (49 loc) · 2.14 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
56
// ---------------------------------------------------------------------------------------------------------------------
// Imports
// ---------------------------------------------------------------------------------------------------------------------
usingInfiniFrame;
usingInfiniFrame.BlazorWebView;
usingInfiniFrameExample.BlazorWebView.Components;
usingMicrosoft.Extensions.DependencyInjection;
usingMicrosoft.Extensions.Logging;
usingSerilog;
usingSystem.Drawing;
namespaceInfiniFrameExample.BlazorWebView;
// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
publicstaticclassProgram{
[STAThread]
privatestaticvoidMain(string[]args){
varappBuilder=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("wwwroot/favicon.ico")
.SetWindowsAppUserModelId("InfiniLore.InfiniFrameExample.BlazorWebView")
// .Center()
// .SetUseOsDefaultSize(true)
// .SetUseOsDefaultLocation(true);
// .SetTitle("InfiniLore InfiniFrame.Blazor Sample")
.SetLocation(newPoint(100,100))
.SetSize(newSize(800,600))
// .SetMaxSize(new Size(800, 600))
// .SetMinSize(new Size(600, 400))
;
});
InfiniFrameBlazorAppapp=appBuilder.Build();
app.Run();
}
}