public Boolean CheckActionPane(Int32 A)
        {
            Boolean ok = true;

            if (A == 1)
            {
                ok = UCActionPane1.ValidateInput();
            }
            else if (A == 2)
            {
                ok = UCActionPane2.ValidateInput();
            }
            return(ok);
        }
        public Boolean Initialize(String modelFilePath, out String errorMessage)
        {
            Boolean ok = true;

            errorMessage = null;
            WeibullMarkovModel model = null;

            try
            {
                String localSchemaPath = MapPath(UCPolicy.SCHEMA_FILE_PATH);

                if (System.IO.File.Exists(localSchemaPath))
                {
                    ok = TWeibullMarkovLibrary.Utilities.ValidateXMLvsXSD(modelFilePath, localSchemaPath, null, out errorMessage);
                }
                if (ok)
                {
                    // It is already validated, that's whay the second argument is null
                    model = WeibullMarkovModel.LoadFromXml(modelFilePath, null, out errorMessage);
                    ok    = (model != null);
                }
                if (ok)
                {
                    UCWeibullPane1.Initialize(1, model);
                    UCWeibullPane2.Initialize(2, model);
                    UCWeibullPane3.Initialize(3, model);
                    UCWeibullPane4.Initialize(4, model);
                    UCActionPane1.Initialize(1, model);
                    UCActionPane2.Initialize(2, model);
                    UCFailureCost1.Initialize(model);
                    UCDiscounting1.Initialize(model);
                    UCPolicy1.Initialize(model);
                }
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
                ok           = false;
            }

            if (!ok)
            {
                UCPolicy1.DisplayError(errorMessage);
            }

            return(ok);
        }
        public Boolean CheckActionPanes(out Boolean ok1, out Boolean ok2, out Boolean ok3)
        {
            ok1 = CheckActionPane(1);
            ok2 = CheckActionPane(2);

            ok3 = true;
            if (ok1 && ok2)
            {
                ok3 = false;
                for (Int32 i = 0; !ok3 && i < 4; i++)
                {
                    ok3 = (UCActionPane1.IsApplicableToState(i) || UCActionPane2.IsApplicableToState(i));
                }
            }

            return(ok1 && ok2 && ok3);
        }