/// <summary> /// Check if input are validated /// </summary> /// <returns>Whether input is validated</returns> private bool ValidateValues() { if (!Validation.ValidateNumbers(textBoxArcNumber, textBoxLineNumber)) { return(false); } if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord)) { return(false); } if (Convert.ToUInt32(textBoxArcNumber.Text) != 0) { if (!Validation.ValidateLength(textBoxArcSpacing, "Spacing", false) || !Validation.ValidateLength(textBoxArcFirstRadius, "Radius", false) || !Validation.ValidateLabel(textBoxArcFirstLabel, m_data.LabelsList)) { return(false); } } if (Convert.ToUInt32(textBoxLineNumber.Text) != 0) { if (!Validation.ValidateLength(textBoxLineFirstDistance, "Distance", true) || !Validation.ValidateLabel(textBoxLineFirstLabel, m_data.LabelsList)) { return(false); } } if (Convert.ToUInt32(textBoxArcNumber.Text) != 0 && Convert.ToUInt32(textBoxLineNumber.Text) != 0) { if (!Validation.ValidateLabels(textBoxArcFirstLabel, textBoxLineFirstLabel)) { return(false); } } if (radioButtonCustomize.Checked) { if (!Validation.ValidateDegrees(textBoxStartDegree, textBoxEndDegree)) { return(false); } } return(true); }
/// <summary> /// Check if input are validated /// </summary> /// <returns>Whether input is validated</returns> private bool ValidateValues() { if (!Validation.ValidateNumbers(textBoxXNumber, textBoxYNumber)) { return(false); } if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord)) { return(false); } if (Convert.ToUInt32(textBoxXNumber.Text) != 0) { if (!Validation.ValidateLength(textBoxXSpacing, "Spacing", false) || !Validation.ValidateLabel(textBoxXFirstLabel, m_data.LabelsList)) { return(false); } } if (Convert.ToUInt32(textBoxYNumber.Text) != 0) { if (!Validation.ValidateLength(textBoxYSpacing, "Spacing", false) || !Validation.ValidateLabel(textBoxYFirstLabel, m_data.LabelsList)) { return(false); } } if (Convert.ToUInt32(textBoxXNumber.Text) != 0 && Convert.ToUInt32(textBoxYNumber.Text) != 0) { if (!Validation.ValidateLabels(textBoxXFirstLabel, textBoxYFirstLabel)) { return(false); } } return(true); }