mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 20:09:12 +00:00
28 lines
929 B
C#
28 lines
929 B
C#
using System.Reactive.Disposables;
|
|
using Avalonia.ReactiveUI;
|
|
using ReactiveUI;
|
|
|
|
namespace v2rayN.Desktop.Views;
|
|
|
|
public partial class CheckUpdateView : ReactiveUserControl<CheckUpdateViewModel>
|
|
{
|
|
public CheckUpdateView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
ViewModel = new CheckUpdateViewModel(UpdateViewHandler);
|
|
|
|
this.WhenActivated(disposables =>
|
|
{
|
|
this.OneWayBind(ViewModel, vm => vm.CheckUpdateModels, v => v.lstCheckUpdates.ItemsSource).DisposeWith(disposables);
|
|
|
|
this.Bind(ViewModel, vm => vm.EnableCheckPreReleaseUpdate, v => v.togEnableCheckPreReleaseUpdate.IsChecked).DisposeWith(disposables);
|
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateCmd, v => v.btnCheckUpdate).DisposeWith(disposables);
|
|
});
|
|
}
|
|
|
|
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
|
{
|
|
return await Task.FromResult(true);
|
|
}
|
|
}
|