/// <summary> /// Open file/directory. /// </summary> private void OpenItemExec(object control, ExecutedRoutedEventArgs e) { EntryViewModel entry = null; var lvi = e.OriginalSource as ListViewItem; if (lvi != null) { entry = lvi.Content as EntryViewModel; } if (null == entry) { entry = CurrentDirectory.SelectedItem as EntryViewModel; } if (null == entry) { return; } if ("audio" == entry.Type) { PlayFile(entry.Source); return; } OpenDirectoryEntry(ViewModel, entry); }
public DirectoryPosition(DirectoryViewModel vm, EntryViewModel item) { Path = vm.Path; Item = null != item ? item.Name : null; }