Merge vas-working to master (attempt 2) #2

Merged
BobdaFett merged 28 commits from vas-working into master 2023-11-23 00:05:09 +00:00
2 changed files with 0 additions and 17 deletions
Showing only changes of commit 937832bb26 - Show all commits

No files matched your search

@@ -40,8 +40,6 @@ public class MainWindowViewModel : ViewModelBase {
public ReactiveCommand<Unit, Unit> DeleteCommand { get; }
public Interaction<DeleteWindowViewModel, Boolean> ShowDeleteWindow { get; }
public ReactiveCommand<Unit, Coin> FindCommand { get; }
public Interaction<FindWindowViewModel, int> ShowFindWindow { get; }
public ReactiveCommand<Unit, Unit> ExportCommand { get; }
public Interaction<Unit, Uri> ShowExportWindow { get; }
@@ -91,18 +89,6 @@ public class MainWindowViewModel : ViewModelBase {
}
});
// Set up the ability to open the find window.
ShowFindWindow = new Interaction<FindWindowViewModel, int>();
var findEnabled = this.WhenAnyValue(x => x.CoinCollection.Count,
x => x > 0);
FindCommand = ReactiveCommand.CreateFromTask(async () => {
var findViewModel = new FindWindowViewModel();
var result = await ShowFindWindow.Handle(findViewModel);
// Find the coin with the matching ID. The issue is that there could be multiple - so we need to return a list.
// Perhaps a secondary viewmodel?
return new Coin();
}, findEnabled);
// Subscribe to SidebarContent.OkCommand, which is an IObservable<(int, string, int)>
// This is the same as the above, but with a different syntax.
newViewModel.OkCommand
-3
View File
@@ -65,9 +65,6 @@
DockPanel.Dock="Left">
<Button Grid.Column="0" Margin="5" Width="100" HorizontalContentAlignment="Center" Content="Delete"
Command="{Binding DeleteCommand}" />
<!-- <Button Grid.Column="1" Margin="5" Width="100" HorizontalContentAlignment="Center" -->
<!-- Content="Find..." -->
<!-- Command="{Binding FindCommand}" /> -->
</Grid>
<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5" ColumnDefinitions="Auto, Auto"
DockPanel.Dock="Right">