示例#1
0
        private void addAcctBanButtonItem_Click(object sender, EventArgs e)
        {
            Dictionary<string, List<string>> acctDict = mysql.ReadAll(Settings.Default.AuthDB, "account");

            var acctList = new List<string>();

            if (acctDict.ContainsKey("username"))
            {
                for (int i = 0; i < acctDict["username"].Count; i++)
                {
                    acctList.Add(acctDict["username"][i]);
                }
            }

            using (var addAcctBan = new AddAcctBan())
            {
                addAcctBan.AcctBanSubmitted += addAcctBan_AcctBanSubmitted;

                addAcctBan.acctList = acctList;

                addAcctBan.ShowDialog();
            }
        }
示例#2
0
 private void addAcctBan_AcctBanSubmitted(object sender, AddAcctBan.AcctBanSubmittedEventArgs e)
 {
     SendToServer(String.Format("{0} {1} -1 {2}", Constants.BanAccount, e.account, Constants.BanReason));
 }