-
Notifications
You must be signed in to change notification settings - Fork 16.4k
/
VersionUpdatePromptView.xaml.cs
39 lines (37 loc) · 1.32 KB
/
VersionUpdatePromptView.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using ReactiveUI;
using Shadowsocks.WPF.ViewModels;
using System.Reactive.Disposables;
using System.Text.Json;
namespace Shadowsocks.WPF.Views
{
/// <summary>
/// Interaction logic for VersionUpdatePromptView.xaml
/// </summary>
public partial class VersionUpdatePromptView
{
public VersionUpdatePromptView()
{
InitializeComponent();
DataContext = ViewModel; // for compatibility with MdXaml
this.WhenActivated(disposables =>
{
/*this.OneWayBind(ViewModel,
viewModel => viewModel.ReleaseNotes,
view => releaseNotesMarkdownScrollViewer.Markdown)
.DisposeWith(disposables);*/
this.BindCommand(ViewModel!,
viewModel => viewModel.Update,
view => view.updateButton)
.DisposeWith(disposables);
this.BindCommand(ViewModel!,
viewModel => viewModel.SkipVersion,
view => view.skipVersionButton)
.DisposeWith(disposables);
this.BindCommand(ViewModel!,
viewModel => viewModel.NotNow,
view => view.notNowButton)
.DisposeWith(disposables);
});
}
}
}