private void backgroundWorkerSerch_DoWork(object sender, DoWorkEventArgs e) { lock (typeof(C_Event.CSocketEvent)) { e.Result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_BasicAccount_Query, (CEnum.Message_Body[])e.Argument); } }
private void InitComboboxInfo() { try { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent2 = new CEnum.Message_Body[5]; mContent2[0].eName = CEnum.TagName.RayCity_ItemName; mContent2[0].eTag = CEnum.TagFormat.TLV_STRING; mContent2[0].oContent = textBox1.Text; mContent2[1].eName = CEnum.TagName.Index; mContent2[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[1].oContent = 1; mContent2[2].eName = CEnum.TagName.PageSize; mContent2[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[2].oContent = Operation_RCode.iPageSize; mContent2[3].eName = CEnum.TagName.RayCity_ItemID; mContent2[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[3].oContent = int.Parse(this.txtCode.Text); mContent2[4].eName = CEnum.TagName.RayCity_ServerIP; mContent2[4].eTag = CEnum.TagFormat.TLV_STRING; mContent2[4].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_ItemShop_Query, mContent2); } if (mResult.GetLength(1) == 3) { for (int i = 0; i < mResult.GetLength(0); i++) { itemEx item1 = new itemEx(mResult[i, 0].oContent.ToString(), mResult[i, 1].oContent.ToString()); Operation_RCode.BuildCombox(mResult, CmbPlayerItem, ssd); this.CmbPlayerItem.Items.Add(item1); } this.CmbPlayerItem.SelectedIndex = 0; } else { MessageBox.Show("没有道具列表"); } } catch (Exception ex) { } }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { try { if (bFirst) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.RayCity_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.RayCity_BeginDate; mContent[1].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[1].oContent = DptStart.Value; mContent[2].eName = CEnum.TagName.RayCity_EndDate; mContent[2].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[2].oContent = DptEnd.Value; mContent[3].eName = CEnum.TagName.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(CmbPage.Text); mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; mContent[5].eName = CEnum.TagName.RayCity_CharacterID; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = int.Parse(strCarIDX); CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_ItemConsume_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount); } } } catch { } }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { CEnum.Message_Body[] mContent2 = new CEnum.Message_Body[7]; mContent2[0].eName = CEnum.TagName.RayCity_ServerIP; mContent2[0].eTag = CEnum.TagFormat.TLV_STRING; mContent2[0].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent2[1].eName = CEnum.TagName.RayCity_CharacterID; mContent2[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[1].oContent = Convert.ToInt32(this.TxtCharinfo.Text); mContent2[2].eName = CEnum.TagName.RayCity_BeginDate; mContent2[2].eTag = CEnum.TagFormat.TLV_DATE; mContent2[2].oContent = DtpBegin.Value; mContent2[3].eName = CEnum.TagName.RayCity_EndDate; mContent2[3].eTag = CEnum.TagFormat.TLV_DATE; mContent2[3].oContent = DtpEnd.Value; mContent2[4].eName = CEnum.TagName.Index; mContent2[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[4].oContent = int.Parse(CmbPage.Text); mContent2[5].eName = CEnum.TagName.PageSize; mContent2[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[5].oContent = Operation_RCode.iPageSize; itemEx item = (itemEx)this.CmbState.SelectedItem; mContent2[6].eName = CEnum.TagName.RayCity_TradeSessionState; mContent2[6].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[6].oContent = int.Parse(item.Tag); CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_TradeInfo_Query, mContent2); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, TradeInfoView, out iPageCount); } } }
private void TradeInfoView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex >= 0 && RoleInfoView.DataSource != null) { using (DataTable dt = (DataTable)TradeInfoView.DataSource) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.RayCity_CharacterID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = Convert.ToInt32(this.TxtCharinfo.Text); mContent[2].eName = CEnum.TagName.RayCity_TradeSessionIDX; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(dt.Rows[e.RowIndex][0].ToString()); mContent[3].eName = CEnum.TagName.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_TradeDetail_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { BrowseMusicName browseMusicName = new BrowseMusicName(result, iPageCount, MousePosition.X, MousePosition.Y); browseMusicName.CreateModule(null, m_ClientEvent); } } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { try { if (bFirst) { this.CmbPage.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; CEnum.Message_Body[,] mResult = null; 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); mContent[2].eName = CEnum.TagName.RayCity_NyNickName; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtNick.Text; mContent[3].eName = CEnum.TagName.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(this.comboBox2.Text.ToString()); mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_BasicAccount_Query, mContent); } CmbPage.Enabled = true; if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount); } } } catch { } }
private void BtnActive_Click(object sender, EventArgs e) { if (textBox1.Text.Length > 0) { BtnActive.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.RayCity_NyUserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = textBox1.Text; mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.RayCity_AccountState; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = ReturnNum(comboBox1.Text); CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_GMUser_Update, mContent); BtnActive.Enabled = true; if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else if (result[0, 0].eName == CEnum.TagName.Status && result[0, 0].oContent.ToString() == "SUCCESS") { MessageBox.Show("操作成功"); //BtnSearch_Click(null, null); } else { MessageBox.Show("操作失败或者帐号不存在"); } } else { MessageBox.Show("请输入帐号"); return; } }
private void backgroundWorkerSerch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.BtnSearch.Enabled = true; 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; } else { strCharIDX = mResult[0, 2].oContent.ToString(); strCarIDX = mResult[0, 3].oContent.ToString(); CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(strCharIDX); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text); 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[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_PlayerSkill_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, RoleInfoView, out iPageCount); } } //Operation_RCode.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount); }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[7]; mContent[0].eName = CEnum.TagName.RayCity_AccountID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(strCharIDX); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(CmbPage.Text);; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; mContent[5].eName = CEnum.TagName.RayCity_BeginDate; mContent[5].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[5].oContent = DtpBegin.Value; mContent[6].eName = CEnum.TagName.RayCity_EndDate; mContent[6].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[6].oContent = DtpEnd.Value; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_UserCharge_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, RoleInfoView, out iPageCount); } } }
private void RoleInfoView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && RoleInfoView.DataSource != null) { using (DataTable dt = (DataTable)RoleInfoView.DataSource) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(dt.Rows[e.RowIndex][2].ToString()); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_ConnectionState_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, dataGridView1, out iPageCount); tabControl1.SelectedIndex = 1; } } } else { return; } }
public void InitializeMusicList() { try { C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[0].eName = C_Global.CEnum.TagName.RayCity_ServerIP; messageBody[0].oContent = _serverIP; messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.RayCity_CharacterID; messageBody[1].oContent = _musicID; musicResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_CashItemDetailLog_Query, messageBody); //CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; //mContent[0].eName = CEnum.TagName.FJ_Item_GuID; //mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[0].oContent = this._musicID; ////musicResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.FJ_ItemName_Query, C_Global.CEnum.Msg_Category.SDO_ADMIN, mContent); //musicResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.FJ_ItemName_Query, mContent); //检测状态 if (musicResult[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { musicName.Text = ""; return; } musicName.Text = musicResult[0, 0].oContent.ToString(); //Operation_RCode.BuildDataTable(this.m_ClientEvent, this._result, dataGridView1, out this.iPageCount); //musicName.Text ="记录明细"; } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { this.CmbPage.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(strCharIDX); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(CmbPage.Text); mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; lock (typeof(C_Event.CSocketEvent)) { mMailLog = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_UserMails_Query, mContent); } CmbPage.Enabled = true; if (mMailLog[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mMailLog[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, mMailLog, RoleInfoView, out iPageCount); } } }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { this.CmbPage.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = strcarid; mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(CmbPage.Text);; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_RaceLog_Query, mContent); this.CmbPage.Enabled = true; if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, dataGridView1, out iPageCount); } } }
private void backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer = Operation_RCode.BuildCombox(mServerInfo, CmbServer); tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text)); CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; mContent[0].eName = CEnum.TagName.RayCity_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text); CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_Skill_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { return; } else { this.CmbPlayerItem = Operation_RCode.BuildCombox(result, CmbPlayerItem, ssd); } }
private void InitTabIndex2Info() { try { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent2 = new CEnum.Message_Body[3]; mContent2[0].eName = CEnum.TagName.RayCity_ServerIP; mContent2[0].eTag = CEnum.TagFormat.TLV_STRING; mContent2[0].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent2[1].eName = CEnum.TagName.RayCity_CharacterID; mContent2[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[1].oContent = Convert.ToInt32(this.TxtCharinfo.Text); mContent2[2].eName = CEnum.TagName.RayCity_TradeSessionIDX; mContent2[2].eTag = CEnum.TagFormat.TLV_DATE; mContent2[2].oContent = DtpBegin.Value; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_TradeDetail_Query, mContent2); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void BtnGetMail_Click(object sender, EventArgs e) { try { if (TxtAccount.Text.Trim().Length > 0) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; mContent[0].eName = CEnum.TagName.SDO_Account; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = m_ClientEvent.RequestResult(CEnum.ServiceKey.SDO_EMAIL_QUERY, CEnum.Msg_Category.SDO_ADMIN, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); BtnGetMail.Enabled = true; return; } try { TxtMail.Text = mResult[0, 0].oContent.ToString(); } catch { TxtMail.Text = ""; } CEnum.Message_Body[] mContent1 = new CEnum.Message_Body[5]; mContent1[0].eName = CEnum.TagName.RayCity_NyUserID; mContent1[0].eTag = CEnum.TagFormat.TLV_STRING; mContent1[0].oContent = TxtAccount.Text; mContent1[1].eName = CEnum.TagName.RayCity_ServerIP; mContent1[1].eTag = CEnum.TagFormat.TLV_STRING; mContent1[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text); mContent1[2].eName = CEnum.TagName.RayCity_NyNickName; mContent1[2].eTag = CEnum.TagFormat.TLV_STRING; mContent1[2].oContent = ""; mContent1[3].eName = CEnum.TagName.Index; mContent1[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[3].oContent = 1; mContent1[4].eName = CEnum.TagName.PageSize; mContent1[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[4].oContent = 1; lock (typeof(C_Event.CSocketEvent)) { CharinfoID = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_BasicAccount_Query, mContent1); } if (CharinfoID[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show("該玩家帳號不存在"); BtnSearch.Enabled = false; return; } TxtAccount.Enabled = false; BtnGetMail.Enabled = false; BtnSearch.Enabled = true; } else { MessageBox.Show(config.ReadConfigValue("MRC", "FQP_Code_inputid")); } } catch { } }
private void BtnSearch_Click(object sender, EventArgs e) { try { if (CmbServer.Text == "") { return; } if (TxtAccount.Text == "") { MessageBox.Show("請輸入帳號首碼"); return; } if (textBox2.Text == "") { MessageBox.Show("請輸入要設定的密碼"); return; } if (textBox2.Text == "") { MessageBox.Show("請輸入要設定的密碼"); return; } if (textBox3.Text == "") { MessageBox.Show("請輸入開始序號"); return; } if (textBox3.Text == "0") { MessageBox.Show("開始序號不能為0"); return; } if (textBox4.Text == "") { MessageBox.Show("請輸入結束序號"); return; } if (int.Parse(textBox3.Text) > int.Parse(textBox3.Text)) { MessageBox.Show("結束序號應該大於開始序號"); return; } BtnSearch.Enabled = false; //this.RoleInfoView.DataSource = null; CEnum.Message_Body[] mContent1 = new CEnum.Message_Body[4]; mContent1[0].eName = CEnum.TagName.RayCity_NyUserID; mContent1[0].eTag = CEnum.TagFormat.TLV_STRING; mContent1[0].oContent = TxtAccount.Text.Trim() + "%%%%%"; mContent1[1].eName = CEnum.TagName.RayCity_ServerIP; mContent1[1].eTag = CEnum.TagFormat.TLV_STRING; mContent1[1].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent1[2].eName = CEnum.TagName.Index; mContent1[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[2].oContent = 1; mContent1[3].eName = CEnum.TagName.PageSize; mContent1[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[3].oContent = Operation_RCode.iPageSize; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_BasicAccount_Query, mContent1); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; 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); mContent[2].eName = CEnum.TagName.RayCity_NyPassword; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = textBox2.Text; mContent[3].eName = CEnum.TagName.RayCity_StartNum; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(textBox3.Text); mContent[4].eName = CEnum.TagName.RayCity_EndNum; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = int.Parse(textBox4.Text); mContent[5].eName = CEnum.TagName.UserByID; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); backgroundWorkerSearch.RunWorkerAsync(mContent); } else { MessageBox.Show("此首碼已有玩家使用過"); BtnSearch.Enabled = true; return; } } catch { MessageBox.Show("序號格式錯誤"); return; } }
private void btnAdd_Click(object sender, EventArgs e) { if (txtId.Text == "") { MessageBox.Show("à︹IDぃ"); return; } try { int.Parse(txtMoney.Text); } catch { MessageBox.Show("睰窥 Αぃタ絋"); return; } if (txtTitle.Text == "") { MessageBox.Show("夹肈ぃ"); return; } if (txtMessage.Text == "") { MessageBox.Show("秘癳戈癟ぃ"); return; } CEnum.Message_Body[] mContent = new CEnum.Message_Body[7]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(txtId.Text); mContent[1].eName = CEnum.TagName.RayCity_CharacterMoney; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(txtMoney.Text); mContent[2].eName = CEnum.TagName.RayCity_ServerIP; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = Operation_RCode.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()); mContent[4].eName = CEnum.TagName.RayCity_Title; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = txtTitle.Text; mContent[5].eName = CEnum.TagName.RayCity_Message; mContent[5].eTag = CEnum.TagFormat.TLV_STRING; mContent[5].oContent = txtMessage.Text; mContent[6].eName = CEnum.TagName.RayCity_NyUserID; mContent[6].eTag = CEnum.TagFormat.TLV_STRING; mContent[6].oContent = TxtAccount.Text; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_AddMoney, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else if (result[0, 0].eName == CEnum.TagName.Status && result[0, 0].oContent.ToString() == "SUCCESS") { MessageBox.Show("祇癳窥 Θ"); txtMoney.Text = ""; txtTitle.Text = ""; txtMessage.Text = ""; } else { MessageBox.Show("祇癳窥 ア毖"); } }
private void RoleInfoView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex != -1) { DataTable mTable = (DataTable)RoleInfoView.DataSource; userAccount = mTable.Rows[currDgSelectRow]["眀腹ID"].ToString(); DataTable dt2 = (DataTable)RoleInfoView.DataSource; if (MessageBox.Show("絋﹚竚產à︹盾?", "竚產à︹", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent2 = new CEnum.Message_Body[4]; mContent2[0].eName = CEnum.TagName.RayCity_ServerIP; mContent2[0].eTag = CEnum.TagFormat.TLV_STRING; mContent2[0].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent2[1].eName = CEnum.TagName.RayCity_CharacterID; mContent2[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[1].oContent = int.Parse(userAccount); mContent2[2].eName = CEnum.TagName.UserByID; mContent2[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent2[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent2[3].eName = CEnum.TagName.RayCity_NyUserID; mContent2[3].eTag = CEnum.TagFormat.TLV_STRING; mContent2[3].oContent = TxtAccount.Text; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_SetPos_Update, mContent2); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show("巨ア毖"); return; } else if (mResult[0, 0].oContent.ToString() == "SUCCESS") { MessageBox.Show("巨Θ"); return; } else { MessageBox.Show("巨ア毖"); return; } } } if (e.RowIndex >= 0 && RoleInfoView.DataSource != null) { tabControl1.SelectedIndex = 1; } else { return; } } catch (Exception ex) { } }
private void PartInfo() { #region 查询 dgTable.Clear(); for (int i = 0; i <= mServerInfo.GetLength(0); i++) { try { 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 = ""; mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = mServerInfo[i, 0].oContent.ToString(); mContent[2].eName = CEnum.TagName.RayCity_AccountState; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = 255; mContent[3].eName = CEnum.TagName.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = 100; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_GMUser_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //RoleInfoView.DataSource = dgTable; //MessageBox.Show(mResult[0, 0].oContent.ToString()); //return; } else { for (int k = 0; k < mResult.GetLength(0); k++) { DataRow dgRow = dgTable.NewRow(); dgRow["跋"] = mServerInfo[i, 1].oContent.ToString(); dgRow["IndexID"] = mResult[k, 0].oContent.ToString(); dgRow["眀腹"] = mResult[k, 1].oContent.ToString(); dgTable.Rows.Add(dgRow); } this.BtnSearch.Enabled = true; } } catch { } } RoleInfoView.DataSource = dgTable; #endregion }
/// <summary> /// 鼠豢暮翹 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRecord_Click(object sender, EventArgs e) { if (this.TxtCode.CheckedItems.Count <= 0) { MessageBox.Show("請選擇要查詢的大區?"); return; } GrdList.DataSource = null; DataTable dtResult = null; bool newTable = true; for (int i = 0; i < TxtCode.CheckedItems.Count; i++) { string serverIp = Operation_RCode.GetItemAddr(mChannelInfo, TxtCode.CheckedItems[i].ToString()); CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; mContent[0].eName = CEnum.TagName.RayCity_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = serverIp; CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_BoardList_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show(mResult[0, 0].oContent.ToString()); break; } CEnum.Message_Body[,] mResult2 = new CEnum.Message_Body[mResult.GetLength(0), mResult.GetLength(1) + 1]; for (int k = 0; k < mResult2.GetLength(0); k++) { for (int j = 0; j < mResult2.GetLength(1); j++) { if (j == mResult2.GetLength(1) - 1) { mResult2[k, j].eName = CEnum.TagName.RayCity_ServerIP; mResult2[k, j].eTag = CEnum.TagFormat.TLV_STRING; mResult2[k, j].oContent = serverIp; } else { mResult2[k, j].eName = mResult[k, j].eName; mResult2[k, j].eTag = mResult[k, j].eTag; mResult2[k, j].oContent = mResult[k, j].oContent; } } } DataTable table = Operation_RCode.GetDataTable(this.m_ClientEvent, mResult2, out iPageCount); if (newTable) { dtResult = table; newTable = false; } else { dtResult.Merge(table); } } if (dtResult == null) { MessageBox.Show("公告记录不存在!"); } else { GrdList.DataSource = dtResult; } }
private void BtnSend_Click(object sender, EventArgs e) { try { if (this.TxtContentInfo.Text == "" || this.TxtContentInfo.Text == null) { MessageBox.Show(config.ReadConfigValue("MRC", "FRC_UI_ContentInfo")); return; } if (this.TxtReason.Text == "" || this.TxtReason.Text == null) { MessageBox.Show(config.ReadConfigValue("MRC", "FRC_UI_Reason")); return; } if (this.TxtCharinfo.Text == "" || this.TxtCharinfo.Text == null) { MessageBox.Show(config.ReadConfigValue("MRC", "FRC_UI_NoUserAccount")); return; } CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[7]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(TxtCharinfo.Text.Trim()); mContent[1].eName = CEnum.TagName.RayCity_ItemID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(ssd[CmbPlayerItem.Text.ToString()]); mContent[2].eName = CEnum.TagName.RayCity_Message; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtContentInfo.Text.ToString(); mContent[3].eName = CEnum.TagName.RayCity_GuildMessage; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtReason.Text.ToString(); mContent[4].eName = CEnum.TagName.RayCity_ServerIP; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent[5].eName = CEnum.TagName.UserByID; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[6].eName = CEnum.TagName.RayCity_NyUserID; mContent[6].eTag = CEnum.TagFormat.TLV_STRING; mContent[6].oContent = TxtAccount.Text; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_ItemShop_Insert, mContent); } if (mResult[0, 0].oContent.ToString() == "SUCCESS") { MessageBox.Show("祇癳笵ㄣΘ"); } else { MessageBox.Show("祇癳笵ㄣア毖"); } } catch (System.Exception ex) { } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { CmbPage.Items.Clear(); this.tabControl1.SelectedIndex = 1; if (e.RowIndex >= 0 && dataGridView1.DataSource != null) { using (DataTable dt = (DataTable)dataGridView1.DataSource) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.RayCity_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.RayCity_BeginDate; mContent[1].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[1].oContent = DptStart.Value; mContent[2].eName = CEnum.TagName.RayCity_EndDate; mContent[2].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[2].oContent = DptEnd.Value; mContent[3].eName = CEnum.TagName.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; mContent[5].eName = CEnum.TagName.RayCity_CharacterID; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = int.Parse(dt.Rows[e.RowIndex][2].ToString()); strCarIDX = dt.Rows[e.RowIndex][2].ToString(); CEnum.Message_Body[,] mMailLog = null; lock (typeof(C_Event.CSocketEvent)) { mMailLog = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_ItemConsume_Query, mContent); } if (mMailLog[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mMailLog[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, mMailLog, RoleInfoView, out iPageCount); } if (iPageCount <= 1) { PnlPage.Visible = false; label3.Visible = false; comboBox2.Visible = false; } else { for (int i = 0; i < iPageCount; i++) { CmbPage.Items.Add(i + 1); } CmbPage.SelectedIndex = 0; bFirst = true; PnlPage.Visible = true; label3.Visible = true; comboBox2.Visible = true; } tabControl1.SelectedIndex = 1; } } else { return; } }
private void BtnSend_Click(object sender, EventArgs e) { try { if (CmbPlayerItem.Items.Count > 0 && TxtCharinfo.Text.Length > 0) { if (MessageBox.Show("½T¹ê²K¥[§R°£¸Ó¶µ§Þ¯à¶Ü¡H", "½T¹ê²K¥[", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(TxtCharinfo.Text.Trim()); mContent[1].eName = CEnum.TagName.RayCity_SkillID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(ssd[CmbPlayerItem.Text.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.RayCity_ServerIP; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent[4].eName = CEnum.TagName.RayCity_NyUserID; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = TxtAccount.Text; mContent[5].eName = CEnum.TagName.RayCity_SkillLevel; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = int.Parse(numericUpDown1.Value.ToString()); lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_PlayerSkill_Insert, 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() == "SUCCESS") { MessageBox.Show("²K¥[¦¨¥\"); } else { MessageBox.Show("²K¥[¥¢±Ñ"); } } else { return; } } } catch (System.Exception ex) { } }
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("請輸入要發送口令的帳號!"); } }
private void ItmDelete_Click(object sender, EventArgs e) { //btnAdd.Enabled = false; //btnAdd.Visible = false; //BtnEdit.Enabled = true; //BtnEdit.Visible = true; //label11.Visible = true; //cmbStauas.Visible = true; DataTable mBoard = (DataTable)GrdList.DataSource; iBoardID = int.Parse(mBoard.Rows[iIndexID][0].ToString()); delIp = mBoard.Rows[iIndexID][mBoard.Columns.Count - 1].ToString(); if (MessageBox.Show("確認修改公告?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; //mContent[0].eName = CEnum.TagName.AU_Status; //mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[0].oContent = ReturnStauas(cmbStauas.Text.Trim()); //mContent[1].eName = CEnum.TagName.AU_BoardMessage; //mContent[1].eTag = CEnum.TagFormat.TLV_STRING; //mContent[1].oContent = TxtConnet.Text.Trim(); mContent[0].eName = CEnum.TagName.UserByID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = delIp; //mContent[4].eName = CEnum.TagName.AU_BeginTime; //mContent[4].eTag = CEnum.TagFormat.TLV_TIMESTAMP; //mContent[4].oContent = DptStart.Value; //mContent[5].eName = CEnum.TagName.AU_EndTime; //mContent[5].eTag = CEnum.TagFormat.TLV_TIMESTAMP; //mContent[5].oContent = DptEnd.Value; //mContent[6].eName = CEnum.TagName.AU_Interval; //mContent[6].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[6].oContent = Convert.ToInt32(NumMinnute.Value); mContent[2].eName = CEnum.TagName.RayCity_NoticeID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = iBoardID; CEnum.Message_Body[,] mResult1 = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_BoardList_Delete, mContent); if (mResult1[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult1[0, 0].oContent.ToString()); return; } if (mResult1[0, 0].eName == CEnum.TagName.Status && mResult1[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show("修改失敗"); return; } else { MessageBox.Show("修改成功"); //cmbStauas.Visible = false; //label11.Visible = false; //BtnEdit.Visible = false; //btnAdd.Visible = true; Setdefault(); btnAdd.Enabled = true; btnAdd.Visible = true; lblserver.Visible = false; //////cmbStauas.Visible = false; DptStart.Enabled = true; DptEnd.Enabled = true; TxtConnet.Enabled = true; NumMinnute.Enabled = true; } } //if (mBoard.Rows[iIndexID][4].ToString() == config.ReadConfigValue("MSDO", "FN_Code_infostate")) //{ // MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_noticefail")); // return; //} //if (mBoard.Rows[iIndexID][4].ToString() == config.ReadConfigValue("MSDO", "FN_Code_infostate1")) //{ // iBoardID = int.Parse(mBoard.Rows[iIndexID][0].ToString()); // DptStart.Text = mBoard.Rows[iIndexID][1].ToString(); // DptEnd.Text = mBoard.Rows[iIndexID][2].ToString(); // cmbStauas.Text = mBoard.Rows[iIndexID][4].ToString(); // TxtConnet.Text = mBoard.Rows[iIndexID][5].ToString(); // delIp = mBoard.Rows[iIndexID][mBoard.Columns.Count - 1].ToString(); //} //else if (mBoard.Rows[iIndexID][4].ToString() == config.ReadConfigValue("MSDO", "FN_Code_infostate2")) //{ // iBoardID = int.Parse(mBoard.Rows[iIndexID][0].ToString()); // DptStart.Text = mBoard.Rows[iIndexID][1].ToString(); // DptStart.Enabled = false; // DptEnd.Text = mBoard.Rows[iIndexID][2].ToString(); // DptEnd.Enabled = false; // cmbStauas.Text = mBoard.Rows[iIndexID][4].ToString(); // TxtConnet.Text = mBoard.Rows[iIndexID][5].ToString(); // TxtConnet.Enabled = false; // NumMinnute.Value = Convert.ToDecimal(mBoard.Rows[iIndexID][3].ToString()); // NumMinnute.Enabled = false; // delIp = mBoard.Rows[iIndexID][mBoard.Columns.Count - 1].ToString(); //} }
private void BtnEdit_Click(object sender, EventArgs e) { if (MessageBox.Show("確認修改公告?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; //mContent[0].eName = CEnum.TagName.AU_Status; //mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[0].oContent = ReturnStauas(cmbStauas.Text.Trim()); //mContent[1].eName = CEnum.TagName.AU_BoardMessage; //mContent[1].eTag = CEnum.TagFormat.TLV_STRING; //mContent[1].oContent = TxtConnet.Text.Trim(); mContent[0].eName = CEnum.TagName.UserByID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = delIp; //mContent[4].eName = CEnum.TagName.AU_BeginTime; //mContent[4].eTag = CEnum.TagFormat.TLV_TIMESTAMP; //mContent[4].oContent = DptStart.Value; //mContent[5].eName = CEnum.TagName.AU_EndTime; //mContent[5].eTag = CEnum.TagFormat.TLV_TIMESTAMP; //mContent[5].oContent = DptEnd.Value; //mContent[6].eName = CEnum.TagName.AU_Interval; //mContent[6].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[6].oContent = Convert.ToInt32(NumMinnute.Value); mContent[2].eName = CEnum.TagName.RayCity_NoticeID; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = iBoardID; CEnum.Message_Body[,] mResult1 = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_BoardList_Delete, mContent); if (mResult1[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult1[0, 0].oContent.ToString()); return; } if (mResult1[0, 0].eName == CEnum.TagName.Status && mResult1[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show("修改失敗"); return; } else { MessageBox.Show("修改成功"); cmbStauas.Visible = false; label11.Visible = false; BtnEdit.Visible = false; btnAdd.Visible = true; Setdefault(); btnAdd.Enabled = true; btnAdd.Visible = true; lblserver.Visible = false; ////cmbStauas.Visible = false; DptStart.Enabled = true; DptEnd.Enabled = true; TxtConnet.Enabled = true; NumMinnute.Enabled = true; } } }
/// <summary> /// 氝樓鼠豢陓洘囀 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOk_Click(object sender, EventArgs e) { //if (CheckSin.Checked == false && CheckSendAll.Checked == false && CheckAll.Checked == false) //{ // MessageBox.Show("恁寁紱釬濬倰"); // return; //} if (this.TxtCode.CheckedItems.Count <= 0) { MessageBox.Show("請選擇大區 !"); return; } if (TxtConnet.Text == "" || TxtConnet.Text == null) { MessageBox.Show("請先填寫公告內容"); return; } if (TxtConnet.Text.Length > 500) { MessageBox.Show("公告內容不能超過500個字"); return; } //if (CheckCurSend.Checked == false && NumMinnute.Value < 5) //{ // MessageBox.Show(config.ReadConfigValue("MAU", "FN_Code_MsgConnet1")); // return; //} if (MessageBox.Show("確認添加公告?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { bool isSuccess = true; for (int i = 0; i < TxtCode.CheckedItems.Count; i++) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; if (CheckCurSend.Checked == true) { mContent[0].eName = CEnum.TagName.RayCity_BeginDate; mContent[0].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[0].oContent = DateTime.Now.AddMinutes(-2); mContent[1].eName = CEnum.TagName.RayCity_EndDate; mContent[1].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[1].oContent = DateTime.Now.AddMinutes(2); mContent[2].eName = CEnum.TagName.RayCity_Interval; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = 1; } else { mContent[0].eName = CEnum.TagName.RayCity_BeginDate; mContent[0].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[0].oContent = DptStart.Value; mContent[1].eName = CEnum.TagName.RayCity_EndDate; mContent[1].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[1].oContent = DptEnd.Value; mContent[2].eName = CEnum.TagName.RayCity_Interval; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Convert.ToInt32(NumMinnute.Value); } mContent[3].eName = CEnum.TagName.RayCity_Message; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtConnet.Text.Trim(); mContent[4].eName = CEnum.TagName.UserByID; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[5].eName = CEnum.TagName.RayCity_ServerIP; mContent[5].eTag = CEnum.TagFormat.TLV_STRING; mContent[5].oContent = Operation_RCode.GetItemAddr(mChannelInfo, TxtCode.CheckedItems[i].ToString()); CEnum.Message_Body[,] mResult1 = null; lock (typeof(C_Event.CSocketEvent)) { mResult1 = mResult = Operation_RCode.GetResult(m_ClientEvent, CEnum.ServiceKey.RayCity_BoardList_Insert, mContent); } if (mResult1[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult1[0, 0].oContent.ToString()); return; } if (mResult1[0, 0].eName == CEnum.TagName.Status && mResult1[0, 0].oContent.Equals("FAILURE")) { isSuccess = false;//MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_addfail")); } else { //MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_addsucces")); } } if (isSuccess) { MessageBox.Show("公告添加成功!"); } else { MessageBox.Show("公告添加失敗!"); } } }
private void backgroundWorkerSerch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.BtnSearch.Enabled = true; 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; } else { strCharIDX = mResult[0, 2].oContent.ToString(); CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(strCharIDX); mContent[1].eName = CEnum.TagName.RayCity_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_RCode.GetItemAddr(mServerInfo, CmbServer.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.Index; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.PageSize; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = Operation_RCode.iPageSize; CEnum.Message_Body[,] result = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_DealLog_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(result[0, 0].oContent.ToString()); return; } else { Operation_RCode.BuildDataTable(this.m_ClientEvent, result, RoleInfoView, out iPageCount); } if (iPageCount <= 1) { PnlPage.Visible = false; } else { for (int i = 0; i < iPageCount; i++) { CmbPage.Items.Add(i + 1); } CmbPage.SelectedIndex = 0; bFirst = true; PnlPage.Visible = true; } } //Operation_RCode.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount); }
private void btnDel_Click(object sender, EventArgs e) { if (introwIDX >= 0 && RoleInfoView.DataSource != null) { using (DataTable dt = (DataTable)RoleInfoView.DataSource) { if (MessageBox.Show("´_ÕJ„h³ý¼¼ÄÜ?", "„h³ý¼¼ÄÜ", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[5]; mContent[0].eName = CEnum.TagName.RayCity_CharacterID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = int.Parse(strCharIDX); mContent[1].eName = CEnum.TagName.RayCity_SkillID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(dt.Rows[introwIDX][0].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.RayCity_ServerIP; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = Operation_RC.GetItemAddr(mServerInfo, CmbServer.Text); mContent[4].eName = CEnum.TagName.RayCity_NyUserID; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = TxtAccount.Text; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_RCode.GetResult(tmp_ClientEvent, CEnum.ServiceKey.RayCity_PlayerSkill_Delete, 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() == "SUCCESS") { MessageBox.Show("²Ù×÷³É¹¦"); } else { MessageBox.Show("²Ù×÷ʧ”¡"); } } else { return; } } } else { return; } }