[Image Resizer] Add settings button (#13773)

* Add deeplink

* Update InputPage.xaml

Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
Niels Laute
2021-10-12 13:23:06 +02:00
committed by GitHub
parent 7e8e954de7
commit 4803180bcf
4 changed files with 44 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ using ImageResizer.Helpers;
using ImageResizer.Models;
using ImageResizer.Properties;
using ImageResizer.Views;
using Microsoft.PowerToys.Common.UI;
namespace ImageResizer.ViewModels
{
@@ -35,6 +36,7 @@ namespace ImageResizer.ViewModels
ResizeCommand = new RelayCommand(Resize);
CancelCommand = new RelayCommand(Cancel);
OpenSettingsCommand = new RelayCommand(OpenSettings);
}
public Settings Settings { get; }
@@ -43,6 +45,8 @@ namespace ImageResizer.ViewModels
public ICommand CancelCommand { get; }
public ICommand OpenSettingsCommand { get; }
public bool TryingToResizeGifFiles
{
get
@@ -58,6 +62,11 @@ namespace ImageResizer.ViewModels
_mainViewModel.CurrentPage = new ProgressViewModel(_batch, _mainViewModel, _mainView);
}
public static void OpenSettings()
{
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.ImageResizer);
}
public void Cancel()
=> _mainView.Close();
}