Skip to content

Commit

Permalink
made desktop.ini icon path relative for custom icon setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
DineshSolanki committed Jan 22, 2021
1 parent 2e9916a commit ad97e6a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FoliCon/ViewModels/CustomIconControlViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down
7 changes: 7 additions & 0 deletions FoliCon/ViewModels/SearchResultViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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
Expand Down
13 changes: 8 additions & 5 deletions FoliCon/Views/SearchResult.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@
Command="{Binding SkipCommand}" IsCancel="True" />
<ListView x:Name="ListViewResult" ItemsSource="{Binding ResultListViewData.Data}"
SelectedItem="{Binding ResultListViewData.SelectedItem}" Grid.Row="1">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding PickCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<hc:Interaction.Triggers>
<!--<hc:EventTrigger EventName="GridViewColumnHeader.Click">
<hc:EventToCommand Command="{Binding SortResultCommand}" PassEventArgsToCommand="True"/>
</hc:EventTrigger>-->
<hc:EventTrigger EventName="MouseDoubleClick">
<hc:InvokeCommandAction Command="{Binding PickCommand}" />
</hc:EventTrigger>
</hc:Interaction.Triggers>
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Title}" Width="auto">
Expand Down

0 comments on commit ad97e6a

Please sign in to comment.