当前位置: 首页>>代码示例>>C#>>正文


C# Settings.Load方法代码示例

本文整理汇总了C#中Settings.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Settings.Load方法的具体用法?C# Settings.Load怎么用?C# Settings.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Settings的用法示例。


在下文中一共展示了Settings.Load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Executes the task.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public override bool Execute()
		{
			Log.LogMessage(MessageImportance.Normal, "Gendarmalyzing {0}", Assembly);
			CheckDependencies();
			var runner = new MsBuildRunner(Log, m_LogType, LogFile);
			var config = new Settings(runner, ConfigurationFile, RuleSet);
			config.Load();
			var assemblyDef = AssemblyDefinition.ReadAssembly(Assembly,
				new ReaderParameters { AssemblyResolver = AssemblyResolver.Resolver });
			runner.Assemblies.Add(assemblyDef);
			runner.AutoUpdateIgnore = AutoUpdateIgnores;
			runner.AddIgnoreFile(IgnoreFile);
			runner.Initialize();
			runner.Run();
			runner.WriteReport();
			if (m_LogType == LogTypeEnum.None || (m_LogType == LogTypeEnum.Plain && string.IsNullOrEmpty(LogFile)))
				runner.PrintInScreen();
			if (runner.Defects.Count > 0)
			{
				string message;
				if (m_LogType == LogTypeEnum.None || (m_LogType == LogTypeEnum.Plain && string.IsNullOrEmpty(LogFile)))
					message = string.Format("Gendarme found {0} defects in code", runner.Defects.Count);
				else
				{
					message = string.Format("Gendarme found {0} defects in code. See {1} for details.",
						runner.Defects.Count, LogFile);
				}
				Log.LogError(message);
			}
			return !(Log.HasLoggedErrors && VerifyFail);
		}
开发者ID:sillsdev,项目名称:Gendarme.MsBuild,代码行数:36,代码来源:GendarmeTask.cs

示例2: LoadSettings

        public bool LoadSettings()
        {
            var s = new Settings();

            if (s.Load(Settings.DefaultFilePath))
            {
                _settings = s;
                return true;
            }

            return false;
        }
开发者ID:minustar,项目名称:MinustarDictionaries,代码行数:12,代码来源:Controller.cs

示例3: Initializer

        public Initializer()
        {
            new FileChecker();
            _saver = new MainSaver(_logger);
            this.Settings = new Settings(_logger);
            Settings.Load(ConfigSaveLocation);
            Settings.SetSavePath(ConfigSaveLocation);

            if (Settings.Get<bool>(_names.Console))
                _logger.ChangeLogger(new ConsoleLogger(Settings));
            else
                _logger.ChangeLogger(new EmptyLogger());
            _logger.AddLogger(new FileLogger(_saver, Settings));

            _logger.Log("booting up...", LogLevel.Basic);
        }
开发者ID:ColdVolcano,项目名称:StreamCompanion,代码行数:16,代码来源:Initializer.cs

示例4: Register

        private void Register()
        {
            var containerBuilder = new ContainerBuilder();

            containerBuilder.RegisterType<WebApiClient>().As<IWebApiClient>().SingleInstance();
            containerBuilder.RegisterType<WebApiHost>().As<IWebApiHost>().SingleInstance();

            containerBuilder.RegisterType<MainWindowViewModel>().SingleInstance();
            containerBuilder.RegisterType<LoginViewModel>();
            containerBuilder.RegisterType<SellViewModel>();
            containerBuilder.RegisterType<SettingsViewModel>().SingleInstance();
            containerBuilder.RegisterType<FiscalPrinterHandler>().SingleInstance();
            containerBuilder.RegisterType<LotteryTicketChecker>().SingleInstance();

            var settings = new Settings();
            settings.Load();
            containerBuilder.RegisterInstance(settings).SingleInstance();

            Container = containerBuilder.Build();
        }
开发者ID:svstoichkov,项目名称:Eugenie-v3,代码行数:20,代码来源:ViewModelLocator.cs

