mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
5c5fafee94
- 主界面布局修改, 添加`第一次启动失败`按钮 SettingEditor: - 设置主页面修改, 添加`全部重置`按钮, 列表项右键菜单功能移至页面右侧 - 模组管理页面修复名称和描述未载入翻译的问题 SaveViewer: - 存档列表添加`哈希`列
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using HKW.HKWUtils;
|
|
using LinePutScript.Localization.WPF;
|
|
using Panuon.WPF.UI;
|
|
using System.ComponentModel;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using VPet.Solution.ViewModels;
|
|
using VPet.Solution.Views.SaveViewer;
|
|
using VPet.Solution.Views.SettingEditor;
|
|
|
|
namespace VPet.Solution.Views;
|
|
|
|
/// <summary>
|
|
/// MainWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class MainWindow : WindowX
|
|
{
|
|
public MainWindowVM ViewModel => (MainWindowVM)DataContext;
|
|
|
|
public SettingWindow SettingWindow { get; } = new();
|
|
public SaveWindow SaveWindow { get; } = new();
|
|
|
|
public MainWindow()
|
|
{
|
|
if (App.IsDone)
|
|
{
|
|
Close();
|
|
return;
|
|
}
|
|
InitializeComponent();
|
|
this.SetViewModel<MainWindowVM>();
|
|
Closed += MainWindow_Closed;
|
|
}
|
|
|
|
private void MainWindow_Closed(object sender, EventArgs e)
|
|
{
|
|
SettingWindow.CloseX();
|
|
SaveWindow.CloseX();
|
|
}
|
|
|
|
private void Button_OpenSettingEditor_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
SettingWindow.ShowOrActivate();
|
|
}
|
|
|
|
private void Button_OpenSaveViewer_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
SaveWindow.ShowOrActivate();
|
|
}
|
|
}
|