mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
更新
This commit is contained in:
@ -78,10 +78,10 @@
|
|||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="VPet-Simulator.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="VPet-Simulator.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\VPet-Simulator.Core.1.0.7\lib\net462\VPet-Simulator.Core.dll</HintPath>
|
<HintPath>..\packages\VPet-Simulator.Core.1.0.8\lib\net462\VPet-Simulator.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="VPet-Simulator.Windows.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="VPet-Simulator.Windows.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\VPet-Simulator.Windows.Interface.1.0.7\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
|
<HintPath>..\packages\VPet-Simulator.Windows.Interface.1.0.8\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -11,11 +11,25 @@ namespace VPet.ModMaker.ViewModels.ModEdit;
|
|||||||
|
|
||||||
public class AddCultureWindowVM
|
public class AddCultureWindowVM
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 显示的文化
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<ObservableCollection<string>> ShowCultures { get; } = new();
|
public ObservableValue<ObservableCollection<string>> ShowCultures { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 全部文化
|
||||||
|
/// </summary>
|
||||||
public static ObservableCollection<string> AllCultures { get; set; } =
|
public static ObservableCollection<string> AllCultures { get; set; } =
|
||||||
new(LinePutScript.Localization.WPF.LocalizeCore.AvailableCultures);
|
new(LinePutScript.Localization.WPF.LocalizeCore.AvailableCultures);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前文化
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<string> Culture { get; } = new();
|
public ObservableValue<string> Culture { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搜索文化
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<string> Search { get; } = new();
|
public ObservableValue<string> Search { get; } = new();
|
||||||
|
|
||||||
public AddCultureWindowVM()
|
public AddCultureWindowVM()
|
||||||
|
@ -23,65 +23,74 @@ public class ModEditWindowVM
|
|||||||
public ModEditWindow ModEditWindow { get; }
|
public ModEditWindow ModEditWindow { get; }
|
||||||
|
|
||||||
#region Value
|
#region Value
|
||||||
|
/// <summary>
|
||||||
|
/// 当前模组信息
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<ModInfoModel> ModInfo { get; } = new(ModInfoModel.Current);
|
public ObservableValue<ModInfoModel> ModInfo { get; } = new(ModInfoModel.Current);
|
||||||
public ObservableValue<string> CurrentLang { get; } = new();
|
|
||||||
|
/// <summary>
|
||||||
|
/// I18n数据
|
||||||
|
/// </summary>
|
||||||
public I18nHelper I18nData => I18nHelper.Current;
|
public I18nHelper I18nData => I18nHelper.Current;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Command
|
#region Command
|
||||||
public ObservableCommand AddImageCommand { get; } = new();
|
|
||||||
|
/// <summary>
|
||||||
|
/// 改变图片命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand ChangeImageCommand { get; } = new();
|
public ObservableCommand ChangeImageCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加文化命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand AddCultureCommand { get; } = new();
|
public ObservableCommand AddCultureCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑文化命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand<string> EditCultureCommand { get; } = new();
|
public ObservableCommand<string> EditCultureCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除文化命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand<string> RemoveCultureCommand { get; } = new();
|
public ObservableCommand<string> RemoveCultureCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand SaveCommand { get; } = new();
|
public ObservableCommand SaveCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存至命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand SaveToCommand { get; } = new();
|
public ObservableCommand SaveToCommand { get; } = new();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ModEditWindowVM() { }
|
|
||||||
|
|
||||||
public ModEditWindowVM(ModEditWindow window)
|
public ModEditWindowVM(ModEditWindow window)
|
||||||
{
|
{
|
||||||
ModEditWindow = window;
|
ModEditWindow = window;
|
||||||
CurrentLang.ValueChanged += CurrentLang_ValueChanged;
|
|
||||||
|
|
||||||
AddImageCommand.ExecuteEvent += AddImage;
|
|
||||||
ChangeImageCommand.ExecuteEvent += ChangeImage;
|
ChangeImageCommand.ExecuteEvent += ChangeImage;
|
||||||
AddCultureCommand.ExecuteEvent += AddCulture;
|
AddCultureCommand.ExecuteEvent += AddCulture;
|
||||||
EditCultureCommand.ExecuteEvent += EditCulture;
|
EditCultureCommand.ExecuteEvent += EditCulture;
|
||||||
RemoveCultureCommand.ExecuteEvent += RemoveLang;
|
RemoveCultureCommand.ExecuteEvent += RemoveCulture;
|
||||||
|
|
||||||
SaveCommand.ExecuteEvent += Save;
|
SaveCommand.ExecuteEvent += Save;
|
||||||
SaveToCommand.ExecuteEvent += SaveTo;
|
SaveToCommand.ExecuteEvent += SaveTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentLang_ValueChanged(string oldValue, string newValue)
|
/// <summary>
|
||||||
{
|
/// 关闭
|
||||||
if (newValue is null)
|
/// </summary>
|
||||||
return;
|
|
||||||
ModInfo.Value.CurrentI18nData.Value = ModInfo.Value.I18nDatas[newValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
ModInfo.Value.Image.Value?.StreamSource?.Close();
|
ModInfo.Value.Image.Value?.StreamSource?.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddImage()
|
/// <summary>
|
||||||
{
|
/// 改变图片
|
||||||
OpenFileDialog openFileDialog =
|
/// </summary>
|
||||||
new()
|
|
||||||
{
|
|
||||||
Title = "选择图片".Translate(),
|
|
||||||
Filter = $"图片|*.jpg;*.jpeg;*.png;*.bmp".Translate()
|
|
||||||
};
|
|
||||||
if (openFileDialog.ShowDialog() is true)
|
|
||||||
{
|
|
||||||
ModInfo.Value.Image.Value = Utils.LoadImageToMemoryStream(openFileDialog.FileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ChangeImage()
|
private void ChangeImage()
|
||||||
{
|
{
|
||||||
OpenFileDialog openFileDialog =
|
OpenFileDialog openFileDialog =
|
||||||
@ -97,6 +106,10 @@ public class ModEditWindowVM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Culture
|
||||||
|
/// <summary>
|
||||||
|
/// 添加文化
|
||||||
|
/// </summary>
|
||||||
public void AddCulture()
|
public void AddCulture()
|
||||||
{
|
{
|
||||||
var window = new AddCultureWindow();
|
var window = new AddCultureWindow();
|
||||||
@ -108,32 +121,48 @@ public class ModEditWindowVM
|
|||||||
I18nHelper.Current.CultureName.Value = window.ViewModel.Culture.Value;
|
I18nHelper.Current.CultureName.Value = window.ViewModel.Culture.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EditCulture(string oldLang)
|
/// <summary>
|
||||||
|
/// 编辑文化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldCulture">旧文化</param>
|
||||||
|
private void EditCulture(string oldCulture)
|
||||||
{
|
{
|
||||||
var window = new AddCultureWindow();
|
var window = new AddCultureWindow();
|
||||||
window.ViewModel.Culture.Value = oldLang.Translate();
|
window.ViewModel.Culture.Value = oldCulture.Translate();
|
||||||
window.ShowDialog();
|
window.ShowDialog();
|
||||||
if (window.IsCancel)
|
if (window.IsCancel)
|
||||||
return;
|
return;
|
||||||
I18nHelper.Current.CultureNames[I18nHelper.Current.CultureNames.IndexOf(oldLang)] = window
|
I18nHelper.Current.CultureNames[I18nHelper.Current.CultureNames.IndexOf(oldCulture)] =
|
||||||
.ViewModel
|
window.ViewModel.Culture.Value;
|
||||||
.Culture
|
|
||||||
.Value;
|
|
||||||
CurrentLang.Value = window.ViewModel.Culture.Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveLang(string oldLang)
|
/// <summary>
|
||||||
|
/// 删除文化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldCulture">旧文化</param>
|
||||||
|
private void RemoveCulture(string oldCulture)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
MessageBox.Show("确定删除吗".Translate(), "".Translate(), MessageBoxButton.YesNo)
|
MessageBox.Show(
|
||||||
is MessageBoxResult.No
|
"确定删除文化 {0} 吗".Translate(oldCulture),
|
||||||
|
"".Translate(),
|
||||||
|
MessageBoxButton.YesNo
|
||||||
|
) is MessageBoxResult.No
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
I18nHelper.Current.CultureNames.Remove(oldLang);
|
I18nHelper.Current.CultureNames.Remove(oldCulture);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Save
|
||||||
|
/// <summary>
|
||||||
|
/// 保存
|
||||||
|
/// </summary>
|
||||||
private void Save()
|
private void Save()
|
||||||
{
|
{
|
||||||
|
if (MessageBox.Show("确定保存吗".Translate()) is not MessageBoxResult.Yes)
|
||||||
|
return;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(ModInfo.Value.SourcePath.Value))
|
if (string.IsNullOrEmpty(ModInfo.Value.SourcePath.Value))
|
||||||
{
|
{
|
||||||
MessageBox.Show("源路径为空, 请使用 保存至".Translate());
|
MessageBox.Show("源路径为空, 请使用 保存至".Translate());
|
||||||
@ -151,6 +180,9 @@ public class ModEditWindowVM
|
|||||||
MessageBox.Show("保存成功".Translate());
|
MessageBox.Show("保存成功".Translate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存至
|
||||||
|
/// </summary>
|
||||||
private void SaveTo()
|
private void SaveTo()
|
||||||
{
|
{
|
||||||
if (ValidationData(ModInfo.Value) is false)
|
if (ValidationData(ModInfo.Value) is false)
|
||||||
@ -183,6 +215,11 @@ public class ModEditWindowVM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 验证数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="model">模型</param>
|
||||||
|
/// <returns>成功为 <see langword="true"/> 失败为 <see langword="false"/></returns>
|
||||||
private bool ValidationData(ModInfoModel model)
|
private bool ValidationData(ModInfoModel model)
|
||||||
{
|
{
|
||||||
if (I18nHelper.Current.CultureNames.Count == 0)
|
if (I18nHelper.Current.CultureNames.Count == 0)
|
||||||
@ -207,4 +244,5 @@ public class ModEditWindowVM
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -25,19 +25,42 @@ public class ModMakerWindowVM
|
|||||||
|
|
||||||
public ModEditWindow ModEditWindow { get; private set; }
|
public ModEditWindow ModEditWindow { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 历史搜索文本
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<string> HistoriesSearchText { get; } = new();
|
public ObservableValue<string> HistoriesSearchText { get; } = new();
|
||||||
|
|
||||||
public ObservableCollection<ModInfoModel> Mods { get; } = new();
|
/// <summary>
|
||||||
|
/// 显示的历史
|
||||||
|
/// </summary>
|
||||||
public ObservableValue<ObservableCollection<ModMakerHistory>> ShowHistories { get; } = new();
|
public ObservableValue<ObservableCollection<ModMakerHistory>> ShowHistories { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 历史
|
||||||
|
/// </summary>
|
||||||
public ObservableCollection<ModMakerHistory> Histories { get; } = new();
|
public ObservableCollection<ModMakerHistory> Histories { get; } = new();
|
||||||
#endregion
|
#endregion
|
||||||
#region Command
|
#region Command
|
||||||
|
/// <summary>
|
||||||
|
/// 创建新模组命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand CreateNewModCommand { get; } = new();
|
public ObservableCommand CreateNewModCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从文件载入模组命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand LoadModFromFileCommand { get; } = new();
|
public ObservableCommand LoadModFromFileCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清除历史命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand ClearHistoriesCommand { get; } = new();
|
public ObservableCommand ClearHistoriesCommand { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除历史命令
|
||||||
|
/// </summary>
|
||||||
public ObservableCommand<ModMakerHistory> RemoveHistoryCommand { get; } = new();
|
public ObservableCommand<ModMakerHistory> RemoveHistoryCommand { get; } = new();
|
||||||
#endregion
|
#endregion
|
||||||
public ModMakerWindowVM() { }
|
|
||||||
|
|
||||||
public ModMakerWindowVM(ModMakerWindow window)
|
public ModMakerWindowVM(ModMakerWindow window)
|
||||||
{
|
{
|
||||||
@ -48,15 +71,27 @@ public class ModMakerWindowVM
|
|||||||
LoadModFromFileCommand.ExecuteEvent += LoadModFromFile;
|
LoadModFromFileCommand.ExecuteEvent += LoadModFromFile;
|
||||||
ClearHistoriesCommand.ExecuteEvent += ClearHistories;
|
ClearHistoriesCommand.ExecuteEvent += ClearHistories;
|
||||||
RemoveHistoryCommand.ExecuteEvent += RemoveHistory;
|
RemoveHistoryCommand.ExecuteEvent += RemoveHistory;
|
||||||
HistoriesSearchText.ValueChanged += ModSearchText_ValueChanged;
|
HistoriesSearchText.ValueChanged += HistoriesSearchText_ValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HistoriesSearchText_ValueChanged(string oldValue, string newValue)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(newValue))
|
||||||
|
ShowHistories.Value = Histories;
|
||||||
|
else
|
||||||
|
ShowHistories.Value = new(Histories.Where(i => i.Id.Contains(newValue)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#region History
|
||||||
private void RemoveHistory(ModMakerHistory value)
|
private void RemoveHistory(ModMakerHistory value)
|
||||||
{
|
{
|
||||||
Histories.Remove(value);
|
Histories.Remove(value);
|
||||||
SaveHistories();
|
SaveHistories();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载入历史
|
||||||
|
/// </summary>
|
||||||
private void LoadHistories()
|
private void LoadHistories()
|
||||||
{
|
{
|
||||||
if (File.Exists(ModMakerInfo.HistoryFile) is false)
|
if (File.Exists(ModMakerInfo.HistoryFile) is false)
|
||||||
@ -70,6 +105,9 @@ public class ModMakerWindowVM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存历史
|
||||||
|
/// </summary>
|
||||||
private void SaveHistories()
|
private void SaveHistories()
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(nameof(ModMaker));
|
Directory.CreateDirectory(nameof(ModMaker));
|
||||||
@ -77,6 +115,7 @@ public class ModMakerWindowVM
|
|||||||
File.Create(ModMakerInfo.HistoryFile).Close();
|
File.Create(ModMakerInfo.HistoryFile).Close();
|
||||||
var lps = new LPS();
|
var lps = new LPS();
|
||||||
foreach (var history in Histories)
|
foreach (var history in Histories)
|
||||||
|
{
|
||||||
lps.Add(
|
lps.Add(
|
||||||
new Line(nameof(history))
|
new Line(nameof(history))
|
||||||
{
|
{
|
||||||
@ -85,9 +124,14 @@ public class ModMakerWindowVM
|
|||||||
new Sub("LastTime", history.LastTime.ToString("yyyy/MM/dd HH:mm"))
|
new Sub("LastTime", history.LastTime.ToString("yyyy/MM/dd HH:mm"))
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
File.WriteAllText(ModMakerInfo.HistoryFile, lps.ToString());
|
File.WriteAllText(ModMakerInfo.HistoryFile, lps.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加历史
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="modInfo">模组信息</param>
|
||||||
private void AddHistories(ModInfoModel modInfo)
|
private void AddHistories(ModInfoModel modInfo)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
@ -112,47 +156,6 @@ public class ModMakerWindowVM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ModSearchText_ValueChanged(string oldValue, string newValue)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(newValue))
|
|
||||||
ShowHistories.Value = Histories;
|
|
||||||
else
|
|
||||||
ShowHistories.Value = new(Histories.Where(i => i.Id.Contains(newValue)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CreateNewMod()
|
|
||||||
{
|
|
||||||
ModInfoModel.Current = new();
|
|
||||||
ShowEditWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EditMod(ModInfoModel modInfo)
|
|
||||||
{
|
|
||||||
ModInfoModel.Current = modInfo;
|
|
||||||
ShowEditWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ShowEditWindow()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(ModInfoModel.Current.SourcePath.Value) is false)
|
|
||||||
AddHistories(ModInfoModel.Current);
|
|
||||||
SaveHistories();
|
|
||||||
ModEditWindow = new();
|
|
||||||
ModEditWindow.Show();
|
|
||||||
ModMakerWindow.Hide();
|
|
||||||
ModEditWindow.Closed += (s, e) =>
|
|
||||||
{
|
|
||||||
var modInfo = ModInfoModel.Current;
|
|
||||||
if (string.IsNullOrEmpty(modInfo.SourcePath.Value) is false)
|
|
||||||
AddHistories(modInfo);
|
|
||||||
SaveHistories();
|
|
||||||
ModInfoModel.Current.Close();
|
|
||||||
ModInfoModel.Current = null;
|
|
||||||
I18nHelper.Current = new();
|
|
||||||
ModMakerWindow.Show();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClearHistories()
|
private void ClearHistories()
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
@ -164,7 +167,58 @@ public class ModMakerWindowVM
|
|||||||
Histories.Clear();
|
Histories.Clear();
|
||||||
File.WriteAllText(ModMakerInfo.HistoryFile, string.Empty);
|
File.WriteAllText(ModMakerInfo.HistoryFile, string.Empty);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Mod
|
||||||
|
/// <summary>
|
||||||
|
/// 创建新模组
|
||||||
|
/// </summary>
|
||||||
|
public void CreateNewMod()
|
||||||
|
{
|
||||||
|
ModInfoModel.Current = new();
|
||||||
|
ShowEditWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑模组
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="modInfo">模组信息</param>
|
||||||
|
public void EditMod(ModInfoModel modInfo)
|
||||||
|
{
|
||||||
|
ModInfoModel.Current = modInfo;
|
||||||
|
ShowEditWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示模组编辑窗口
|
||||||
|
/// </summary>
|
||||||
|
private void ShowEditWindow()
|
||||||
|
{
|
||||||
|
ModMakerWindow.Hide();
|
||||||
|
// 将当前模组添加到历史
|
||||||
|
if (string.IsNullOrEmpty(ModInfoModel.Current.SourcePath.Value) is false)
|
||||||
|
AddHistories(ModInfoModel.Current);
|
||||||
|
SaveHistories();
|
||||||
|
ModEditWindow = new();
|
||||||
|
ModEditWindow.Show();
|
||||||
|
ModEditWindow.Closed += (s, e) =>
|
||||||
|
{
|
||||||
|
var modInfo = ModInfoModel.Current;
|
||||||
|
if (string.IsNullOrEmpty(modInfo.SourcePath.Value) is false)
|
||||||
|
{
|
||||||
|
AddHistories(modInfo);
|
||||||
|
SaveHistories();
|
||||||
|
}
|
||||||
|
ModInfoModel.Current.Close();
|
||||||
|
ModInfoModel.Current = null;
|
||||||
|
I18nHelper.Current = new();
|
||||||
|
ModMakerWindow.Show();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从文件载入模组
|
||||||
|
/// </summary>
|
||||||
public void LoadModFromFile()
|
public void LoadModFromFile()
|
||||||
{
|
{
|
||||||
OpenFileDialog openFileDialog =
|
OpenFileDialog openFileDialog =
|
||||||
@ -180,6 +234,10 @@ public class ModMakerWindowVM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载入模组
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">位置</param>
|
||||||
public void LoadMod(string path)
|
public void LoadMod(string path)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -200,4 +258,5 @@ public class ModMakerWindowVM
|
|||||||
MessageBox.Show("模组载入失败:\n{0}".Translate(ex));
|
MessageBox.Show("模组载入失败:\n{0}".Translate(ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Window
|
<pu:WindowX
|
||||||
x:Class="VPet.ModMaker.Views.ModEdit.AddCultureWindow"
|
x:Class="VPet.ModMaker.Views.ModEdit.AddCultureWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
@ -49,13 +49,15 @@
|
|||||||
x:Name="Button_Cancel"
|
x:Name="Button_Cancel"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
Click="Button_Cancel_Click"
|
Click="Button_Cancel_Click"
|
||||||
Content="{ll:Str 取消}" />
|
Content="{ll:Str 取消}"
|
||||||
|
IsCancel="True" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="Button_Yes"
|
x:Name="Button_Yes"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
Click="Button_Yes_Click"
|
Click="Button_Yes_Click"
|
||||||
Content="{ll:Str 确定}" />
|
Content="{ll:Str 确定}"
|
||||||
|
IsDefault="True" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
@ -70,4 +72,4 @@
|
|||||||
SelectedItem="{Binding Culture.Value}" />
|
SelectedItem="{Binding Culture.Value}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</pu:WindowX>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using HKW.HKWViewModels.SimpleObservable;
|
using HKW.HKWViewModels.SimpleObservable;
|
||||||
|
using LinePutScript.Localization.WPF;
|
||||||
|
using Panuon.WPF.UI;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@ -23,7 +25,7 @@ namespace VPet.ModMaker.Views.ModEdit;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Window_AddLang.xaml 的交互逻辑
|
/// Window_AddLang.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class AddCultureWindow : Window
|
public partial class AddCultureWindow : WindowX
|
||||||
{
|
{
|
||||||
public bool IsCancel { get; private set; } = true;
|
public bool IsCancel { get; private set; } = true;
|
||||||
|
|
||||||
@ -34,6 +36,7 @@ public partial class AddCultureWindow : Window
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = new AddCultureWindowVM();
|
DataContext = new AddCultureWindowVM();
|
||||||
TextBox_Lang.Focus();
|
TextBox_Lang.Focus();
|
||||||
|
TextBox_Lang.Dispatcher.InvokeAsync(TextBox_Lang.SelectAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button_Cancel_Click(object sender, RoutedEventArgs e)
|
private void Button_Cancel_Click(object sender, RoutedEventArgs e)
|
||||||
@ -43,14 +46,14 @@ public partial class AddCultureWindow : Window
|
|||||||
|
|
||||||
private void Button_Yes_Click(object sender, RoutedEventArgs e)
|
private void Button_Yes_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(ViewModel.Culture.Value))
|
if (string.IsNullOrWhiteSpace(ViewModel.Culture.Value))
|
||||||
{
|
{
|
||||||
MessageBox.Show("文化不可为空", "", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show("文化不可为空".Translate(), "", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (I18nHelper.Current.CultureNames.Contains(ViewModel.Culture.Value))
|
if (I18nHelper.Current.CultureNames.Contains(ViewModel.Culture.Value))
|
||||||
{
|
{
|
||||||
MessageBox.Show("此文化已存在", "", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show("此文化已存在".Translate(), "", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IsCancel = false;
|
IsCancel = false;
|
||||||
|
@ -11,10 +11,8 @@
|
|||||||
Title="AnimeEditWindow"
|
Title="AnimeEditWindow"
|
||||||
Width="1000"
|
Width="1000"
|
||||||
Height="600"
|
Height="600"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:AnimeEditWindowVM}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:AnimeEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style
|
<Style
|
||||||
x:Key="ListBoxItem_Style"
|
x:Key="ListBoxItem_Style"
|
||||||
|
@ -9,12 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.AnimeEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.AnimeEdit"
|
||||||
Title="AnimePage"
|
Title="AnimePage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:AnimePageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:AnimePageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
Title="ClickTextWindow"
|
Title="ClickTextWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:ClickTextEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:ClickTextEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition MinWidth="300" />
|
<ColumnDefinition MinWidth="300" />
|
||||||
|
@ -9,12 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.ClickTextEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.ClickTextEdit"
|
||||||
Title="ClickTextPage"
|
Title="ClickTextPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:ClickTextPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:ClickTextPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -8,14 +8,12 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.FoodEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.FoodEdit"
|
||||||
Title="Window_FoodEdit"
|
Title="FoodEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:FoodEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:FoodEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="250" />
|
<ColumnDefinition Width="250" />
|
||||||
|
@ -8,13 +8,11 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.FoodEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.FoodEdit"
|
||||||
Title="Page_Food"
|
Title="FoodPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:FoodPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:FoodPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -8,14 +8,12 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.LowTextEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.LowTextEdit"
|
||||||
Title="Page_LowText"
|
Title="LowTextEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:LowTextEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:LowTextEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition MinWidth="300" />
|
<ColumnDefinition MinWidth="300" />
|
||||||
|
@ -8,13 +8,11 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.LowTextEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.LowTextEdit"
|
||||||
Title="Page_LowText"
|
Title="LowTextPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:LowTextPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:LowTextPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -8,28 +8,12 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit"
|
||||||
Title="ModEditWindow"
|
Title="{ll:Str 模组编辑器}"
|
||||||
Width="1000"
|
Width="1000"
|
||||||
Height="500"
|
Height="500"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:ModEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:ModEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Window.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ContextMenu x:Key="ContextMenu_Culture" x:Shared="false">
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding DataContext.ChangeCultureCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
|
|
||||||
CommandParameter="{Binding Content, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}"
|
|
||||||
Header="{ll:Str 修改语言}" />
|
|
||||||
<MenuItem
|
|
||||||
Command="{Binding DataContext.RemoveCultureCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
|
|
||||||
CommandParameter="{Binding Content, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}"
|
|
||||||
Header="{ll:Str 删除语言}" />
|
|
||||||
</ContextMenu>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</Window.Resources>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@ -74,7 +58,7 @@
|
|||||||
x:Name="Button_AddModImage"
|
x:Name="Button_AddModImage"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Command="{Binding AddImageCommand}"
|
Command="{Binding ChangeImageCommand}"
|
||||||
Content="{ll:Str 添加图片}">
|
Content="{ll:Str 添加图片}">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||||
@ -294,8 +278,22 @@
|
|||||||
SelectedItem="{Binding I18nData.CultureName.Value}">
|
SelectedItem="{Binding I18nData.CultureName.Value}">
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style BasedOn="{StaticResource {x:Type ListBoxItem}}" TargetType="ListBoxItem">
|
<Style BasedOn="{StaticResource {x:Type ListBoxItem}}" TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
|
||||||
<Setter Property="Content" Value="{Binding}" />
|
<Setter Property="Content" Value="{Binding}" />
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource ContextMenu_Culture}" />
|
<Setter Property="ContextMenu">
|
||||||
|
<Setter.Value>
|
||||||
|
<ContextMenu>
|
||||||
|
<MenuItem
|
||||||
|
Command="{Binding PlacementTarget.Tag.EditCultureCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Header="{ll:Str 修改语言}" />
|
||||||
|
<MenuItem
|
||||||
|
Command="{Binding PlacementTarget.Tag.RemoveCultureCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"
|
||||||
|
CommandParameter="{Binding}"
|
||||||
|
Header="{ll:Str 删除语言}" />
|
||||||
|
</ContextMenu>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.ItemContainerStyle>
|
</ListBox.ItemContainerStyle>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
Title="MoveEditWindow"
|
Title="MoveEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:MoveEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:MoveEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
@ -9,13 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.MoveEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.MoveEdit"
|
||||||
Title="MovePage"
|
Title="MovePage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:MovePageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:MovePageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
Title="PetEditWindow"
|
Title="PetEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:PetEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:PetEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style
|
<Style
|
||||||
x:Key="Label_ThouchRect"
|
x:Key="Label_ThouchRect"
|
||||||
|
@ -9,12 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.PetEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.PetEdit"
|
||||||
Title="PetPage"
|
Title="PetPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:PetPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:PetPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -8,14 +8,12 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit"
|
||||||
Title="SelectTextWindow"
|
Title="SelectTextEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:SelectTextEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:SelectTextEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition MinWidth="300" />
|
<ColumnDefinition MinWidth="300" />
|
||||||
|
@ -9,12 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.SelectTextEdit"
|
||||||
Title="SelectTextPage"
|
Title="SelectTextPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:SelectTextPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:SelectTextPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
Title="WorkEditWindow"
|
Title="WorkEditWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:WorkEditWindowVM}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:WorkEditWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
@ -9,12 +9,10 @@
|
|||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.WorkEdit"
|
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.WorkEdit"
|
||||||
Title="WorkPage"
|
Title="WorkPage"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:WorkPageVM}"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Page.DataContext>
|
|
||||||
<vm:WorkPageVM />
|
|
||||||
</d:Page.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
@ -11,12 +11,10 @@
|
|||||||
Title="{ll:Str Mod制作器}"
|
Title="{ll:Str Mod制作器}"
|
||||||
Width="600"
|
Width="600"
|
||||||
Height="450"
|
Height="450"
|
||||||
|
d:DataContext="{d:DesignInstance Type=vm:ModMakerWindowVM}"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<d:Window.DataContext>
|
|
||||||
<vm:ModMakerWindowVM />
|
|
||||||
</d:Window.DataContext>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
|
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
|
||||||
<package id="Panuon.WPF" version="1.0.3" targetFramework="net462" />
|
<package id="Panuon.WPF" version="1.0.3" targetFramework="net462" />
|
||||||
<package id="Panuon.WPF.UI" version="1.1.16.2" targetFramework="net462" />
|
<package id="Panuon.WPF.UI" version="1.1.16.2" targetFramework="net462" />
|
||||||
<package id="VPet-Simulator.Core" version="1.0.7" targetFramework="net462" />
|
<package id="VPet-Simulator.Core" version="1.0.8" targetFramework="net462" />
|
||||||
<package id="VPet-Simulator.Windows.Interface" version="1.0.7" targetFramework="net462" />
|
<package id="VPet-Simulator.Windows.Interface" version="1.0.8" targetFramework="net462" />
|
||||||
</packages>
|
</packages>
|
Reference in New Issue
Block a user