You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

VersionUpdatePromptView.xaml.cs 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using ReactiveUI;
  2. using Shadowsocks.WPF.ViewModels;
  3. using System.Reactive.Disposables;
  4. using System.Text.Json;
  5. namespace Shadowsocks.WPF.Views
  6. {
  7. /// <summary>
  8. /// Interaction logic for VersionUpdatePromptView.xaml
  9. /// </summary>
  10. public partial class VersionUpdatePromptView
  11. {
  12. public VersionUpdatePromptView()
  13. {
  14. InitializeComponent();
  15. DataContext = ViewModel; // for compatibility with MdXaml
  16. this.WhenActivated(disposables =>
  17. {
  18. /*this.OneWayBind(ViewModel,
  19. viewModel => viewModel.ReleaseNotes,
  20. view => releaseNotesMarkdownScrollViewer.Markdown)
  21. .DisposeWith(disposables);*/
  22. this.BindCommand(ViewModel,
  23. viewModel => viewModel.Update,
  24. view => view.updateButton)
  25. .DisposeWith(disposables);
  26. this.BindCommand(ViewModel,
  27. viewModel => viewModel.SkipVersion,
  28. view => view.skipVersionButton)
  29. .DisposeWith(disposables);
  30. this.BindCommand(ViewModel,
  31. viewModel => viewModel.NotNow,
  32. view => view.notNowButton)
  33. .DisposeWith(disposables);
  34. });
  35. }
  36. }
  37. }