Skip to content

Commit

Permalink
Add option to advance by 10 or 100 images to the context menu. #172
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Oct 25, 2024
1 parent 65d76dd commit ff89355
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/PicView.Avalonia/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,14 @@ public MainViewModel(IPlatformSpecificService? platformSpecificService)
});

PreviousFolderCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.PrevFolder);

Skip10Command = ReactiveCommand.CreateFromTask(FunctionsHelper.Next10);

Skip100Command = ReactiveCommand.CreateFromTask(FunctionsHelper.Next100);

Prev10Command = ReactiveCommand.CreateFromTask(FunctionsHelper.Prev10);

Prev100Command = ReactiveCommand.CreateFromTask(FunctionsHelper.Prev100);

FirstCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.First);

Expand Down
58 changes: 58 additions & 0 deletions src/PicView.Avalonia/Views/MainView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,64 @@

<Separator />

<!-- Next 10 -->
<MenuItem
Command="{CompiledBinding Skip10Command}"
Header="{CompiledBinding AdvanceBy10Images,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Image
Height="12"
Source="{StaticResource NextImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<!-- Next 100 -->
<MenuItem
Command="{CompiledBinding Skip100Command}"
Header="{CompiledBinding AdvanceBy100Images,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Image
Height="12"
Source="{StaticResource NextImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<!-- Prev 10 -->
<MenuItem
Command="{CompiledBinding Prev10Command}"
Header="{CompiledBinding GoBackBy10Images,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Image
Height="12"
Source="{StaticResource PrevImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<!-- Prev 100 -->
<MenuItem
Command="{CompiledBinding Prev100Command}"
Header="{CompiledBinding GoBackBy100Images,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Image
Height="12"
Source="{StaticResource PrevImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<Separator />

<!-- First Image -->
<MenuItem Command="{CompiledBinding FirstCommand}" Header="{CompiledBinding FirstImage}">
<MenuItem.Icon>
Expand Down

0 comments on commit ff89355

Please sign in to comment.