コード例 #1
0
        private void tbSource_DragDrop(object sender, DragEventArgs e)
        {
            string[] s             = (string[])e.Data.GetData(DataFormats.FileDrop, false);
            string[] searchStrings = tbSearchString.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);


            ExamineSearchForFileWorker.ExamineSearchForFileStruct exStruct =
                new ExamineSearchForFileWorker.ExamineSearchForFileStruct();
            exStruct.SourcePaths   = s;
            exStruct.ExtractFile   = cbExtract.Checked;
            exStruct.SearchStrings = searchStrings;
            exStruct.CaseSensitive = cbCaseSensitive.Checked;
            exStruct.OutputFolder  = tbOutputFolder.Text;

            base.backgroundWorker_Execute(exStruct);
        }
コード例 #2
0
        private void btnDoTask_Click(object sender, EventArgs e)
        {
            if (AVgmtForm.checkFolderExists(tbSource.Text, this.grpSource.Text))
            {
                string[] s = new string[1];
                s[0] = tbSource.Text;
                string[] searchStrings = tbSearchString.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

                ExamineSearchForFileWorker.ExamineSearchForFileStruct exStruct =
                    new ExamineSearchForFileWorker.ExamineSearchForFileStruct();
                exStruct.SourcePaths   = s;
                exStruct.ExtractFile   = cbExtract.Checked;
                exStruct.SearchStrings = searchStrings;
                exStruct.CaseSensitive = cbCaseSensitive.Checked;
                exStruct.OutputFolder  = tbOutputFolder.Text;

                base.backgroundWorker_Execute(exStruct);
            }
        }