Working MainWindow buttons, read license from file
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user