예제 #1
0
        /// <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);
        }
예제 #2
0
파일: ViewModel.cs 프로젝트: zxc120/GARbro
 public DirectoryPosition(DirectoryViewModel vm, EntryViewModel item)
 {
     Path = vm.Path;
     Item = null != item ? item.Name : null;
 }