Azavea.NijPredictivePolicing.AcsAlchemistGui.MainForm.CheckValidity C# (CSharp) Method

CheckValidity() protected method

Sanity check to determine if we have enough information to start a job / export -- This function should display a MessageBox if something is really wrong
protected CheckValidity ( bool isFishnet ) : bool
isFishnet bool
return bool
        protected bool CheckValidity(bool isFishnet)
        {
            /** TODO: Gather all inputs and update our controller / job instance */

            var importObj = FormController.Instance.JobInstance;

            if (string.IsNullOrEmpty(importObj.Year))
            {
                MessageBox.Show("No year selected", "Required setting missing", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return false;
            }

            if (importObj.State == AcsState.None)
            {
                MessageBox.Show("No state selected", "Required setting missing", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return false;
            }

            if (string.IsNullOrEmpty(importObj.SummaryLevel))
            {
                MessageBox.Show("No summary level selected", "Required setting missing", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return false;
            }

            if (string.IsNullOrEmpty(importObj.IncludedVariableFile))
            {
                MessageBox.Show("No variables file selected", "Required setting missing", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return false;
            }

            return true;
        }