public void setfile_Get(object sender, SQLReference.InetConnectionCompletedEventArgs e) { client.InetConnectionCompleted -= setfile_Get; loadingMenu.ProgressBar1.Value = 50; string strdata = M.ByteArrayToString(e.Result); if (string.IsNullOrEmpty(strdata)) { MessageBox.Show("Failed to load cards. "); showLogin(); return; } M.ParseSETCards(strdata); client.InetConnectionCompleted += (s, e2) => { if (e2.Result != null) { M.ParseBanlist(M.ByteArrayToString(e2.Result)); showLogin(); } else { MessageBox.Show("Could not find banlist. Tournament mode will be disabled."); for (int n = 1; n <= M.TotalCards; n++) { M.CardStats[n].Limit = 0; } showLogin(); } }; client.InetConnectionAsync("http://192.227.234.101/admin/banlist/" + M.mySet + ".txt"); }
private void tournamentBanList_Get(object sender, SQLReference.InetConnectionCompletedEventArgs e) { if (e.Error == null) { if (e.Result != null) { M.ParseBanlist(M.ByteArrayToString(e.Result)); } } else { lblSuccess.Visibility = System.Windows.Visibility.Visible; lblSuccess.Text = "Error: Failure to get banlist."; } }