예제 #1
0
        public void Search(string newKeyword)
        {
            this.Cancel();
            if (RootItem.IsNull() || oldKeyword == newKeyword)
            {
                this.IsSearching = false;
                return;
            }

            this.IsCanceled = false;
            if (newKeyword.IsNullOrEmpty())
            {
                this.oldKeyword  = newKeyword;
                this.IsSearching = false;
                return;
            }

            oldKeyword = newKeyword;
            regPattern = GetRegexPattern(newKeyword);
            //Eric:Temp ignore
            //if (RootItem is CloudFolder)
            //{
            //    SearchCloudFolder(RootItem as CloudFolder);
            //}
            //else
            {
                SearchFolder(RootItem);
            }
        }
예제 #2
0
 public void UninitialSearch()
 {
     if (RootItem.IsNull())
     {
         return;
     }
     this.SearchKeyword = string.Empty;
     this.Cancel();
     this.IsSearching = false;
     this.IsChecked   = false;
     if (!this.RootItem.IsNull())
     {
         this.RootItem = null;
     }
 }
예제 #3
0
        public void Search(string newKeyword)
        {
            this.Cancel();
            if (RootItem.IsNull() || oldKeyword == newKeyword)
            {
                this.IsSearching = false;
                return;
            }

            this.IsCanceled = false;
            if (newKeyword.IsNullOrEmpty())
            {
                this.oldKeyword  = newKeyword;
                this.IsSearching = false;
                return;
            }

            oldKeyword = newKeyword;
            regPattern = GetRegexPattern(newKeyword);
            SearchFolder(RootItem);
        }