Exemplo n.º 1
0
        private void RegionList_SelectedIndexChanged(object sender, EventArgs e)
        {
            Settings.Region = RegionList.SelectedItem.ToString();

            var cert = Certificates.FirstOrDefault(kv => kv.Key == Settings.Region).Value;

            if (cert == null)
            {
                cert = Certificates.First().Value;
            }

            Connection.ChangeRemote(cert.Domain, cert.Certificate);
        }
Exemplo n.º 2
0
        private void RegionList_SelectedIndexChanged(object sender, EventArgs e)
        {
            LeagueRegion region;

            if (!LeagueRegion.TryParse(RegionList.SelectedItem.ToString(), out region))
            {
                StaticLogger.Warning("Unknown enum " + RegionList.SelectedItem);
                return;
            }

            Settings.Region = region;

            var cert = Certificates.FirstOrDefault(kv => kv.Key == Settings.Region).Value;

            if (cert == null)
            {
                cert = Certificates.First().Value;
            }

            Connection.ChangeRemote(cert.Domain, cert.Certificate);
        }