예제 #1
0
        private void SearchNextNode()
        {
            if (_searchState == null)
            {
                return;
            }

            SearchWorker worker = new SearchWorker(_searchState);

            Thread t = new Thread(new ThreadStart(worker.Run));

            t.IsBackground = true;
            t.Start();

            _searchForm = new CancelSearchForm();
            if (_searchForm.ShowDialog(this) == DialogResult.Cancel)
            {
                worker.Cancel();
                _searchState = null;

                UpdateUI();
            }

            t.Join();
        }
예제 #2
0
        private void SearchNextNode()
        {
            if (_searchState == null)
            {
                return;
            }

            var worker = new SearchWorker(_searchState);

            var t = new Thread(worker.Run);

            t.IsBackground = true;
            t.Start();

            _searchForm = new CancelSearchForm();
            if (_searchForm.ShowDialog(this) == DialogResult.Cancel)
            {
                worker.Cancel();
                _searchState = null;
            }
        }
예제 #3
0
        private void SearchNextNodeContinuous()
        {
            if (_searchState == null)
            {
                return;
            }

            SearchWorker worker = new SearchWorker(_searchState);

            Thread t = new Thread(new ThreadStart(RunContinuousReplace));

            t.IsBackground = true;
            t.Start();

            _searchForm = new CancelSearchForm();
            if (_searchForm.ShowDialog(this) == DialogResult.Cancel)
            {
                worker.Cancel();
                _searchState = null;
            }
        }
예제 #4
0
        private void SearchNextNode()
        {
            if (_searchState == null)
                return;

            SearchWorker worker = new SearchWorker(_searchState);

            Thread t = new Thread(new ThreadStart(worker.Run));
            t.IsBackground = true;
            t.Start();

            _searchForm = new CancelSearchForm();
            if (_searchForm.ShowDialog(this) == DialogResult.Cancel) {
                worker.Cancel();
                _searchState = null;
            }

            t.Join();
        }