コード例 #1
0
ファイル: RunnerList.cs プロジェクト: justMaku/W3DT
        public override void Work()
        {
            while (runners.Length > currentRunner)
            {
                RunnerBase runner = runners[currentRunner];

                if (currentRunner > 0)
                {
                    runner.previousRunner = runners[currentRunner - 1];
                }

                runner.Begin();

                while (runner.thread.IsAlive)
                {
                    Thread.Sleep(100);
                }

                currentRunner++;
            }
        }
コード例 #2
0
ファイル: Explorer.cs プロジェクト: Kruithne/W3DT
        private void OnFileExploreDone(object sender, EventArgs e)
        {
            if (((FileExploreDoneArgs)e).ID.Equals(currentScanID))
            {
                UnregisterHooks();
                runner = null;

                if (status != null)
                    status.Text = string.Format(Constants.GENERIC_WINDOW_SEARCH_STATE, found, "Done");

                if (ExploreDoneCallback != null)
                    ExploreDoneCallback();
            }
        }
コード例 #3
0
ファイル: Explorer.cs プロジェクト: Kruithne/W3DT
        public void Initialize()
        {
            if (fileList != null)
                fileList.Nodes.Clear(); // Clear existing nodes.

            // Do not continue without the CASC engine.
            if (!Program.IsCASCReady)
                return;

            found = 0; // Reset found counter.

            // File exploration hooks!
            EventManager.FileExploreHit += OnFileExploreHit;
            EventManager.FileExploreDone += OnFileExploreDone;

            if (status != null)
                status.Text = string.Format(Constants.GENERIC_WINDOW_SEARCH_STATE, 0, "Preparing...");

            currentScan++;
            currentScanID = string.Format(runnerID, currentScan);

            string filter = hardFilter;
            if (searchField != null)
            {
                string fieldText = searchField.Text.Trim();
                if (fieldText.Length > 0)
                    filter = fieldText.ToLower();
            }

            runner = new RunnerFileExplore(currentScanID, extensions, filter, rootFolders);
            runner.Begin();
        }