コード例 #1
0
        public override void Load()
        {
            base.Load();

            chkPingUnofficialTunnels.Checked      = IniSettings.PingUnofficialCnCNetTunnels;
            chkWriteInstallPathToRegistry.Checked = IniSettings.WritePathToRegistry;
            chkPlaySoundOnGameHosted.Checked      = IniSettings.PlaySoundOnGameHosted;
            chkNotifyOnUserListChange.Checked     = IniSettings.NotifyOnUserListChange;
            chkConnectOnStartup.Checked           = IniSettings.AutomaticCnCNetLogin;
            chkSkipLoginWindow.Checked            = IniSettings.SkipConnectDialog;
            chkPersistentMode.Checked             = IniSettings.PersistentMode;

            chkDiscordIntegration.Checked = !String.IsNullOrEmpty(ClientConfiguration.Instance.DiscordAppId) &&
                                            IniSettings.DiscordIntegration;

            string localGame = ClientConfiguration.Instance.LocalGame;

            foreach (var chkBox in followedGameChks)
            {
                if (chkBox.Name == localGame)
                {
                    chkBox.AllowChecking = false;
                    chkBox.Checked       = true;
                    IniSettings.SettingsIni.SetBooleanValue("Channels", localGame, true);
                    continue;
                }

                chkBox.Checked = IniSettings.IsGameFollowed(chkBox.Name);
            }
        }