mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-08 20:21:06 +00:00
New Globalisation Changes
This commit is contained in:
parent
034d7401d1
commit
d4859e0722
10 changed files with 23 additions and 103 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using ServerManagerTool.Plugin.Common;
|
||||
using ServerManagerTool.Plugin.Common.Events;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
|
@ -23,9 +22,8 @@ namespace ServerManagerTool.Plugin.Discord.Windows
|
|||
try
|
||||
{
|
||||
ResourceUtils.UpdateResourceDictionary(this, PluginHelper.Instance.LanguageCode);
|
||||
PluginHelper.Instance.ResourceDictionaryChanged += OnResourceDictionaryChanged;
|
||||
}
|
||||
catch
|
||||
catch (Exception)
|
||||
{
|
||||
// do nothing, most likely they are using an older version of a server manager
|
||||
}
|
||||
|
|
@ -54,19 +52,6 @@ namespace ServerManagerTool.Plugin.Discord.Windows
|
|||
set { SetValue(SelectedFeedEntryProperty, value); }
|
||||
}
|
||||
|
||||
private void VersionFeedWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!e.Cancel)
|
||||
PluginHelper.Instance.ResourceDictionaryChanged -= OnResourceDictionaryChanged;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing, most likely they are using an older version of a server manager
|
||||
}
|
||||
}
|
||||
|
||||
private void VersionFeedWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
|
|
@ -100,17 +85,5 @@ namespace ServerManagerTool.Plugin.Discord.Windows
|
|||
|
||||
SelectedFeedEntry = FeedEntries.OrderByDescending(e => e.Updated).FirstOrDefault();
|
||||
}
|
||||
|
||||
private void OnResourceDictionaryChanged(object sender, ResourceDictionaryChangedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
ResourceUtils.UpdateResourceDictionary(this, PluginHelper.Instance.LanguageCode);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// do nothing, most likely they are using an older version of a server manager
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue