コード例 #1
0
        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");
        }
コード例 #2
0
 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.";
     }
 }