Removed FindCommand until functionality is needed.
This commit is contained in:
1 parent
14bb30bee8
commit
937832bb26
2 files changed
-17
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
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in new issue
Block a user