private void ChoiceGamingCenter() { GamingCenterType = CheckGC(); if (GamingCenterType == GAMECENTERTYPE.GAMINGTCENTER) { regTimer = new System.Timers.Timer(); regTimer.Interval = 1000; regTimer.Elapsed += OnRegChanged; regTimer.Start(); } }
private GAMECENTERTYPE CheckGC() { int?Control = (int?)Registry.GetValue(keyName, "AuroraSwitch", null); if (Control.HasValue) { GamingCenterType = GAMECENTERTYPE.GAMINGTCENTER; SwitchOn = Control.Value; } else { GamingCenterType = GAMECENTERTYPE.NONE; SwitchOn = 0; } return(GamingCenterType); }
private GAMECENTERTYPE CheckGC() { try { int Control = (int)Registry.GetValue(keyName, "AuroraSwitch", 0); if (Control == 1) { GamingCenterType = GAMECENTERTYPE.GAMINGTCENTER; SwitchOn = Control; } } catch (Exception ex) { GamingCenterType = GAMECENTERTYPE.NONE; SwitchOn = 0; } return(GamingCenterType); }