private bool CanProcessStart() { if (SelectedFileInfo == null) { return(false); } return(FileInfoList.Any() && SelectedFileInfo.Process == null); }
public void FilterByKeyword(string keyword) { if (!FileInfoList.Any()) { return; } CanFilterByKeywordInternal(keyword); }
protected void RemoveItem() { var index = DisplayFileInfoList.IndexOf(SelectedFileInfo); FileInfoList.Remove(SelectedFileInfo); DisplayFileInfoList.Remove(SelectedFileInfo); //選択アイテムの更新 if (DisplayFileInfoList.Count == 0) { //表示対象がない index = -1; } else if (DisplayFileInfoList.Count <= index) { index = DisplayFileInfoList.Count - 1; } else { //何もしない } if (index >= 0) { DisplayFileInfoList.ElementAt(index).IsSelected = true; } //フィルタの更新 var missingKeywordList = new List <Extension>(); foreach (var item in ExtensionList) { missingKeywordList.Add(item); } missingKeywordList.RemoveAt(0); foreach (var item in DisplayFileInfoList) { var extension = Path.GetExtension(item.FilePath); var extensionItems = ExtensionList.Where(x => x.Name == extension); if (extensionItems.Any()) { foreach (var extItem in extensionItems) { missingKeywordList.Remove(extItem); } } } foreach (var item in missingKeywordList) { ExtensionList.Remove(item); } HasItem = FileInfoList.Any(); }
private bool CanChangeItemOrderUpper() { return(FileInfoList.Any() && FileInfoList.IndexOf(SelectedFileInfo) > 0); }
private bool CanRemoveItem() { return(FileInfoList.Any() && SelectedFileInfo != null); }
private bool CanChangeItemOrderLower() { return(FileInfoList.Any() && FileInfoList.Count > FileInfoList.IndexOf(SelectedFileInfo) + 1); }
protected bool CanChangeItemOrderLower() { return(FileInfoList.Any() && SelectedFileInfo != null && FileInfoList.Count > FileInfoList.IndexOf(SelectedFileInfo) + 1 && !IsFiltering); }
protected bool CanChangeItemOrderUpper() { return(FileInfoList.Any() && SelectedFileInfo != null && FileInfoList.IndexOf(SelectedFileInfo) > 0 && !IsFiltering); }