private void button1_Click_1(object sender, EventArgs e) { CmbServer.Enabled = true; TxtAccount.Enabled = true; checkBox1.Enabled = true; TxtAccount.Clear(); }
private void backgroundWorkerAdd_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.BtnClose.Enabled = true; this.Cursor = Cursors.Default; CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result; if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MSDO", "SG_Code_MsgUpfail")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "SG_Code_MsgUpsucces")); } //LblMoney.Text = "当前G币金额:" + Convert.ToString(int.Parse(TxtMoeny.Text.Trim()) + iTotal); LblMoney.Text = config.ReadConfigValue("MSDO", "SG_Code_lbltxtg"); BtnSearch.Enabled = true; BtnClose.Enabled = false; TxtAccount.Enabled = true; TxtAccount.Clear(); TxtMoeny.Clear(); }
private void backgroundWorkerUnFreeze_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.BtnSave.Enabled = true; this.Cursor = Cursors.Default; CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result; if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopFailure")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopSucces")); } //PnlInput.Visible = false; TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); }
private void BtnClose_Click(object sender, EventArgs e) { TxtAccount.Clear(); TxtMail.Clear(); BtnGetMail.Enabled = true; BtnSearch.Enabled = false; TxtAccount.Enabled = true; }
private void button1_Click(object sender, EventArgs e) { BtnClose.Enabled = false; TxtAccount.Clear(); TxtAccount.Enabled = true; BtnSearch.Enabled = true; TxtMoeny.Clear(); LblMoney.Text = config.ReadConfigValue("MSDO", "SG_Code_lbltxtg"); }
private void BtnClose_Click(object sender, EventArgs e) { try { int.Parse(TxtMoeny.Text.Trim()); } catch { MessageBox.Show(config.ReadConfigValue("MSDO", "SG_Code_MsgSupplyg")); return; } CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.SDO_Account; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.SDO_GCash; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(TxtMoeny.Text.Trim()); mContent[2].eName = CEnum.TagName.SDO_ServerIP; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[3].eName = CEnum.TagName.UserByID; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); CEnum.Message_Body[,] mResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_USERGCASH_UPDATE, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MSDO", "SG_Code_MsgUpfail")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "SG_Code_MsgUpsucces")); } //LblMoney.Text = "当前G币金额:" + Convert.ToString(int.Parse(TxtMoeny.Text.Trim()) + iTotal); LblMoney.Text = config.ReadConfigValue("MSDO", "SG_Code_lbltxtg"); BtnSearch.Enabled = true; BtnClose.Enabled = false; TxtAccount.Enabled = true; TxtAccount.Clear(); TxtMoeny.Clear(); }
private void BtnSearch_Click(object sender, EventArgs e) { if (TxtAccount.Text.Trim().Length > 0) { //发送获取密码请求 CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; //mContent[0].eName = CEnum.TagName.SDO_ServerIP; //mContent[0].eTag = CEnum.TagFormat.TLV_STRING; //mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[0].eName = CEnum.TagName.SDO_Account; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.SDO_Email; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtMail.Text; mContent[2].eName = CEnum.TagName.PassWord; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtPwd.Text; mContent[3].eName = CEnum.TagName.UserByID; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); CEnum.Message_Body[,] mResult = Operation_SDO.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_PASSWORD_RECOVERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.ToString() == "FAILURE") { MessageBox.Show(config.ReadConfigValue("MSDO", "Pd_Code_Sendpwdfail")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "Pd_Code_Sendpwdsucces")); } TxtAccount.Enabled = true; BtnSearch.Enabled = false; BtnGetMail.Enabled = true; TxtAccount.Clear(); TxtMail.Clear(); TxtPwd.Text = "123456"; } else { MessageBox.Show(config.ReadConfigValue("MSDO", "Pd_Code_NeedAccont")); } }
private void button1_Click(object sender, EventArgs e) { TxtAccount.Enabled = true; TxtAccount.Clear(); buttonSaveAS.Enabled = false; LblDetail.Text = ""; foreach (Control m in PnlDetail.Controls.Find("LabelTextBox", true)) { m.Dispose(); } }
private void button1_Click(object sender, EventArgs e) { TxtAccount.Enabled = true; TxtAccount.Clear(); buttonSaveAS.Enabled = false; GrdResult.DataSource = null; //LblDetail.Text = ""; //foreach (Control m in PnlDetail.Controls.Find("LabelTextBox", true)) //{ // m.Dispose(); //} }
private void btnUnStpAct_Click(object sender, EventArgs e) { if (TxtAccount.Text == null || TxtAccount.Text == "") { MessageBox.Show(config.ReadConfigValue("MBAF", "SA_Code_InputAccount")); TxtAccount.Focus(); } if (MessageBox.Show(config.ReadConfigValue("MBAF", "SA_Code_Confirmation") + btnUnStpAct.Text + TxtAccount.Text + "?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { if (btnUnStpAct.Text == config.ReadConfigValue("MBAF", "SA_Code_UnFreeze")) { ToUnStopAccount(); } else { ToStopAccount(); } //(btnUnStpAct.Text == "解封帐号") ? : ToStopAccount(); } }
private void backgroundWorkerPost_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { BtnPost.Enabled = true; TbcResult.Enabled = true; Cursor = Cursors.Default; CEnum.Message_Body[,] mGetResult = (CEnum.Message_Body[, ])e.Result; //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_Audition.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); TbcResult.SelectedTab = TpgList; }
private void backgroundWorkerFreeze_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.BtnPost.Enabled = true; this.Cursor = Cursors.Default; if (e.Result.ToString() != "Error") { CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result; if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) //if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopFailure")); return; } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopSucces")); TxtAccount.Text = ""; TxtContent.Text = ""; } } else { return; } this.Btn_Search_Click(null, null); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); }
private void BtnPost_Click(object sender, EventArgs e) { if (TxtAccount.Text.Trim().Length > 0 && txtBandays.Text.Trim().Length > 0 && TxtContent.Text.Trim().Length > 0) { if (MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgServer").Replace("{Server}", CmbServer.Text).Replace("{Account}", TxtAccount.Text), config.ReadConfigValue("MSDO", "BA_Code_MsgBan"), MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.SDO_Account; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.SDO_REASON; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text.Trim(); mContent[4].eName = CEnum.TagName.SDO_BanDate; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = ReturnBanDays(txtBandays.Text.Trim()); mResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_MEMBERSTOPSTATUS_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.SDO_StopStatus && mResult[0, 0].oContent.ToString() == "0") { mResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_ACCOUNT_CLOSE, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) //if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopFailure")); return; } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopSucces")); TxtAccount.Text = ""; TxtContent.Text = ""; //txtBandays.Text = ""; } } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgUnoperation")); } mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_SDO.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_MEMBERBANISHMENT_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_SDO.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsginputAccont")); } }
private void BtnSave_Click(object sender, EventArgs e) { strUserNick = TxtNick.Text.Trim(); if (strUserNick != null && strUserNick != "") { if (MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgAccont"), config.ReadConfigValue("MSDO", "BA_Code_MsgUnlock"), MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.SDO_Account; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = strUserNick; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); CEnum.Message_Body[,] mResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_ACCOUNT_OPEN, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopFailure")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopSucces1")); } PnlInput.Visible = false; mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_SDO.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_SDO.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SDO_MEMBERBANISHMENT_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_SDO.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show(config.ReadConfigValue("MSDO", "BA_Code_MsgopSucces")); } }
private void BtnSave_Click_1(object sender, EventArgs e) { strUserNick = TxtNick.Text.Trim(); if (strUserNick != null && strUserNick != "") { if (MessageBox.Show("解封帐号", "确认将该用户解封吗?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Kart.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.SDO_Account; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = strUserNick; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); CEnum.Message_Body[,] mResult = Operation_Kart.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_ACCOUNT_OPEN, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show("操作失败!"); } else { MessageBox.Show("操作成功,该帐号已经成功被解封!"); } PnlInput.Visible = false; mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Kart.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Kart.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_Kart.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_MEMBERBANISHMENT_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_Kart.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show("请输入帐号名称!"); } }
private void BtnSave_Click(object sender, EventArgs e) { strUserNick = TxtNick.Text.Trim(); if (strUserNick != null) { if (MessageBox.Show("解封帐号", "确认将该用户解封吗?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.AU_ACCOUNT; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = strUserNick; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.AU_Reason; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text; mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.AU_UserNick; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = mResult[0, 2].oContent.ToString(); mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.AU_Reason; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text; mContent[4].eName = CEnum.TagName.AU_ACCOUNT; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = strUserNick; mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_BANISHMENT_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.AU_STOPSTATUS && mResult[0, 0].oContent.ToString() == "1") { mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_OPEN, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show("操作失败!"); } else { GrdList.DataSource = null; MessageBox.Show("操作成功,该帐号已经成功被解封!"); } } else { MessageBox.Show("该玩家没有处于停封状态,解封失败!"); } PnlInput.Visible = false; mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Audition.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNTREMOTE_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_Audition.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show("请输入解封原因!"); } }
private void BtnPost_Click(object sender, EventArgs e) { if (TxtContent.Text == "" || TxtContent.Text == null) { MessageBox.Show("请输入封停原因"); return; } if (TxtAccount.Text.Trim().Length > 0) { if (MessageBox.Show("停封帐号", "确认将该用户停封吗?", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.AU_ACCOUNT; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.AU_Reason; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text; mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.AU_UserNick; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = mResult[0, 2].oContent.ToString(); mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.AU_Reason; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text; mContent[4].eName = CEnum.TagName.AU_ACCOUNT; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = TxtAccount.Text; //有问题 mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_BANISHMENT_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.AU_STOPSTATUS && mResult[0, 0].oContent.ToString() == "0") { mResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNT_CLOSE, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show("封停帐号失败,请稍候尝试!"); } else { MessageBox.Show("操作成功,该帐号已经成功被停封!"); } TxtAccount.Text = ""; TxtContent.Text = ""; } else { MessageBox.Show("该帐号已经被停封,不能再次处理!"); } mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Audition.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_Audition.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AU_ACCOUNTREMOTE_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_Audition.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show("请输入帐号!"); } }
private void BtnPost_Click_1(object sender, EventArgs e) { if (TxtAccount.Text.Trim().Length > 0) { if (MessageBox.Show("确认将服务器" + CmbServer.Text + "中的帐号" + TxtAccount.Text + "停封吗?", "停封帐号", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Kart.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.SDO_Account; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text; mContent[2].eName = CEnum.TagName.UserByID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[3].eName = CEnum.TagName.SDO_REASON; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtContent.Text; mResult = Operation_Kart.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_MEMBERSTOPSTATUS_QUERY, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.SDO_StopStatus && mResult[0, 0].oContent.ToString() == "0") { mResult = Operation_Kart.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_ACCOUNT_CLOSE, mContent); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("操作失败!"); MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.Equals("FAILURE")) //if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show("操作失败!"); return; } else { MessageBox.Show("操作成功,该帐号已经成功被停封!"); TxtAccount.Text = ""; TxtContent.Text = ""; } } else { MessageBox.Show("该帐号已经被停封,不能再次处理!"); } mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Kart.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Kart.iPageSize; CEnum.Message_Body[,] mGetResult = Operation_Kart.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SDO_MEMBERBANISHMENT_QUERY, mContent); //无内容显示 if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mGetResult[0, 0].oContent.ToString()); return; } Operation_Kart.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); TxtAccount.Clear(); TxtContent.Clear(); TxtMemo.Clear(); } } else { MessageBox.Show("请输入帐号!"); } }
private void ToUnStopAccount() { /* * 获取ip */ if (_ServerIP == null || _ServerIP == "") { for (int i = 0; i < this.serverIPResult.GetLength(0); i++) { if (serverIPResult[i, 1].oContent.ToString().Trim().Equals(this.cbxServerIP.Text.Trim())) { this._ServerIP = serverIPResult[i, 0].oContent.ToString(); } } } /* * 拉数据 * */ try { C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[3]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[0].eName = C_Global.CEnum.TagName.O2JAM2_ServerIP; messageBody[0].oContent = _ServerIP; messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[1].eName = C_Global.CEnum.TagName.O2JAM2_UserID; messageBody[1].oContent = TxtAccount.Text.Trim(); messageBody[2].eName = CEnum.TagName.UserByID; messageBody[2].eTag = CEnum.TagFormat.TLV_INTEGER; messageBody[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); lock (typeof(C_Event.CSocketEvent)) { openActionResult = m_ClientEvent.GetSocket(m_ClientEvent, _ServerIP).RequestResult(C_Global.CEnum.ServiceKey.O2JAM2_ACCOUNT_OPEN, C_Global.CEnum.Msg_Category.O2JAM2_ADMIN, messageBody); } if (openActionResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(openActionResult[0, 0].oContent.ToString()); return; } if (openActionResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MBAF", "SA_Code_Failed")); return; } else if (openActionResult[0, 0].oContent.Equals("SUCESS")) { MessageBox.Show(config.ReadConfigValue("MBAF", "SA_Code_Success")); dpActaion.Visible = false; cbxToPageIndex.Visible = false; dpStopActView.Visible = false; TxtAccount.Clear(); TxtContent.Clear(); ReadStopAccountFromDB(); return; } } catch (Exception ex) { MessageBox.Show(config.ReadConfigValue("MBAF", "SA_Code_ClientErrorMessage") + "\n-------------------------------------\n" + ex.Message); } finally { openActionResult = null; } }
private void BtnSearch_Click(object sender, EventArgs e) { if (TxtAccount.Text.Trim().Length > 0) { //发送获取密码请求 CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_NyUserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text.Trim()); mContent[2].eName = CEnum.TagName.SDO_Email; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtMail.Text; mContent[3].eName = CEnum.TagName.UserByID; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[4].eName = CEnum.TagName.RayCity_CharacterID; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = int.Parse(CharinfoID[0, 2].oContent.ToString()); CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_WareHousePwd_Update, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].eName == CEnum.TagName.Status && mResult[0, 0].oContent.ToString() == "FAILURE") { MessageBox.Show("密碼發送失敗!"); TxtAccount.Clear(); TxtMail.Clear(); return; } else { MessageBox.Show("密碼發送完成!"); } TxtAccount.Enabled = true; BtnSearch.Enabled = false; BtnGetMail.Enabled = true; TxtAccount.Clear(); TxtMail.Clear(); mContent = null; } else { MessageBox.Show("請輸入要發送口令的帳號!"); } }