From 149dd9b07ec287d5a4e3b7faab4502c351cf9cc9 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Sun, 2 Jan 2022 21:34:16 -0700 Subject: [PATCH] WIP --- Wabbajack.App.Wpf/LoginManagers/INeedsLogin.cs | 3 ++- Wabbajack.App.Wpf/Views/Settings/LoginItemView.xaml.cs | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Wabbajack.App.Wpf/LoginManagers/INeedsLogin.cs b/Wabbajack.App.Wpf/LoginManagers/INeedsLogin.cs index a76fe4e7..073b8900 100644 --- a/Wabbajack.App.Wpf/LoginManagers/INeedsLogin.cs +++ b/Wabbajack.App.Wpf/LoginManagers/INeedsLogin.cs @@ -1,6 +1,7 @@ -using System; + using System.Windows.Input; using System.Windows.Media; +using ReactiveUI; namespace Wabbajack.LoginManagers; diff --git a/Wabbajack.App.Wpf/Views/Settings/LoginItemView.xaml.cs b/Wabbajack.App.Wpf/Views/Settings/LoginItemView.xaml.cs index 18f3f734..f69071f2 100644 --- a/Wabbajack.App.Wpf/Views/Settings/LoginItemView.xaml.cs +++ b/Wabbajack.App.Wpf/Views/Settings/LoginItemView.xaml.cs @@ -5,7 +5,7 @@ using ReactiveUI; namespace Wabbajack { - public partial class LoginItemView + public partial class LoginItemView : IViewFor { public LoginItemView() { @@ -20,12 +20,10 @@ namespace Wabbajack .BindToStrict(this, view => view.SiteNameText.Text) .DisposeWith(disposable); - ViewModel.WhenAnyValue(vm => vm.Login.TriggerLogin) - .BindToStrict(this, view => view.LoginButton.Command) + this.BindCommand(ViewModel, vm => vm.Login.TriggerLogin, view => view.LoginButton) .DisposeWith(disposable); - ViewModel.WhenAnyValue(vm => vm.Login.ClearLogin) - .BindToStrict(this, view => view.LogoutButton.Command) + this.BindCommand(ViewModel, vm => vm.Login.ClearLogin, view => view.LogoutButton) .DisposeWith(disposable); });