예제 #1
0
        void CreateList()
        {
            if (!CanCreateList)
            {
                return;
            }
            var name = askUser(dnSpy_Resources.OpenList_AskForName);

            if (string.IsNullOrEmpty(name))
            {
                return;
            }

            var vm = new DocumentListVM(this, new DocumentList(name), false, true);

            addedDocumentLists.Add(vm);
            documentListColl.Add(vm);
        }
예제 #2
0
        bool CalculateIsVisible(DocumentListVM vm, string filterText)
        {
            Debug.Assert(filterText != null && filterText.Trim().ToUpperInvariant() == filterText);
            if (string.IsNullOrEmpty(filterText) && !ShowSavedLists)
            {
                return(true);
            }
            if (ShowSavedLists && !vm.IsUserList)
            {
                return(false);
            }
            var name = vm.Name.ToUpperInvariant();

            foreach (var s in filterText.ToUpperInvariant().Split(sep, StringSplitOptions.RemoveEmptyEntries))
            {
                if (!name.Contains(s))
                {
                    return(false);
                }
            }
            return(true);
        }
예제 #3
0
 public void WriteDocumentCount(DocumentListVM vm) => output.Write(BoxedTextColor.Number, vm.DocumentCount.ToString());
예제 #4
0
 public void WriteName(DocumentListVM vm) => output.Write(BoxedTextColor.Assembly, vm.Name);
예제 #5
0
		void CreateList() {
			if (!CanCreateList)
				return;
			var name = askUser(dnSpy_Resources.OpenList_AskForName);
			if (string.IsNullOrEmpty(name))
				return;

			var vm = new DocumentListVM(this, new DocumentList(name), false, true);
			addedDocumentLists.Add(vm);
			documentListColl.Add(vm);
		}
예제 #6
0
		bool CalculateIsVisible(DocumentListVM vm, string filterText) {
			Debug.Assert(filterText != null && filterText.Trim().ToUpperInvariant() == filterText);
			if (string.IsNullOrEmpty(filterText) && !ShowSavedLists)
				return true;
			if (ShowSavedLists && !vm.IsUserList)
				return false;
			var name = vm.Name.ToUpperInvariant();
			foreach (var s in filterText.ToUpperInvariant().Split(sep, StringSplitOptions.RemoveEmptyEntries)) {
				if (!name.Contains(s))
					return false;
			}
			return true;
		}
예제 #7
0
		public void WriteDocumentCount(DocumentListVM vm) => output.Write(BoxedTextColor.Number, vm.DocumentCount.ToString());
예제 #8
0
		public void WriteName(DocumentListVM vm) => output.Write(BoxedTextColor.Assembly, vm.Name);