Esempio n. 1
0
 private void ValidateXMLVersion(string filePath)
 {
     var versionControl = new SettingsVersionControl();
     var validator = new SettingsValidator();
     if (File.Exists(filePath))
     {
         versionControl.UpdateSettingsFile(filePath);
         bool isValid = validator.ValidateSettingsFile(filePath, true);
         if (!isValid)
         {
         }
     }
 }
Esempio n. 2
0
        private void ValidateXMLVersion(string filePath)
        {
            var versionControl = new SettingsVersionControl();
            var Validator      = new SettingsValidator();

            if (File.Exists(filePath))
            {
                versionControl.UpdateSettingsFile(filePath);
                bool isValid = Validator.ValidateSettingsFile(filePath, true);
                if (!isValid)
                {
                    this.Close();
                }
            }
        }
Esempio n. 3
0
        protected void ValidateXMLVersion(string filePath)
        {
            var versionControl = new SettingsVersionControl();
            var Validator      = new SettingsValidator();

            if (File.Exists(filePath))
            {
                versionControl.UpdateSettingsFile(filePath);
                bool isValid = Validator.ValidateSettingsFile(filePath, false);
                if (!isValid)
                {
                    if (Param.Value != null && Param.Value.Count > 0)
                    {
                        this.Close();
                    }
                }
            }
        }
Esempio n. 4
0
		protected void ValidateXMLVersion(string filePath)
		{
			var versionControl = new SettingsVersionControl();
			var Validator = new SettingsValidator();
			if (File.Exists(filePath))
			{
				versionControl.UpdateSettingsFile(filePath);
				bool isValid = Validator.ValidateSettingsFile(filePath, false);
				if (!isValid)
				{
					if (Param.Value != null && Param.Value.Count > 0)
					{
						_lastSelectedLayout = Param.Value["LayoutSelected"];
						this.Close();
					}
				}
			}
		}
        public void MergeStyleSetting()
        {
            Common.Testing = true;
            SettingsVersionControl settingsVersion = new SettingsVersionControl();
            settingsVersion.UpdateSettingsFile(string.Empty);

            string expectedFileWithPath = Common.PathCombine(_expectBasePath, "DictionaryStyleSettings.xml");
            string outputFileWithPath = Common.PathCombine(_outputBasePath, "DictionaryStyleSettings.xml");
            TextFileAssert.AreEqual(expectedFileWithPath, outputFileWithPath, "Dictionary Setting file fails");

            expectedFileWithPath = Common.PathCombine(_expectBasePath, "ScriptureStyleSettings.xml");
            outputFileWithPath = Common.PathCombine(_outputBasePath, "ScriptureStyleSettings.xml");
            TextFileAssert.AreEqual(expectedFileWithPath, outputFileWithPath, "Scripture Setting file fails");
        }