Beispiel #1
0
 private void AddFileFound(string file, int line, string text, string selection)
 {
     // winform의 application.doEvent 와 같은 역할(DispatcherPriority.Background)
     Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate
     {
         MatchedCount++;
         FindingFiles.Add(new FileFound()
         {
             File = file, Line = line, Text = text, Selection = selection
         });
     }));
 }
Beispiel #2
0
        private void Search_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(cboCondition.Text) || string.IsNullOrWhiteSpace(cboFilter.Text))
            {
                MessageBox.Show(this, "검색어와 필터는 모두 있어야 합니다.");
                return;
            }

            FindingFiles.Clear();
            MatchedCount = 0;
            this.IsBusy  = true;
            ThreadStop   = !this.IsBusy;
            tw.Run();
        }