UI update, almost complete support of Taskbar, classes separation and organization

This commit is contained in:
2021-08-14 01:20:38 +02:00
parent 6b192fc978
commit 0ba7d20ad2
18 changed files with 790 additions and 221 deletions

55
Views/Settings.xaml.cs Normal file
View File

@ -0,0 +1,55 @@
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Windows;
using System.Windows.Navigation;
namespace unison.Views
{
public partial class Settings : Window
{
public string GetVersion => Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
public Settings()
{
InitializeComponent();
DataContext = this;
WindowState = WindowState.Minimized;
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
ProcessStartInfo psi = new(e.Uri.AbsoluteUri);
psi.UseShellExecute = true;
Process.Start(psi);
e.Handled = true;
}
private void Window_Closing(object sender, CancelEventArgs e)
{
e.Cancel = true;
WindowState = WindowState.Minimized;
Hide();
}
public string GetLicense
{
get
{
try
{
var Reader = new StreamReader("LICENSE");
string file = "";
file = file + Reader.ReadToEnd();
return file;
}
catch (IOException e)
{
return e.Message;
}
}
}
}
}