mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2025-07-25 21:04:01 +00:00
33 lines
1020 B
C#
33 lines
1020 B
C#
using System;
|
|
using System.Reactive.Disposables;
|
|
using System.Windows.Forms;
|
|
using ReactiveUI;
|
|
|
|
namespace Wabbajack
|
|
{
|
|
public partial class LoginItemView : IViewFor<LoginTargetVM>
|
|
{
|
|
public LoginItemView()
|
|
{
|
|
InitializeComponent();
|
|
this.WhenActivated(disposable =>
|
|
{
|
|
ViewModel.WhenAny(x => x.Login.Icon)
|
|
.BindToStrict(this, view => view.Favicon.Source)
|
|
.DisposeWith(disposable);
|
|
|
|
ViewModel.WhenAnyValue(vm => vm.Login.SiteName)
|
|
.BindToStrict(this, view => view.SiteNameText.Text)
|
|
.DisposeWith(disposable);
|
|
|
|
this.BindCommand(ViewModel, vm => vm.Login.TriggerLogin, view => view.LoginButton)
|
|
.DisposeWith(disposable);
|
|
|
|
this.BindCommand(ViewModel, vm => vm.Login.ClearLogin, view => view.LogoutButton)
|
|
.DisposeWith(disposable);
|
|
|
|
});
|
|
}
|
|
}
|
|
}
|