public bool CheckTagNumArgs(string arg, string tagName)
{
char[] tempCharArray = arg.ToCharArray();
bool argIsSafe = false;
if (tempCharArray.Length == 0)
{
TagErrorHandler errorHandler = new TagErrorHandler("Numerical Argument Error", "The tag '" + tagName + "' requires a numerical argument." + Environment.NewLine + "Please enter a number after the ':'.", charData);
DialogResult result = errorHandler.ShowDialog();
if (result == DialogResult.OK)
{
//MessageBox.Show("works");
charData = errorHandler.GetCorrectedData();
ProofReadTagstoCodes();
argIsSafe = false;
return argIsSafe;
}
}
foreach (char chara in tempCharArray)
{
if (char.IsDigit(chara) != true)
{
TagErrorHandler errorHandler = new TagErrorHandler("Numerical Argument Error", "The tag argument " + arg + " has letters in it." + Environment.NewLine + "Please use only numbers in tag arguments.", charData);
DialogResult result = errorHandler.ShowDialog();
if (result == DialogResult.OK)
{
//MessageBox.Show("works");
charData = errorHandler.GetCorrectedData();
ProofReadTagstoCodes();
argIsSafe = false;
return argIsSafe;
}
}
}
argIsSafe = true;
return argIsSafe;
}