Пример #1
0
        private void DownloadServerInfo()
        {
            m_WorldHandler.Wolrds.Clear();
            Server current = (Server)serversBindingSource.Current;

            if (current != null)
            {
                var downloader = m_WorldHandler.DownloadServerInfo(current);
                worldDownloaderBindingSource.DataSource = downloader;
                downloader.DownloadsComplete           += (sender, args) =>
                {
                    WorldInfo selectedWorld = m_WorldHandler.Wolrds.FirstOrDefault(s => s.Name == Settings.Default.SelectedWorldName);
                    if (selectedWorld != null)
                    {
                        worldInfoBindingSource.Position = m_WorldHandler.Wolrds.IndexOf(selectedWorld);
                    }
                };
            }
        }