本文整理汇总了C#中Statistics.RefreshStatisticsFromDB方法的典型用法代码示例。如果您正苦于以下问题:C# Statistics.RefreshStatisticsFromDB方法的具体用法?C# Statistics.RefreshStatisticsFromDB怎么用?C# Statistics.RefreshStatisticsFromDB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistics
的用法示例。
在下文中一共展示了Statistics.RefreshStatisticsFromDB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateCachedVariables
internal static void UpdateCachedVariables()
{
if (refreshRequired())
{
Stats = new Statistics();
if (Helper.Settings.Instance.Client != null)
{
Dictionary<string, object> rawData = Helper.Settings.Instance.Client.GetStatistics();
if (rawData.ContainsKey("ALIVE"))
Stats.IsAlive = Boolean.Parse(rawData["ALIVE"].ToString());
if (rawData.ContainsKey("CURRENT"))
Stats.PlayerStats.Current = Int32.Parse(rawData["CURRENT"].ToString());
if (rawData.ContainsKey("TOTAL"))
Stats.PlayerStats.Total = Int32.Parse(rawData["TOTAL"].ToString());
if (rawData.ContainsKey("RUNTIME"))
Stats.FormatedRuntime = rawData["RUNTIME"].ToString();
if (rawData.ContainsKey("STATISTICSFILE"))
Stats.RefreshStatisticsFromDB(rawData["STATISTICSFILE"].ToString());
if (rawData.ContainsKey("ENABLED"))
Stats.Enabled = Boolean.Parse(rawData["ENABLED"].ToString());
PlayeridentificationEnabled = Helper.Settings.Instance.Client.GetPlayerIdentification();
PremiumslotsEnabled = Helper.Settings.Instance.Client.GetPremiumslots();
if (PlayeridentificationEnabled)
KnownPlayersLocation = Helper.Settings.Instance.Client.GetPlayersDatabase();
if (PremiumslotsEnabled)
PremiumplayersLocation = Helper.Settings.Instance.Client.GetPremiumDatabase();
}
statsLastUpdated = DateTime.Now;
refreshJSON();
}
}