2023-08-19 21:52:13 +00:00
|
|
|
|
using HKW.HKWViewModels.SimpleObservable;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using VPet.Plugin.ModMaker.Models;
|
|
|
|
|
using VPet.Plugin.ModMaker.Views;
|
|
|
|
|
using VPet.Plugin.ModMaker.Views.ModEdit;
|
|
|
|
|
|
|
|
|
|
namespace VPet.Plugin.ModMaker.ViewModels;
|
|
|
|
|
|
|
|
|
|
public class WindowVM_ModMaker
|
|
|
|
|
{
|
|
|
|
|
public ModMakerWindow ModMakerWindow { get; }
|
|
|
|
|
|
|
|
|
|
public ModEditWindow ModEditWindow { get; private set; }
|
|
|
|
|
|
|
|
|
|
public ObservableCommand CreateNewModCommand { get; set; } =
|
|
|
|
|
new() { ExecuteAction = () => { } };
|
|
|
|
|
|
|
|
|
|
public WindowVM_ModMaker() { }
|
|
|
|
|
|
|
|
|
|
public WindowVM_ModMaker(ModMakerWindow window)
|
|
|
|
|
{
|
|
|
|
|
ModMakerWindow = window;
|
|
|
|
|
CreateNewModCommand.ExecuteAction = CreateNewMod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CreateNewMod()
|
|
|
|
|
{
|
2023-08-21 15:30:55 +00:00
|
|
|
|
I18nHelper.Current = new();
|
2023-08-19 21:52:13 +00:00
|
|
|
|
ModEditWindow = new();
|
|
|
|
|
ModEditWindow.Show();
|
|
|
|
|
ModMakerWindow.Hide();
|
|
|
|
|
ModEditWindow.Closed += (s, e) =>
|
|
|
|
|
{
|
|
|
|
|
ModMakerWindow.Close();
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|