Fix authentication status label not updating after authentication
parent
5e3384b4fd
commit
282a1f7c36
|
@ -436,7 +436,7 @@ namespace LANCommander.PlaynitePlugin
|
|||
Logger.Trace("Name change was cancelled");
|
||||
}
|
||||
|
||||
public Window ShowAuthenticationWindow(string serverAddress = null)
|
||||
public Window ShowAuthenticationWindow(string serverAddress = null, EventHandler onClose = null)
|
||||
{
|
||||
Window window = null;
|
||||
Application.Current.Dispatcher.Invoke((Action)delegate
|
||||
|
@ -458,6 +458,10 @@ namespace LANCommander.PlaynitePlugin
|
|||
window.Owner = PlayniteApi.Dialogs.GetCurrentAppWindow();
|
||||
window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
window.ResizeMode = ResizeMode.NoResize;
|
||||
|
||||
if (onClose != null)
|
||||
window.Closed += onClose;
|
||||
|
||||
window.ShowDialog();
|
||||
});
|
||||
|
||||
|
|
|
@ -81,9 +81,7 @@ namespace LANCommander.PlaynitePlugin
|
|||
|
||||
private void AuthenticateButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var authWindow = Plugin.ShowAuthenticationWindow();
|
||||
|
||||
authWindow.Closed += AuthWindow_Closed;
|
||||
var authWindow = Plugin.ShowAuthenticationWindow(Settings.ServerAddress, AuthWindow_Closed);
|
||||
}
|
||||
|
||||
private void DisconnectButton_Click(object sender, RoutedEventArgs e)
|
||||
|
|
Loading…
Reference in New Issue