private void backgroundWorkInsertItem_DoWork(object sender, DoWorkEventArgs e) { lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_Soccer.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SOCCER_ITEMSHOP_INSERT, (CEnum.Message_Body[])e.Argument); } }
private void backgroundWorkCharinfo_DoWork(object sender, DoWorkEventArgs e) { lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_Soccer.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SOCCER_CHARACTERINFO_QUERY, (CEnum.Message_Body[])e.Argument); } }
private void backgroundWorkPage_DoWork(object sender, DoWorkEventArgs e) { lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_Soccer.GetResult(tmp_ClientEvent, CEnum.ServiceKey.SOCCER_ACCOUNT_ITEMSKILL_QUERY, (CEnum.Message_Body[])e.Argument); } }
private void BtnSearch_Click(object sender, EventArgs e) { if (CmbServer.Text == "") { return; } if (TxtAccount.Text.Trim().Length > 0) { //BtnSearch.Enabled = false; //Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.Soccer_String; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.Soccer_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_Soccer.GetItemAddr(mServerInfo, CmbServer.Text); //this.backgroundWorkerSearch.RunWorkerAsync(mContent); CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_Soccer.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, Operation_Soccer.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.SOCCER_ACCOUNTACTIVE_QUERY, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } if (mResult[0, 0].oContent.ToString().Equals("SUCCESS")) { //LblStatus.Text = "玩家" + TxtAccount.Text.Trim() + "在服务器" + CmbServer.Text.Trim()+ "已经激活"; LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtsuccess").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim()); } else { //LblStatus.Text = "玩家" + TxtAccount.Text.Trim() + "在服务器" + CmbServer.Text.Trim() + "暂时还未激活"; LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtfailed").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim()); } } else { MessageBox.Show(config.ReadConfigValue("MSOCCER", "FCI_Code_InputAccount")); } }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[6]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[0].eName = C_Global.CEnum.TagName.Soccer_ServerIP; messageBody[0].oContent = _ServerIP; messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[1].eName = C_Global.CEnum.TagName.Soccer_String; messageBody[1].oContent = this.txtAccount.Text; messageBody[2].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[2].eName = C_Global.CEnum.TagName.Soccer_Type; messageBody[2].oContent = GetCRAction(); messageBody[3].eName = CEnum.TagName.Index; messageBody[3].eTag = CEnum.TagFormat.TLV_INTEGER; messageBody[3].oContent = (int.Parse(CmbPage.Text) - 1) * Operation_Soccer.iPageSize + 1; messageBody[4].eName = CEnum.TagName.PageSize; messageBody[4].eTag = CEnum.TagFormat.TLV_INTEGER; messageBody[4].oContent = Operation_Soccer.iPageSize; messageBody[5].eName = CEnum.TagName.Soccer_deleted_date; messageBody[5].eTag = CEnum.TagFormat.TLV_STRING; messageBody[5].oContent = "gmtools"; CEnum.Message_Body[,] mResult = null; mResult = Operation_Soccer.GetResult(this.m_ClientEvent, CEnum.ServiceKey.SOCCER_CHARACTERSTATE_QUERY, messageBody); if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } dgAccountInfo.DataSource = null; dgAccountInfo.DataSource = ReturnPageResult(mResult); } }