2023-12-16 17:07:32 +00:00
|
|
|
|
using ReactiveUI;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Reactive.Disposables;
|
2023-12-17 14:04:38 +00:00
|
|
|
|
using System.Reactive.Linq;
|
2023-12-16 17:07:32 +00:00
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using Wabbajack.Common;
|
2023-12-16 22:45:00 +00:00
|
|
|
|
using Wabbajack.Messages;
|
2023-12-16 17:07:32 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for NavigationView.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class NavigationView : ReactiveUserControl<NavigationVM>
|
|
|
|
|
{
|
|
|
|
|
public NavigationView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
this.WhenActivated(dispose =>
|
|
|
|
|
{
|
2023-12-17 12:21:08 +00:00
|
|
|
|
this.BindCommand(ViewModel, vm => vm.BrowseCommand, v => v.BrowseButton)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
this.BindCommand(ViewModel, vm => vm.HomeCommand, v => v.HomeButton)
|
2023-12-16 17:07:32 +00:00
|
|
|
|
.DisposeWith(dispose);
|
2023-12-17 14:04:38 +00:00
|
|
|
|
this.BindCommand(ViewModel, vm => vm.CompileCommand, v => v.CompileButton)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
this.BindCommand(ViewModel, vm => vm.SettingsCommand, v => v.SettingsButton)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
|
|
|
|
|
this.WhenAny(x => x.ViewModel.Version)
|
|
|
|
|
.Select(version => $"v{version}")
|
|
|
|
|
.BindToStrict(this, v => v.VersionTextBlock.Text)
|
|
|
|
|
.DisposeWith(dispose);
|
2023-12-16 17:07:32 +00:00
|
|
|
|
/*
|
|
|
|
|
this.WhenAny(x => x.ViewModel.InstallCommand)
|
|
|
|
|
.BindToStrict(this, x => x.InstallButton.Command)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
this.WhenAny(x => x.ViewModel.CompileCommand)
|
|
|
|
|
.BindToStrict(this, x => x.CompileButton.Command)
|
|
|
|
|
.DisposeWith(dispose);
|
|
|
|
|
*/
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|