示例#1
0
        private void procBtn_Click(object sender, EventArgs e)
        {
            AdminCmd cmd = GetCmd();

            if (cmd == null)
            {
                return;
            }

            // set uid
            if (string.IsNullOrEmpty(uidCbx.Text))
            {
                WriteLog("uid不能为空");
                return;
            }

            // 计算uid
            string uid = uidCbx.Text;

            if (char.IsDigit(uid[0]))
            {
                uid = "u" + uid;
            }
            cmd.Uid = uid;
            if (m_mgr.UpdateUID(uid))
            {
                UpdateUID();
            }

            // 发送gm
            string msg = cmd.Concat();

            m_mgr.Execute(msg, (int)countNum.Value);
        }
示例#2
0
        // 批量执行
        private void batchBtn_Click(object sender, EventArgs e)
        {
            AdminCmd cmd = GetCmd();

            if (cmd == null)
            {
                return;
            }

            string uidstr = uidListRTB.Text;

            if (string.IsNullOrEmpty(uidstr))
            {
                WriteLog("uid不能为空");
                return;
            }

            string[] uids = uidstr.Split(new char[] { '\n', ',', '|' }, StringSplitOptions.RemoveEmptyEntries);
            if (uids.Length == 0)
            {
                WriteLog("uid不能为空");
                return;
            }

            for (int i = 0; i < uids.Length; ++i)
            {
                string uid = uids[i];
                if (char.IsDigit(uid[0]))
                {
                    uid = "u" + uid;
                }
                cmd.Uid = uid;
                string msg = cmd.Concat();
                m_mgr.Execute(msg, 1);
            }
        }