-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutWindow.axaml.cs
More file actions
48 lines (43 loc) · 1.27 KB
/
AboutWindow.axaml.cs
File metadata and controls
48 lines (43 loc) · 1.27 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
using System;
using System.Diagnostics;
using System.IO;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Dialogs.Internal;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using Avalonia.Platform;
namespace MoSpeedUI;
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
Height = 600;
Width = 800;
Logo.Width = this.ClientSize.Width / 2;
this.Resized += ((sender, args) =>
{
Logo.Width = (args.ClientSize.Width / 2);
});
LicenseBox.Text = new StreamReader(AssetLoader.Open(new Uri("avares://MoSpeedUI/Assets/Text/LicenseText.txt"))).ReadToEnd();
}
private void OpenGitBtn_OnClick(object? sender, RoutedEventArgs e)
{
Process p = new();
p.StartInfo.FileName = "https://github.com/Error504TimeOut/MoSpeedUI";
p.StartInfo.UseShellExecute = true;
p.Start();
}
private void ReportBugBtn_OnClick(object? sender, RoutedEventArgs e)
{
Process p = new();
p.StartInfo.FileName = "https://github.com/Error504TimeOut/MoSpeedUI/issues";
p.StartInfo.UseShellExecute = true;
p.Start();
}
private void ClsBtn_OnClick(object? sender, RoutedEventArgs e)
{
Close();
}
}