示例#1
0
        static bool VersionOK(string source)
        {
            if (_log.IsDebugEnabled)
            {
                _log.DebugFormat("Starting {0}", MethodBase.GetCurrentMethod().ToString());
            }
            bool AtLeastOne = true;
            bool retVal     = true;

            string[] xmlFiles = GetAllXmlFiles(source);
            if (xmlFiles == null)
            {
                retVal = false;
            }
            else
            {
                foreach (string s in xmlFiles)
                {
                    AtLeastOne = false;
                    decimal ver = ModManagement.GetVesselDataVersion(s);
                    if (ver >= 1.56M)
                    {
                        AtLeastOne = true;

                        break;
                    }
                }
                if (!AtLeastOne)
                {
                    retVal = (Locations.MessageBoxShow(
                                  AMLResources.Properties.Resources.IncompatibleVesselDataMessage
                                  + DataStrings.CRCR
                                  + AMLResources.Properties.Resources.InstallAnyhowQuestion,
                                  MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes);
                }
            }
            if (_log.IsDebugEnabled)
            {
                _log.DebugFormat("Ending {0}", MethodBase.GetCurrentMethod().ToString());
            }
            return(retVal);
        }