private void backgroundWorkerEditNotice_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpServer.Enabled = true;
            this.GrpNotice.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);

            btnAddNotice.Enabled = true;
            btnAddNotice.Visible = true;

            btnEditNotice.Enabled = false;
            btnEditNotice.Visible = false;

            chbNoticeImmed.Checked = false;
            DptStartTime.Value     = DateTime.Now;
            DptStartTime.Enabled   = true;
            DptEndTime.Value       = DateTime.Now;
            DptEndTime.Enabled     = true;
            nudTimeSpan.Value      = 1;
            nudTimeSpan.Enabled    = true;
            cmbType.Items.Clear();
            cmbType.Items.Add(config.ReadConfigValue("MSD", "NM_UI_cmbNoticeCheck"));
            cmbType.Items.Add(config.ReadConfigValue("MSD", "NM_UI_cmbNoticeCommon"));
            cmbType.Items.Add(config.ReadConfigValue("MSD", "NM_UI_cmbNoticeEvent"));
            cmbType.Items.Add(config.ReadConfigValue("MSD", "NM_UI_cmbNoticeSystem"));
            txtContent.Text = "";
            NoticeList();
        }
Example #2
0
        private void backgroundWorkerKickPlayer_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled    = true;
            this.GrdCharacter.Enabled = true;
            this.Cursor = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);
            PartInfo();
        }
        private void backgroundWorkerDeleteNotice_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpServer.Enabled = true;
            this.GrpNotice.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);
            NoticeList();
        }
        private void backgroundWorkerRecoverPwd_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);

            PartInfo();
            this.txtTempPwd.Text = "";
        }
        private void backgroundWorkerUnBind_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);
            BanList();
            this.txtUnBindAccount.Text = "";
            this.txtUnBindReason.Text  = "";
        }
        private void backgroundWorkerModiLvl_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);

            PartInfo();
            this.txtCharLvl.Text         = "";
            this.NudNewLvl.SelectedIndex = 0;
        }
        private void backgroundWorkerBanPlayer_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);
            PartInfo();
            this.txtBanAccount.Text  = "";
            this.DptBanEndTime.Value = DateTime.Now;
            this.txtBanReason.Text   = "";
        }
        private void backgroundWorkerAddMoney_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            Operation_GD.showResult(mResult);

            PartInfo();
            this.txtCharMoney.Text = "";
            this.NudMoney.Value    = 1;
            this.txtTitle.Text     = "";
            this.txtContent.Text   = "";
        }
Example #9
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtNewAccount.Text.Trim() == "")
                {
                    MessageBox.Show("新的GM帐号名不能为空!");
                    return;
                }
                //if (this.txtCurAccount.Text.Trim()==this.txtNewAccount.Text.Trim())
                //{
                //    MessageBox.Show("新的GM帐号名不能与当前的GM帐号名相同!");
                //    return;
                //}
                if (this.txtPassword.Text.ToString() == "")
                {
                    MessageBox.Show("新的GM帐号密码不能为空!");
                    return;
                }
                if (this.txtPassword.Text.ToString() != this.txtRepPass.Text.ToString())
                {
                    MessageBox.Show("新的GM帐号密码和重输的帐号密码不同!");
                    return;
                }
                this.GrpSearch.Enabled = false;
                this.tbcResult.Enabled = false;
                this.Cursor            = Cursors.WaitCursor;//改变鼠标状态

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[7];

                mContent[0].eName    = CEnum.TagName.SD_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = serverIP;

                mContent[1].eName    = CEnum.TagName.UserByID;
                mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                mContent[5].eName    = CEnum.TagName.f_idx;
                mContent[5].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[5].oContent = userID;

                mContent[2].eName    = CEnum.TagName.SD_UserName;
                mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[2].oContent = this.txtNewAccount.Text.Trim();

                mContent[3].eName    = CEnum.TagName.SD_UserName_Old;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = txtCurAccount.Text.ToString();

                mContent[4].eName    = CEnum.TagName.SD_passWd;
                mContent[4].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[4].oContent = txtPassword.Text.ToString();

                mContent[6].eName    = CEnum.TagName.f_pilot;
                mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[6].oContent = textBox1.Text.ToString();



                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_UpdateGmAccount_Query, mContent);
                }

                this.GrpSearch.Enabled = true;
                this.tbcResult.Enabled = true;
                this.Cursor            = Cursors.Default;//改变鼠标状态

                //CEnum.Message_Body[,] mResult = (CEnum.Message_Body[,])e.Result;
                if (mResult[0, 0].oContent.ToString() == "SCUESS")
                {
                    Operation_GD.showResult(mResult);

                    //return;
                }
                else
                {
                    MessageBox.Show("修改失败");
                }

                //this.tbcResult.SelectedIndex = 1;
                this.btnSearch_Click(null, null);
                //this.txtCharLvl.Text = "";
                //this.NudNewLvl.SelectedIndex = 0;
                //this.backgroundWorkerModiBodyLevel.RunWorkerAsync(mContent);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #10
