From 71632f529ac7d7ecf162e2bfcd321753d9c6bbb3 Mon Sep 17 00:00:00 2001 From: Hakoyu Date: Sun, 7 Jan 2024 16:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E5=87=BA=E7=8E=B0=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/ModEdit/AnimeEdit/AnimePageVM.cs | 1 - .../AnimeEdit/SelectGraphTypeWindow.xaml.cs | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/VPet.ModMaker/ViewModels/ModEdit/AnimeEdit/AnimePageVM.cs b/VPet.ModMaker/ViewModels/ModEdit/AnimeEdit/AnimePageVM.cs index f81cf9d..dc24edf 100644 --- a/VPet.ModMaker/ViewModels/ModEdit/AnimeEdit/AnimePageVM.cs +++ b/VPet.ModMaker/ViewModels/ModEdit/AnimeEdit/AnimePageVM.cs @@ -203,7 +203,6 @@ public class AnimePageVM if (window.IsCancel) return; Animes[Animes.IndexOf(animeTypeModel)] = newAnime; - Animes[Animes.IndexOf(animeTypeModel)] = newAnime; if (ShowAnimes.Value.Count != Animes.Count) ShowAnimes.Value[ShowAnimes.Value.IndexOf(animeTypeModel)] = newAnime; } diff --git a/VPet.ModMaker/Views/ModEdit/AnimeEdit/SelectGraphTypeWindow.xaml.cs b/VPet.ModMaker/Views/ModEdit/AnimeEdit/SelectGraphTypeWindow.xaml.cs index 42c3553..b1cd0da 100644 --- a/VPet.ModMaker/Views/ModEdit/AnimeEdit/SelectGraphTypeWindow.xaml.cs +++ b/VPet.ModMaker/Views/ModEdit/AnimeEdit/SelectGraphTypeWindow.xaml.cs @@ -1,5 +1,5 @@ using HKW.HKWUtils.Observable; - +using LinePutScript.Localization.WPF; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -72,7 +72,7 @@ public partial class SelectGraphTypeWindow : Window new(new()); public ObservableValue AnimeName { get; } = new(); - public ObservableValue HasNameAnime { get; } = new(); + public ObservableValue HasNameAnime { get; } = new(true); public bool IsCancel { get; private set; } = true; @@ -83,6 +83,16 @@ public partial class SelectGraphTypeWindow : Window private void Button_Yes_Click(object sender, RoutedEventArgs e) { + //if (string.IsNullOrWhiteSpace(AnimeName.Value)) + //{ + // MessageBox.Show( + // "动画名称不能为空".Translate(), + // "", + // MessageBoxButton.OK, + // MessageBoxImage.Warning + // ); + // return; + //} IsCancel = false; Close(); }