Working MainWindow buttons, read license from file

This commit is contained in:
2021-08-14 02:28:21 +02:00
parent 0ba7d20ad2
commit 6dd31fcdff
6 changed files with 737 additions and 41 deletions

View File

@ -5,12 +5,30 @@ using System.Reflection;
using System.Windows;
using System.Windows.Navigation;
namespace unison.Views
namespace unison
{
public partial class Settings : Window
{
public string GetVersion => Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
public string GetLicense
{
get
{
try
{
StreamReader Reader = new("LICENSE");
string file = "";
file = file + Reader.ReadToEnd();
return file;
}
catch (IOException e)
{
return e.Message;
}
}
}
public Settings()
{
InitializeComponent();
@ -33,23 +51,5 @@ namespace unison.Views
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;
}
}
}
}
}