本文整理汇总了C#中Settings.get方法的典型用法代码示例。如果您正苦于以下问题:C# Settings.get方法的具体用法?C# Settings.get怎么用?C# Settings.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings.get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TimeEntry
public TimeEntry()
{
if (DEFAULT_EMPLOYEE_ID == 0)
{
ISettings _settings = new Settings();
string empId = _settings.get("TIMES", "EMPLOYEE_ID", "58");
string task = _settings.get("TIMES", "TASK_KEY", "D");
string rate = _settings.get("TIMES", "EMPLOYEE_RATE", "120");
System.Diagnostics.Debug.WriteLine(String.Format("Employee {0} using Task ID {1}",empId,task));
DEFAULT_TASK_TYPE = task;
DEFAULT_EMPLOYEE_ID = Convert.ToInt32(empId);
DEFAULT_EMPLOYEE_RATE = Convert.ToDouble(rate);
}
}
示例2: Start
public void Start()
{
// Startup
if (!registered)
{
Instance = this;
GameEvents.onVesselSituationChange.Add(onVesselSituationChangeNew);
GameEvents.onFlightReady.Add(onFlightReady);
GameEvents.onGameSceneSwitchRequested.Add(onGameSceneSwitchRequested);
GameEvents.onCrewOnEva.Add(onCrewOnEVA);
GameEvents.onCrewBoardVessel.Add(onCrewBoardVessel);
GameEvents.onVesselChange.Add(onVesselChange);
registered = true;
Settings = new Settings(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "ClampsBeGone.cfg"));
if (Settings.load())
{
foreach (string n in Settings.get<string>("ModModuleNames").Split(','))
{
if (n.Equals("iPeerNonStockLaunchClampTester")) // We don't need this any more
continue;
if (!this.nonStockModules.Contains(n))
this.nonStockModules.Add(n);
}
Logger.Log("Loaded {0} Mod module names from file", this.nonStockModules.Count);
}
GUIManager = new GUIManager();
}
}