Ejemplo n.º 1
0
        private bool areInputsValid()
        {
            bool isValid = true;

            // start address
            isValid &= AVgmtForm.checkTextBox(this.tbStartAddress.Text, this.lblStartAddress.Text);

            if (isValid)
            {
                isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbStartAddress.Text, this.lblStartAddress.Text);
            }

            // end address
            if (this.rbEndAddress.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.tbEndAddress.Text, this.rbEndAddress.Text);

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

                if (isValid)
                {
                    isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbLength.Text, this.rbLength.Text);
                }
            }

            return(isValid);
        }
        private bool validateAll()
        {
            bool isValid = true;

            isValid &= AVgmtForm.checkTextBox(this.tbSourceFolder.Text, this.label3.Text);

            isValid &= AVgmtForm.checkTextBox(this.tbListFile.Text, this.label1.Text);
            isValid &= AVgmtForm.checkTextBox(this.tbListFileOffsetToFileList.Text, this.label2.Text);
            isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbListFileOffsetToFileList.Text, this.label2.Text);

            if (this.comboListFileNameTextFormat.SelectedItem.Equals("Code Page"))
            {
                isValid &= AVgmtForm.checkTextBox(this.tbListFilesCodePage.Text, this.label6.Text);
            }

            if (this.rbListFileTerminator.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.tbListFileTerminator.Text, "File Name Terminator");
            }
            else if (this.rbListFileStaticSize.Checked)
            {
                isValid &= AVgmtForm.checkTextBox(this.tbListFileStaticSize.Text, this.rbListFileStaticSize.Text);
            }

            return(isValid);
        }
Ejemplo n.º 3
0
        private bool validateRiffOptions()
        {
            bool isValid = true;

            if (this.cbAddRiffHeader.Checked)
            {
                // Frequency
                if (this.rbAddManualFrequency.Checked)
                {
                    isValid &= AVgmtForm.checkTextBox(this.comboRiffFrequency.Text, this.rbAddManualFrequency.Text);

                    if (isValid)
                    {
                        isValid &= AVgmtForm.checkIfTextIsParsableAsLong(this.comboRiffFrequency.Text, this.rbAddManualFrequency.Text);
                    }
                }
                else if (this.rbFrequencyOffset.Checked)
                {
                    isValid &= this.frequencyOffsetDescription.Validate();
                }

                // Channels
                if (this.rbNumberOfChannelsOffset.Checked)
                {
                    isValid &= this.numberOfChannelsOffsetDescription.Validate();
                }
            }

            return(isValid);
        }
Ejemplo n.º 4
0
        private bool validateEnteredData()
        {
            bool ret = true;

            if (!String.IsNullOrEmpty(this.tbStartOffset.Text))
            {
                ret &= AVgmtForm.checkIfTextIsParsableAsLong(this.tbStartOffset.Text, this.label1.Text);
            }

            return(ret);
        }
        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);
        }
Ejemplo n.º 6
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);
        }