57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using Cowain.Bake.Common;
|
|
using Cowain.Bake.Common.Core;
|
|
using Prism.Regions;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Unity;
|
|
|
|
namespace Cowain.Bake.UI.Helper.ViewModels
|
|
{
|
|
public class AboutWindowViewModel : ViewModelBase
|
|
{
|
|
private string windowTitle = $"About - {Global.VS}";
|
|
public string WindowTitle
|
|
{
|
|
get => windowTitle;
|
|
set => SetProperty(ref windowTitle, value);
|
|
}
|
|
|
|
private string heading = $"{SettingProvider.Instance.ProductionLineName}";
|
|
public string Heading
|
|
{
|
|
get => heading;
|
|
set => SetProperty(ref heading, value);
|
|
}
|
|
private string notes ;
|
|
public string Notes
|
|
{
|
|
get => notes;
|
|
set => SetProperty(ref notes, value);
|
|
}
|
|
|
|
public AboutWindowViewModel(IUnityContainer unityContainer, IRegionManager regionManager) : base(unityContainer, regionManager)
|
|
{
|
|
this.PageTitle = "文件版本";
|
|
LoadData();
|
|
}
|
|
|
|
public void LoadData()
|
|
{
|
|
string content = File.ReadAllText("Notes.txt");
|
|
if (content != null)
|
|
{
|
|
Notes = content;
|
|
}
|
|
else
|
|
{
|
|
Notes = "No release notes available.";
|
|
}
|
|
}
|
|
}
|
|
}
|