Пример #1
0
 private bool PreCheckUserDataIsEnough()
 {
     areaBoardSelected = this.tcCamera.SelectedIndex == 0;
     return(initialConditionFlag &&
            (areaBoardSelected &&
             StringValidator.HasContent(this.tbSensorSide, this.lbSensor.Text) &&
             StringValidator.HasContent(this.tbSensorOther, this.lbSensor.Text) &&
             StringValidator.HasContent(this.tbFovSide, this.lbFov.Text) &&
             StringValidator.HasContent(this.tbFovOther, this.lbFov.Text) &&
             StringValidator.IsUnsignedRealNumber(this.tbSensorSide) &&
             StringValidator.IsUnsignedRealNumber(this.tbSensorOther) &&
             StringValidator.IsUnsignedRealNumber(this.tbFovSide) &&
             StringValidator.IsUnsignedRealNumber(this.tbFovOther) &&
             StringValidator.IsEmptyOrUnsignedRealNumber(this.tbResolutionSide) &&
             StringValidator.IsEmptyOrUnsignedRealNumber(this.tbResolutionOther)
             ||
             !areaBoardSelected &&
             StringValidator.HasContent(this.tbLineSensor, this.lbLineSensor.Text) &&
             StringValidator.HasContent(this.tbLineFov, this.lbLineFov.Text) &&
             StringValidator.IsUnsignedRealNumber(this.tbLineSensor) &&
             StringValidator.IsUnsignedRealNumber(this.tbLineFov) &&
             StringValidator.IsEmptyOrUnsignedRealNumber(this.tbLineResolution)
            ) &&
            StringValidator.HasContent(this.cbCamInter, this.lbCamInter.Text) &&
            StringValidator.HasContent(this.tbFlange, this.lbFlange.Text) &&
            StringValidator.IsUnsignedRealNumber(this.tbFlange) &&
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbTarget) &&
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbDistance) &&
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbDistanRange));
 }
Пример #2
0
 private bool CheckDataBeforeSave()
 {
     return(StringValidator.HasContent(this.tbName, this.lbName.Text) &&
            StringValidator.HasContent(this.tbNumber, this.lbNumber.Text) &&
            StringValidator.HasContent(this.cbInter, this.lbInter.Text) &&
            StringValidator.HasContent(this.tbFocus, this.lbFocus.Text) && StringValidator.IsUnsignedRealNumber(this.tbFocus) &&
            StringValidator.HasContent(this.tbFlange, this.lbFlange.Text) && StringValidator.IsUnsignedRealNumber(this.tbFlange) &&
            StringValidator.HasContent(this.tbTarget, this.lbTarget.Text) && StringValidator.IsUnsignedRealNumber(this.tbTarget) &&
            StringValidator.HasContent(this.tbRatioMin, this.lbRatioRange.Text) && StringValidator.IsUnsignedRealNumber(this.tbRatioMin) &&
            StringValidator.HasContent(this.tbRatioMax, this.lbRatioRange.Text) && StringValidator.IsUnsignedRealNumber(this.tbRatioMax) &&
            StringValidator.HasContent(this.tbLength, this.lbLength.Text) && StringValidator.IsUnsignedRealNumber(this.tbLength) &&
            StringValidator.HasContent(this.tbHH, this.lbLength.Text) && StringValidator.IsUnsignedRealNumber(this.tbHH) &&
            //非必须
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbFreq) &&
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbWeight) &&
            StringValidator.IsEmptyOrUnsignedRealNumber(this.tbDistort) &&
            StringValidator.IsEmptyOrUnsignedInteger(this.tbResoLength) &&
            StringValidator.IsEmptyOrUnsignedInteger(this.tbResoWidth));
 }