mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-08 20:21:06 +00:00
Changed the plugin initialization so it throws an exception if unable to load config file, rather than creating a new config file.
This commit is contained in:
parent
d373bf0866
commit
6c50f8be6f
6 changed files with 79 additions and 71 deletions
|
|
@ -25,7 +25,7 @@ namespace ServerManagerTool.Plugin.Discord.Windows
|
|||
InitializeComponent();
|
||||
WindowUtils.UpdateResourceDictionary(this, plugin.LanguageCode);
|
||||
|
||||
this.Plugin = plugin ?? new DiscordPlugin();
|
||||
this.Plugin = plugin;
|
||||
this.OriginalProfile = profile;
|
||||
this.Profile = profile.Clone();
|
||||
this.Profile.CommitChanges();
|
||||
|
|
@ -77,7 +77,10 @@ namespace ServerManagerTool.Plugin.Discord.Windows
|
|||
if (this.Profile.HasAnyChanges)
|
||||
{
|
||||
if (MessageBox.Show(ResourceUtils.GetResourceString(this.Resources, "ConfigProfileWindow_CloseLabel"), ResourceUtils.GetResourceString(this.Resources, "ConfigProfileWindow_CloseTitle"), MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
|
||||
{
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue