From ad97e6a1828bccdea9b98556d56f35207591f4e7 Mon Sep 17 00:00:00 2001 From: dineshsolanki <15937452+DineshSolanki@users.noreply.github.com> Date: Fri, 22 Jan 2021 23:21:47 +0530 Subject: [PATCH] made desktop.ini icon path relative for custom icon setter. --- FoliCon/ViewModels/CustomIconControlViewModel.cs | 2 +- FoliCon/ViewModels/SearchResultViewModel.cs | 7 +++++++ FoliCon/Views/SearchResult.xaml | 13 ++++++++----- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/FoliCon/ViewModels/CustomIconControlViewModel.cs b/FoliCon/ViewModels/CustomIconControlViewModel.cs index c02d1a12..67842b14 100644 --- a/FoliCon/ViewModels/CustomIconControlViewModel.cs +++ b/FoliCon/ViewModels/CustomIconControlViewModel.cs @@ -260,7 +260,7 @@ private int MakeIcons() if (File.Exists(newIconPath)) { Util.HideIcons(newIconPath); - Util.SetFolderIcon(newIconPath, folderPath); + Util.SetFolderIcon($"{Directories[i]}.ico", folderPath); count++; } diff --git a/FoliCon/ViewModels/SearchResultViewModel.cs b/FoliCon/ViewModels/SearchResultViewModel.cs index 95007635..b6bac604 100644 --- a/FoliCon/ViewModels/SearchResultViewModel.cs +++ b/FoliCon/ViewModels/SearchResultViewModel.cs @@ -55,6 +55,7 @@ public class SearchResultViewModel : BindableBase, IDialogAware #region Commands public DelegateCommand PickCommand { get; } + public DelegateCommand SortResultCommand { get; } public DelegateCommand SkipCommand { get; } public DelegateCommand SkipAllCommand { get; } public DelegateCommand SearchAgainCommand { get; } @@ -68,9 +69,15 @@ public SearchResultViewModel(IDialogService dialogService) SkipCommand = new DelegateCommand(delegate { CloseDialog("false"); }); ResultListViewData = new ListViewData { Data = null, SelectedItem = null }; PickCommand = new DelegateCommand(PickMethod); + SortResultCommand = new DelegateCommand(SortResult); SkipAllCommand = new DelegateCommand(delegate { GlobalVariables.SkipAll = true; CloseDialog("false"); }); } + private void SortResult() + { + + } + protected virtual void CloseDialog(string parameter) { var result = parameter?.ToLower(CultureInfo.InvariantCulture) switch diff --git a/FoliCon/Views/SearchResult.xaml b/FoliCon/Views/SearchResult.xaml index 56ec16b9..e5e3e1f6 100644 --- a/FoliCon/Views/SearchResult.xaml +++ b/FoliCon/Views/SearchResult.xaml @@ -48,11 +48,14 @@ Command="{Binding SkipCommand}" IsCancel="True" /> - - - - - + + + + + +