[PTRun] Drag and drop files (#22409)

* [PTRun] Support drag&drop to other application for files in result list

* [PTRun] use file/folder thumbnail as drag image

* (fix spellcheck)

* [PTRun] use _mouseDownResultViewModel.Image to generate the drag image

* fix spelling + refactoring
This commit is contained in:
Daniel Richter
2022-12-09 14:01:44 +01:00
committed by GitHub
parent bb92b03156
commit 08d569ccf6
12 changed files with 184 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
IcoPath = Search,
Score = 500,
Action = c => _shellAction.ExecuteSanitized(Search, contextApi),
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Search },
ContextData = new SearchResult { Type = ResultType.Folder, Path = Search },
};
}
}

View File

@@ -38,7 +38,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path),
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path)),
QueryTextDisplay = Path,
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
ContextData = new SearchResult { Type = ResultType.Folder, Path = Path },
Action = c => _shellAction.Execute(Path, contextApi),
};
}

View File

@@ -42,7 +42,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath)),
IcoPath = FilePath,
Action = c => ShellAction.Execute(FilePath, contextApi),
ContextData = new SearchResult { Type = ResultType.File, FullPath = FilePath },
ContextData = new SearchResult { Type = ResultType.File, Path = FilePath },
};
return result;
}

View File

@@ -42,7 +42,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle),
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle)),
QueryTextDisplay = Path,
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
ContextData = new SearchResult { Type = ResultType.Folder, Path = Path },
Action = c => ShellAction.Execute(Path, contextApi),
};
}