Files
MayShow/src/Views/AboutView.axaml.cs
T
2026-03-03 11:32:54 +09:00

38 lines
999 B
C#

using System;
using System.IO;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace MayShow.Views
{
public partial class AboutView : UserControl
{
public AboutView()
{
this.InitializeComponent();
// set license text
var licenseFileName = "Assets/LICENSES.txt";
var licenseText = "";
if (File.Exists(licenseFileName))
{
licenseText = File.ReadAllText(licenseFileName);
}
else
{
licenseFileName = "../Resources/Assets/LICENSES.txt";
if (File.Exists(licenseFileName))
{
licenseText = File.ReadAllText(licenseFileName);
}
else
{
licenseText = "Error: Unable to find license file!";
}
}
LicenseTextBlock.Text = licenseText.Trim();
}
}
}