Example #1
0
 public bool okButton_validating()
 {
     if (!ValidityHelperClass.isFloat(addTreeScaleTextBox.Text))
     {
         MessageBox.Show("Scale can not be parsed to a floating point number", "Incorrect scale", MessageBoxButtons.OK);
         return(false);
     }
     else
     {
         if (!ValidityHelperClass.isFloat(addTreeScaleVarianceTextBox.Text))
         {
             MessageBox.Show("Scale variance can not be parsed to a floating point number", "Incorrect scale variance", MessageBoxButtons.OK);
             return(false);
         }
         else
         {
             if (!ValidityHelperClass.isUint(addTreeInstancesTextBox.Text))
             {
                 MessageBox.Show("Instances can not be parsed to a unsigned integer number", "Incorrect instances", MessageBoxButtons.OK);
                 return(false);
             }
         }
     }
     return(true);
 }
 public bool okButton_validating()
 {
     if (!ValidityHelperClass.isInt(respawnTimeTextbox.Text))
     {
         MessageBox.Show("Respawn time can not be parsed to a integer number", "Incorrect respawn time", MessageBoxButtons.OK);
         return(false);
     }
     else
     {
         if (!ValidityHelperClass.isUint(numberOfSpawnsTextbox.Text))
         {
             MessageBox.Show("Number of spanws can not be parsed to a unsigned integer number", "Incorrect number of spawns", MessageBoxButtons.OK);
             return(false);
         }
         else
         {
             if ((!ValidityHelperClass.isInt(spawnRadiusTextbox.Text)) && (showRadius))
             {
                 MessageBox.Show("Spawn radius can not be parsed to a integer number", "Incorrect spawn radius", MessageBoxButtons.OK);
                 return(false);
             }
         }
     }
     return(true);
 }
Example #3
0
 private bool maxFPSValidate()
 {
     if (maxFramesPerSecondCheckBox.Checked)
     {
         if (ValidityHelperClass.isUint(maxFPSTextbox.Text) && uint.Parse(maxFPSTextbox.Text) > 0)
         {
             return(true);
         }
         maxFPSTextbox.ForeColor = Color.Red;
         return(false);
     }
     return(true);
 }
Example #4
0
 private void uintValidateEvent(object sender, CancelEventArgs e)
 {
     if (!ValidityHelperClass.isUint(((TextBox)sender).Text))
     {
         Color textColor = Color.Red;
         ((TextBox)sender).ForeColor = textColor;
     }
     else
     {
         Color textColor = Color.Black;
         ((TextBox)sender).ForeColor = textColor;
     }
 }
        private void intVerifyevent(object sender, CancelEventArgs e)
        {
            TextBox textbox = (TextBox)sender;

            if (!ValidityHelperClass.isUint(textbox.Text))
            {
                Color textColor = Color.Red;
                textbox.ForeColor = textColor;
            }
            else
            {
                Color textColor = Color.Black;
            }
        }
Example #6
0
 public bool okButton_validating()
 {
     if (!ValidityHelperClass.isUint(autoSaveTimeTextBox.Text) || uint.Parse(autoSaveTimeTextBox.Text) == 0)
     {
         return(false);
     }
     else
     {
         if (!maxFPSValidate())
         {
             return(false);
         }
         else
         {
             if (!ValidityHelperClass.isFloat(cameraNearDistanceTextBox.Text))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
        public bool okButton_validating()
        {
            string text = ValueTextbox.Text;

            switch (valueType)
            {
            case "Float":
                return(ValidityHelperClass.isFloat(text));

                break;

            case "uInt":
                return(ValidityHelperClass.isUint(text));

                break;

            case "int":
                return(ValidityHelperClass.isInt(text));

                break;
            }
            return(true);
        }
Example #8
0
 public bool okButton_validating()
 {
     if (!ValidityHelperClass.isFloat(minimumWidthScaleTextBox.Text))
     {
         MessageBox.Show("Minimum width scale can not be parsed to a floating point number", "Incorrect minimum width scale", MessageBoxButtons.OK);
         return(false);
     }
     else
     {
         if (!ValidityHelperClass.isFloat(maximumWidthScaleTextBox.Text))
         {
             MessageBox.Show("Maximum width scale can not be parsed to a floating point number", "Maximum width scale", MessageBoxButtons.OK);
             return(false);
         }
         else
         {
             if (!ValidityHelperClass.isFloat(minimumHeightScaleTextBox.Text))
             {
                 MessageBox.Show("Minimum height scale can not be parsed to a floating point number", "Incorrect minimum height scale", MessageBoxButtons.OK);
                 return(false);
             }
             else
             {
                 if (!ValidityHelperClass.isFloat(maximumHeightScaleTextBox.Text))
                 {
                     MessageBox.Show("Maximum height scale can not be parsed to a floating point number", "Incorrect maximum height scale", MessageBoxButtons.OK);
                     return(false);
                 }
                 else
                 {
                     if (!ValidityHelperClass.isFloat(colorMultLowTextBox.Text))
                     {
                         MessageBox.Show("Color muliplier low can not be parsed to a floating point number", "Incorrect color multiplier low", MessageBoxButtons.OK);
                         return(false);
                     }
                     else
                     {
                         if (!ValidityHelperClass.isFloat(colorMultHiTextBox.Text))
                         {
                             MessageBox.Show("Color multiplier high can not be parsed to a floating point number", "Incorrect color multiplier high", MessageBoxButtons.OK);
                             return(false);
                         }
                         else
                         {
                             if (!ValidityHelperClass.isUint(instancesTextBox.Text))
                             {
                                 MessageBox.Show("Instances can not be parsed to a unsigned integer number", "Incorrect instances", MessageBoxButtons.OK);
                                 return(false);
                             }
                             else
                             {
                                 if (!ValidityHelperClass.isFloat(windMagnitudeTextBox.Text))
                                 {
                                     MessageBox.Show("Wind magnitude can not be parsed to a floating point number", "Incorrect wind magnitude", MessageBoxButtons.OK);
                                     return(false);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return(true);
 }