コード例 #1
0
        private bool test()
        {
            if (string.IsNullOrWhiteSpace(txtNumberplate.Text))
            {
                Feedback.ErrorInvalidNumberPlate();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtMileage.Text))
            {
                Feedback.ErrorInvalidKM();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtTankFilling.Text))
            {
                Feedback.ErrorInvalidCurrentFuel();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(comboBrand.Text))
            {
                Feedback.ErrorInvalidBrand();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtModel.Text))
            {
                Feedback.ErrorInvalidModel();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPower.Text))
            {
                Feedback.ErrorInvalidPower();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(comboGear.Text))
            {
                Feedback.ErrorInvalidShift();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtMaxTankFilling.Text))
            {
                Feedback.ErrorInvalidMaxFuel();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPrice.Text))
            {
                Feedback.ErrorInvalidBasePrice();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPriceKilo.Text))
            {
                Feedback.ErrorInvalidPricePerKm();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPriceMin.Text))
            {
                Feedback.ErrorInvalidPricePerMin();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPosX.Text))
            {
                Feedback.ErrorInvalidXCoord();
                return(false);
            }

            if (string.IsNullOrWhiteSpace(txtPosY.Text))
            {
                Feedback.ErrorInvalidYCoord();
                return(false);
            }
            return(true);
        }