public void ItemClicked(FileTransferViewModel fileTransferVm) { var fileTransfer = fileTransferVm.FileTransfer; Folder folder; if (!this.syncThingManager.Folders.TryFetchById(fileTransfer.FolderId, out folder)) { return; // Huh? Nothing we can do about it... } // Not sure of the best way to deal with deletions yet... if (fileTransfer.ActionType == ItemChangedActionType.Update) { if (fileTransfer.ItemType == ItemChangedItemType.File) { this.processStartProvider.StartDetached("explorer.exe", $"/select, \"{ Path.Combine(folder.Path, fileTransfer.Path)}\""); } else if (fileTransfer.ItemType == ItemChangedItemType.Folder) { this.processStartProvider.StartDetached("explorer.exe", Path.Combine(folder.Path, fileTransfer.Path)); } } }
public void ItemClicked(FileTransferViewModel fileTransferVm) { var fileTransfer = fileTransferVm.FileTransfer; Folder folder; if (!this.syncthingManager.Folders.TryFetchById(fileTransfer.FolderId, out folder)) return; // Huh? Nothing we can do about it... // Not sure of the best way to deal with deletions yet... if (fileTransfer.ActionType == ItemChangedActionType.Update) { if (fileTransfer.ItemType == ItemChangedItemType.File) this.processStartProvider.ShowInExplorer(Path.Combine(folder.Path, fileTransfer.Path)); else if (fileTransfer.ItemType == ItemChangedItemType.Dir) this.processStartProvider.StartDetached("explorer.exe", Path.Combine(folder.Path, fileTransfer.Path)); } }