コード例 #1
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);
            }
        }
コード例 #2
0
        private bool validateAll()
        {
            bool isValid = true;

            isValid &= AVgmtForm.checkTextBox(this.tbNameOffset.Text, this.lblNameOffset.Text);

            if (this.rbNameLength.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.tbNameLength.Text, this.rbNameLength.Text);
                AVgmtForm.checkIfTextIsParsableAsLong(this.tbNameLength.Text, this.rbNameLength.Text);
            }

            if (this.rbTerminatorBytes.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.tbTerminatorBytes.Text, this.rbTerminatorBytes.Text);
                AVgmtForm.checkIfTextIsParsableAsLong("0x" + this.tbTerminatorBytes.Text, this.rbTerminatorBytes.Text);
            }

            return(isValid);
        }
コード例 #3
0
        private bool validateXmaParseOptions()
        {
            bool isValid = true;

            isValid &= AVgmtForm.checkTextBox(this.comboXmaParseInputType.Text, this.lblXmaParseInputType.Text);

            if (this.rbXmaParseStartOffsetStatic.Checked)
            {
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbXmaParseStartOffset.Text, this.rbXmaParseStartOffsetStatic.Text);
            }

            if (this.rbXmaParseBlockSizeStatic.Checked)
            {
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbXmaParseBlockSize.Text, this.rbXmaParseBlockSizeStatic.Text);
            }

            if (this.rbXmaParseDataSizeStatic.Checked)
            {
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbXmaParseDataSize.Text, this.rbXmaParseDataSizeStatic.Text);
            }

            if (this.rbXmaParseStartOffsetOffset.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.XmaParseStartOffsetOffsetDescription.OffsetValue, this.rbXmaParseStartOffsetOffset.Text);
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.XmaParseStartOffsetOffsetDescription.OffsetValue, this.rbXmaParseStartOffsetOffset.Text);
            }

            if (this.rbXmaParseBlockSizeOffset.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.XmaParseBlockSizeOffsetDescription.OffsetValue, this.rbXmaParseBlockSizeOffset.Text);
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.XmaParseBlockSizeOffsetDescription.OffsetValue, this.rbXmaParseBlockSizeOffset.Text);
            }

            if (this.rbXmaParseDataSizeOffset.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.XmaParseDataSizeOffsetDescription.OffsetValue, this.rbXmaParseDataSizeOffset.Text);
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.XmaParseDataSizeOffsetDescription.OffsetValue, this.rbXmaParseDataSizeOffset.Text);
            }

            return(isValid);
        }
コード例 #4
0
        private bool validateInputs()
        {
            bool ret = true;

            if (cbOverrideDriverOffset.Checked)
            {
                ret = ret && AVgmtForm.checkTextBox(this.tbPsfDrvLoad.Text, this.lblPsfDrvLoad.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbPsfDrvSize.Text, this.lblPsfDrvSize.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbPsfDrvParam.Text, this.lblPsfDrvParam.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbPadDrvParamSize.Text, this.lblPadDrvParamSize.Text);

                ret = ret && AVgmtForm.checkTextBox(this.tbMySeq.Text, this.lblMySeq.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbMySeqSize.Text, this.lblMySeqSize.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbMyVh.Text, this.lblMyVh.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbMyVhSize.Text, this.lblMyVhSize.Text);

                ret = ret && AVgmtForm.checkTextBox(this.tbMyVb.Text, this.lblMyVb.Text);
                ret = ret && AVgmtForm.checkTextBox(this.tbMyVbSize.Text, this.lblMyVbSize.Text);
            }

            return(ret);
        }
コード例 #5
0
        private bool validateInputs(bool pCheckInputFile)
        {
            bool ret = true;

            if (pCheckInputFile)
            {
                ret &= AVgmtForm.checkFileExists(this.tbSourceFiles.Text, this.lblSourceFiles.Text);
            }
            if (this.rbNameOutput.Checked)
            {
                ret &= AVgmtForm.checkTextBox(this.tbOutputFile.Text, this.rbNameOutput.Text);
            }
            if (this.rbAutoName.Checked)
            {
                ret &= AVgmtForm.checkTextBox(this.tbFileExtension.Text, this.rbAutoName.Text);
            }

            ret &= AVgmtForm.checkTextBox(this.tbStartAddress.Text, this.lblStartAddress.Text);

            if (rbEndAddress.Checked)
            {
                ret &= AVgmtForm.checkTextBox(this.tbEndAddress.Text, this.rbEndAddress.Text);
            }
            if (rbLength.Checked)
            {
                ret &= AVgmtForm.checkTextBox(this.tbLength.Text, this.rbLength.Text);
            }

            if (pCheckInputFile && (this.tbSourceFiles.Text.Equals(this.tbOutputFile.Text)))
            {
                MessageBox.Show(ConfigurationManager.AppSettings["Form_SnakebiteGUI_ErrorInputOutputSame"],
                                ConfigurationManager.AppSettings["Form_Global_ErrorWindowTitle"]);
                ret = false;
            }

            return(ret);
        }
コード例 #6
0
 private bool CheckInputs()
 {
     return(AVgmtForm.checkFolderExists(tbOutputPath.Text, this.lblOutputPath.Text));
 }