示例5: GetModFpkFiles

 public static List<string> GetModFpkFiles()
 {
     Settings settings = new Settings();
     settings.Load();
     List<string> fpkList = new List<string>();
     foreach (ModEntry mod in settings.ModEntries)
     {
         foreach (ModFpkEntry fpkFile in mod.ModFpkEntries)
         {
             fpkList.Add(Tools.ToQarPath(fpkFile.FilePath));
         }
     }
     return fpkList;
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:14,代码来源:SettingsManager.cs

示例6: ApplicationData

 /// <summary>
 /// 
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="project"></param>
 /// <param name="settingFileName"></param>
 public ApplicationData(Settings settings, Project project, string settingFileName)
 {
     m_setting = settings;
     m_setting.Load(settingFileName);
     m_project = project;
 }
开发者ID:dgx80,项目名称:csharp-app-lib,代码行数:12,代码来源:ApplicationData.cs

示例7: LoadFromTable

		public static Settings LoadFromTable(Table t) {
			Settings s = new Settings();
			s.Load(t);
			return s;
		}
开发者ID:wfowler1,项目名称:Miscellaneous-Soundboards,代码行数:5,代码来源:Weapon.cs

示例8: SetGameData

 public static void SetGameData(GameData NewGameData)
 {
     Settings settings = new Settings();
     settings.Load();
     settings.GameData = NewGameData;
     settings.Save();
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:7,代码来源:SettingsManager.cs

示例9: UpdateDatHash

        public static void UpdateDatHash()
        {
            Settings settings = new Settings();
            settings.Load();

            // Hash 01.dat and update settings file
            string datHash = Tools.GetMd5Hash(ModManager.ZeroPath);
            settings.GameData.DatHash = datHash;

            settings.Save();
        }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:11,代码来源:SettingsManager.cs

示例10: GetSettingsVersion

 public static Version GetSettingsVersion()
 {
     Settings settings = new Settings();
     settings.Load();
     return settings.SbVersion.AsVersion();
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:6,代码来源:SettingsManager.cs

示例11: RemoveMod

 public static void RemoveMod(ModEntry Mod)
 {
     Settings settings = new Settings();
     settings.Load();
     ModEntry remMod = settings.ModEntries.Find(entry => entry.Name == Mod.Name);
     settings.ModEntries.Remove(remMod);
     settings.Save();
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:8,代码来源:SettingsManager.cs

示例12: PDBFiles

 public PDBFiles()
 {
     Settings set = new Settings();
     set.Load();
     mode = set.mode;
 }
开发者ID:uQlust,项目名称:uQlust-ver1.0,代码行数:6,代码来源:PDBFiles.cs

示例13: GetDistance

        public override int[] GetDistance(string refStructure, List<string> structures)
        {
            int[] dist = new int[structures.Count];
            distanceMatrix = new int[structures.Count];
            Settings set = new Settings();
            set.Load();
            int threadNumbers = set.numberOfCores;
            this.structures = new List<string>(structures);
            int part = this.structNames.Count / threadNumbers;
            indexList = new List<KeyValuePair<int, int>>[threadNumbers];
            for (int j = 0; j < indexList.Length; j++)
            {
                indexList[j] = new List<KeyValuePair<int, int>>();
            }
            int count = 0;
            for (int j = 0; j < this.structures.Count; j++)
            {
                if (indexList[count].Count < part)
                {
                    KeyValuePair<int, int> aux = new KeyValuePair<int, int>(j, 0);
                    indexList[count].Add(aux);
                }
                else
                    count++;
            }
            this.structures.Add(refStructure);
            resetEvents = new ManualResetEvent[threadNumbers];
            for (int n = 0; n < threadNumbers; n++)
            {
                int k = n;
                resetEvents[n] = new ManualResetEvent(false);
                ThreadPool.QueueUserWorkItem(new WaitCallback(CalcMatrixList), (object)k);
                

            }
            for (int j = 0; j < threadNumbers; j++)
                resetEvents[j].WaitOne();

            for (int j = 0; j < this.structures.Count - 1; j++)
                dist[j] = distanceMatrix[j];

            return dist;

        }
开发者ID:uQlust,项目名称:uQlust-ver1.0,代码行数:44,代码来源:Rmsd.cs

示例14: GetInstalledMods

 public static List<ModEntry> GetInstalledMods()
 {
     Settings settings = new Settings();
     settings.Load();
     return settings.ModEntries;
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:6,代码来源:SettingsManager.cs

示例15: GetGameData

 public static GameData GetGameData()
 {
     Settings settings = new Settings();
     settings.Load();
     return settings.GameData;
 }
开发者ID:topher-au,项目名称:SnakeBite,代码行数:6,代码来源:SettingsManager.cs


注:本文中的Settings.Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。