0
        private void btnModiLvl_Click(object sender, EventArgs e)
        {
            try
            {
                //if (this.txtAccount.Text.Trim() == "")
                //{
                //    MessageBox.Show(config.ReadConfigValue("MSD", "AM_Hint_inputName"));
                //    return;
                //}

                this.GrpSearch.Enabled = false;
                this.tbcResult.Enabled = false;
                this.Cursor            = Cursors.WaitCursor;//改变鼠标状态

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[7];

                mContent[0].eName    = CEnum.TagName.SD_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = serverIP;

                mContent[1].eName    = CEnum.TagName.UserByID;
                mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                mContent[2].eName    = CEnum.TagName.f_idx;
                mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[2].oContent = userID;

                mContent[3].eName    = CEnum.TagName.SD_UserName;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = txtAccount.Text.Trim();

                mContent[4].eName = CEnum.TagName.SD_UnitLevelNumber;
                mContent[4].eTag  = CEnum.TagFormat.TLV_INTEGER;

                if (this.NudNewLvl.Text.ToString() == "1(新手)")
                {
                    mContent[4].oContent = 1;
                }
                else if (this.NudNewLvl.Text.ToString() == "2(初级)")
                {
                    mContent[4].oContent = 2;
                }
                else if (this.NudNewLvl.Text.ToString() == "3(中级)")
                {
                    mContent[4].oContent = 3;
                }
                else if (this.NudNewLvl.Text.ToString() == "4(高级)")
                {
                    mContent[4].oContent = 4;
                }
                else if (this.NudNewLvl.Text.ToString() == "5(强化1)")
                {
                    mContent[4].oContent = 5;
                }
                else if (this.NudNewLvl.Text.ToString() == "6(强化2)")
                {
                    mContent[4].oContent = 6;
                }
                else if (this.NudNewLvl.Text.ToString() == "7(强化3)")
                {
                    mContent[4].oContent = 7;
                }
                else if (this.NudNewLvl.Text.ToString() == "8(强化4)")
                {
                    mContent[4].oContent = 8;
                }

                mContent[5].eName    = CEnum.TagName.SD_CustomLvMax;
                mContent[5].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[5].oContent = int.Parse(this.numericUpDown1.Text.ToString());

                mContent[6].eName    = CEnum.TagName.SD_ItemID;
                mContent[6].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[6].oContent = int.Parse(BodyName);

                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_UpdateUnitsExp_Query, mContent);
                }

                this.GrpSearch.Enabled = true;
                this.tbcResult.Enabled = true;
                this.Cursor            = Cursors.Default;//改变鼠标状态

                //CEnum.Message_Body[,] mResult = (CEnum.Message_Body[,])e.Result;
                if (mResult[0, 0].oContent.ToString() == "")
                {
                    MessageBox.Show("该机体不能修改等级!");
                    //return;
                }
                else
                {
                    Operation_GD.showResult(mResult);
                }

                //this.tbcResult.SelectedIndex = 1;
                this.btnSearch_Click(null, null);
                //this.txtCharLvl.Text = "";
                this.NudNewLvl.SelectedIndex = 0;
                //this.backgroundWorkerModiBodyLevel.RunWorkerAsync(mContent);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }