diff --git a/VPet.ModMaker/App.xaml.cs b/VPet.ModMaker/App.xaml.cs index 708af23..37c61ba 100644 --- a/VPet.ModMaker/App.xaml.cs +++ b/VPet.ModMaker/App.xaml.cs @@ -11,5 +11,7 @@ namespace VPet.ModMaker /// /// Interaction logic for App.xaml /// - public partial class App : Application { } + public partial class App : Application + { + } } diff --git a/VPet.ModMaker/Models/ModMaker.cs b/VPet.ModMaker/Models/ModMaker.cs index c480213..84fe804 100644 --- a/VPet.ModMaker/Models/ModMaker.cs +++ b/VPet.ModMaker/Models/ModMaker.cs @@ -23,7 +23,6 @@ public class ModMaker : MainPlugin public ModMaker(IMainWindow mainwin) : base(mainwin) { } - public override void LoadPlugin() { Set = MW.Set.FindLine("ModMaker"); @@ -41,11 +40,12 @@ public class ModMaker : MainPlugin modset.Items.Add(menuset); } - public override void Setting() { if (Maker == null) { + // 载入ModMaker资源 + Application.Current.Resources.MergedDictionaries.Add(new ModMakerStyles()); Maker = new ModMakerWindow(); Maker.ModMaker = this; Maker.Show(); diff --git a/VPet.ModMaker/Properties/DesignTimeResources.xaml b/VPet.ModMaker/Properties/DesignTimeResources.xaml new file mode 100644 index 0000000..6ffe8bc --- /dev/null +++ b/VPet.ModMaker/Properties/DesignTimeResources.xaml @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/VPet.ModMaker/Styles.cs b/VPet.ModMaker/Styles.cs new file mode 100644 index 0000000..314fbdc --- /dev/null +++ b/VPet.ModMaker/Styles.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace VPet.ModMaker; + +public partial class ModMakerStyles : ResourceDictionary +{ + public ModMakerStyles() + { + InitializeComponent(); + } +} diff --git a/VPet.ModMaker/Styles.xaml b/VPet.ModMaker/Styles.xaml index f50a7f4..1c68f3c 100644 --- a/VPet.ModMaker/Styles.xaml +++ b/VPet.ModMaker/Styles.xaml @@ -27,4 +27,5 @@ +