-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
51 lines (41 loc) · 1.43 KB
/
Program.cs
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
using System;
using System.Net.Http;
using System.Threading;
using Microsoft.Extensions.DependencyInjection;
using Photino.Blazor;
using Photino.NET;
using Radzen;
namespace m3u8_downloader_photino
{
class Program
{
public static PhotinoWindow MainWindow { get; private set; }
public static SynchronizationContext Context { get; set; }
[STAThread]
static void Main(string[] args)
{
var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args);
appBuilder.Services
.AddLogging()
.AddRadzenComponents();
// register root component and selector
appBuilder.RootComponents.Add<App>("app");
var app = appBuilder.Build();
// customize window
app.MainWindow
.SetSize(1000, 1000)
.SetMinSize(600, 500)
//.SetResizable(false)
.SetFileSystemAccessEnabled(true)
.SetIconFile("favicon.ico")
//.SetBrowserControlInitParameters("--unsafely-disable-devtools-self-xss-warnings")
.SetTitle("M3U8 downloader");
MainWindow = app.MainWindow;
AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
{
app.MainWindow.ShowMessage("Fatal exception", error.ExceptionObject.ToString());
};
app.Run();
}
}
}