示例#1
0
        bool CheckModule(bool checkRequieredProperties, EModuleType expected)
        {
            if (_Current == null)
            {
                _IO.WriteError(Lang.Get("Require_Module"));
                return(false);
            }

            if (expected != EModuleType.None)
            {
                if (_Current.ModuleType != expected)
                {
                    _IO.WriteError(Lang.Get("Require_Module_Type", expected.ToString()));
                    return(false);
                }
            }

            string error;

            if (checkRequieredProperties && !_Current.CheckRequiredProperties(_IO, out error))
            {
                _Current.WriteInfo(error);
                return(false);
            }
            return(true);
        }