private void UserLoginQuery() { GrdResult.DataSource = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.FJ_UserNick; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = userAccount; mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.Index; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = 1; mContent[3].eName = CEnum.TagName.PageSize; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = Operation_FJ.iPageSize; mContent[4].eName = CEnum.TagName.FJ_StartTime; mContent[4].eTag = CEnum.TagFormat.TLV_DATE; mContent[4].oContent = DtpBegin.Value; mContent[5].eName = CEnum.TagName.FJ_EndTime; mContent[5].eTag = CEnum.TagFormat.TLV_DATE; mContent[5].oContent = DtpEnd.Value; this.backgroundWorkerUserQuery.RunWorkerAsync(mContent); }
private void BtnSearch_Click(object sender, EventArgs e) { if (CmbServer.Text == "") { return; } PnlPage.Visible = false; GrdResult.DataSource = null; if (TxtAccount.Text.Trim().Length > 0) { this.BtnSearch.Enabled = false; this.Cursor = Cursors.AppStarting; //CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; //mContent[0].eName = CEnum.TagName.FJ_UserID; //mContent[0].eTag = CEnum.TagFormat.TLV_STRING; //mContent[0].oContent = TxtAccount.Text; //mContent[1].eName = CEnum.TagName.FJ_ServerIP; //mContent[1].eTag = CEnum.TagFormat.TLV_STRING; //mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); //mContent[2].eName = CEnum.TagName.Index; //mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[2].oContent = 1; //mContent[3].eName = CEnum.TagName.PageSize; //mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[3].oContent = Operation_FJ.iPageSize; //mContent[4].eName = CEnum.TagName.FJ_StartTime; //mContent[4].eTag = CEnum.TagFormat.TLV_DATE; //mContent[4].oContent = DtpBegin.Value; //mContent[5].eName = CEnum.TagName.FJ_EndTime; //mContent[5].eTag = CEnum.TagFormat.TLV_DATE; //mContent[5].oContent = DtpEnd.Value; CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.FJ_UserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.FJ_UserNick; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = ""; this.backgroundWorkerSearch.RunWorkerAsync(mContent); } else { MessageBox.Show("请输入玩家帐号"); } }
private void button1_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; button1.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.FJ_UseAccount; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text.Trim(); mContent[2].eName = CEnum.TagName.FJ_Pwd; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = this.TxtTmpPwd.Text.Trim(); mContent[3].eName = CEnum.TagName.UserByID; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); this.backgroundWorkerModify.RunWorkerAsync(mContent); }
private void BtnSearch_Click(object sender, EventArgs e) { if (CmbServer.Text == "") { return; } //清除控件 this.TxtTmpPwd.Text = ""; if (TxtAccount.Text.Trim().Length > 0) { this.BtnSearch.Enabled = false; this.Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.FJ_UseAccount; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text.Trim(); this.backgroundWorkerSearch.RunWorkerAsync(mContent); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "CI_Code_inPutAccont")); return; } }
private void CmbPage_SelectedIndexChanged_1(object sender, EventArgs e) { if (bFirst) { //this.CmbPage.Enabled = false; //this.Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.FJ_UserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = userAccount; mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.Index; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = (int.Parse(CmbPage.Text) - 1) * Operation_FJ.iPageSize + 1; mContent[3].eName = CEnum.TagName.PageSize; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = Operation_FJ.iPageSize; mContent[4].eName = CEnum.TagName.FJ_StartTime; mContent[4].eTag = CEnum.TagFormat.TLV_DATE; mContent[4].oContent = DtpBegin.Value; mContent[5].eName = CEnum.TagName.FJ_EndTime; mContent[5].eTag = CEnum.TagFormat.TLV_DATE; mContent[5].oContent = DtpEnd.Value; this.backgroundWorkerPageChanged.RunWorkerAsync(mContent); } }
private void PartInfo() { this.RoleInfoView.DataSource = null; CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.FJ_UserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAncont.Text; mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.FJ_UserNick; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtNick.Text; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_CharacterInfo_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); this.BtnSearch.Enabled = true; return; } Operation_FJ.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount); this.BtnSearch.Enabled = true; }
private void button1_Click(object sender, EventArgs e) { button1.Enabled = false; //Cursor = Cursors.AppStarting; strDBip = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); strUser = textBox1.Text; CEnum.Message_Body[,] mResult; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = strDBip; 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_FJ.iPageSize; mContent[3].eName = CEnum.TagName.FJ_UserID; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = strUser; this.backgroundWorkerStatusQuery.RunWorkerAsync(mContent); }
/// <summary> /// 请求频道名称 /// </summary> private void GetChannelList() { CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.ServerInfo_GameDBID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = 2; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_FJ"); lock (typeof(C_Event.CSocketEvent)) { mChannelInfo = Operation_FJ.GetServerList(this.m_ClientEvent, mContent); } if (mChannelInfo[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mChannelInfo[0, 0].oContent.ToString()); return; } this.CmbServer = Operation_FJ.BuildCombox(mChannelInfo, CmbServer); bFirst = true; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(mChannelInfo, CmbServer.Text)); }
private void BtnSearch_Click(object sender, EventArgs e) { if (comboBox1.Text.Length > 0) { BtnSearch.Enabled = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.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 = 100; mContent[3].eName = CEnum.TagName.FJ_Max; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = ReturnType(comboBox1.Text.Trim()); this.backgroundWorkerSearch.RunWorkerAsync(mContent); } else { MessageBox.Show("请输入查询类型"); } }
private void CmbServer_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { TxtCode.Items.Clear(); CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mChannelInfo, CmbServer.Text); CEnum.Message_Body[,] GsResult = null; lock (typeof(C_Event.CSocketEvent)) { GsResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_GS_Query, mContent); } if (GsResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(GsResult[0, 0].oContent.ToString()); return; } for (int i = 0; i < GsResult.GetLength(0); i++) { TxtCode.Items.Add(GsResult[i, 0].oContent.ToString()); } } }
private void dgvMission_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataTable dt = ((DataTable)dgvMission.DataSource); FrmNewMission fnw = new FrmNewMission(this.tmp_ClientEvent, dt.Rows[e.RowIndex][0].ToString(), Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text), dt.Rows[e.RowIndex][1].ToString(), dt.Rows[e.RowIndex][3].ToString(), dt.Rows[e.RowIndex][2].ToString(), this.level); fnw.ShowDialog(); this.Cursor = Cursors.WaitCursor; CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.FJ_UserNick; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = ((DataTable)this.dgvMission.DataSource).Rows[e.RowIndex][0].ToString(); this.dgvMission.DataSource = null; this.backgroundWorkerMissionQuery.RunWorkerAsync(mContent); } }
private void backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer = Operation_FJ.BuildCombox(mServerInfo, CmbServer); tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text)); }
private void BtnSave_Click(object sender, EventArgs e) { strUserNick = TxtNick.Text.Trim(); if (strUserNick != "" && txtUnReason.Text.Trim() != "") { if (MessageBox.Show(config.ReadConfigValue("MFj", "BA_Code_MsgUnlock"), config.ReadConfigValue("MFj", "BA_Code_MsgAccont"), MessageBoxButtons.YesNo) == DialogResult.Yes) { this.BtnSave.Enabled = false; this.Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.FJ_UserID; 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.FJ_Reason; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = txtUnReason.Text.Trim(); this.backgroundWorkerUnFreeze.RunWorkerAsync(mContent); } } else { MessageBox.Show(config.ReadConfigValue("MFj", "BA_Code_MsgReason")); } }
private void backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer = Operation_FJ.BuildCombox(mServerInfo, CmbServer); LblUser.Text = ""; //PnlInput.Visible = true; GrdList.DataSource = null; PnlPage.Visible = false; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text)); }
private void btnSearchLog_Click(object sender, EventArgs e) { if (this.TxtItemName.Text == "" || this.TxtItemName.Text == null) { MessageBox.Show(config.ReadConfigValue("MFj", "FB_Code_MsgInputItemName")); return; } CEnum.Message_Body[,] mResult = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.FJ_UserNick; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtCharinfo.Text.Trim(); mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.FJ_ItemName; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = this.TxtItemName.Text.ToString(); mContent[3].eName = CEnum.TagName.FJ_Type; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = Operation_FJ.GetItemType(mType, this.CmbType.Text.ToString()); mContent[4].eName = CEnum.TagName.FJ_StartTime;//时间段开始时间 mContent[4].eTag = CEnum.TagFormat.TLV_DATE; mContent[4].oContent = Convert.ToDateTime(this.dateTimePickerTimeFrom.Value.ToLongDateString()); mContent[5].eName = CEnum.TagName.FJ_EndTime; mContent[5].eTag = CEnum.TagFormat.TLV_DATE; mContent[5].oContent = Convert.ToDateTime(this.dateTimePickerTimeTo.Value.ToLongDateString()); lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_ItemLog_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } else { logInfoView.DataSource = null; Operation_FJ.BuildDataTableItemAdd(this.m_ClientEvent, mResult, logInfoView, out iPageCount); } }
private void TbcResult_SelectedIndexChanged(object sender, EventArgs e) { if (TbcResult.SelectedIndex == 1) { this.TxtCharinfo.Text = userAccount; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text)); CEnum.Message_Body[] mItemSubClass = new CEnum.Message_Body[1]; mItemSubClass[0].eName = CEnum.TagName.FJ_ServerIP; mItemSubClass[0].eTag = CEnum.TagFormat.TLV_STRING; mItemSubClass[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); this.backgroundWorkerType.RunWorkerAsync(mItemSubClass); } }
private void PartInfo() { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.FJ_UserID; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = TxtAccount.Text; mContent[1].eName = CEnum.TagName.FJ_ServerIP; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[2].eName = CEnum.TagName.FJ_UserNick; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = TxtNick.Text; backgroundWorkerSearch.RunWorkerAsync(mContent); }
private void btnMod_Click(object sender, EventArgs e) { if (txtMap.Text.Trim().Length <= 0) { MessageBox.Show("请先查询要传送的地图"); } else { CEnum.Message_Body[] mContent1 = new CEnum.Message_Body[7]; mContent1[0].eName = CEnum.TagName.FJ_XPosition; mContent1[0].eTag = CEnum.TagFormat.TLV_STRING; mContent1[0].oContent = txtX.Text; mContent1[1].eName = CEnum.TagName.FJ_YPosition; mContent1[1].eTag = CEnum.TagFormat.TLV_STRING; mContent1[1].oContent = txtY.Text; mContent1[2].eName = CEnum.TagName.FJ_ServerIP; mContent1[2].eTag = CEnum.TagFormat.TLV_STRING; mContent1[2].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent1[3].eName = CEnum.TagName.UserByID; mContent1[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[3].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent1[4].eName = CEnum.TagName.FJ_UserNick; mContent1[4].eTag = CEnum.TagFormat.TLV_STRING; mContent1[4].oContent = txtCharname.Text; mContent1[5].eName = CEnum.TagName.FJ_UserID; mContent1[5].eTag = CEnum.TagFormat.TLV_STRING; mContent1[5].oContent = txtUserID.Text; mContent1[6].eName = CEnum.TagName.FJ_ZPosition; mContent1[6].eTag = CEnum.TagFormat.TLV_STRING; mContent1[6].oContent = txtZ.Text; backgroundWorkerUpdate.RunWorkerAsync(mContent1); } }
private void Btn_Search_Click(object sender, EventArgs e) { if (CmbServer.Text == "") { return; } PnlPage.Visible = false; LblUser.Text = ""; //PnlInput.Visible = true; GrdList.DataSource = null; Btn_Search.Enabled = false; bFirst = false; this.Cursor = Cursors.AppStarting; CmbPage.Items.Clear(); TbcResult.SelectedTab = TpgList; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.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_FJ.iPageSize; mContent[3].eName = CEnum.TagName.FJ_UserID; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = ""; this.backgroundWorkerSearch.RunWorkerAsync(mContent); }
/// <summary> /// 公告记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRecord_Click(object sender, EventArgs e) { //ItmEdit.Enabled = true; //ItmDelete.Enabled = false; GrdList.DataSource = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[1]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mChannelInfo, CmbServer.Text); CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_BoardList_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } Operation_FJ.BuildDataTable(this.m_ClientEvent, mResult, GrdList, out iPageCount); }
private void RoleInfoView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { this.level = int.Parse(((DataTable)this.RoleInfoView.DataSource).Rows[e.RowIndex][config.ReadConfigValue("GLOBAL", "FJ_Level")].ToString()); this.TbcResult.Enabled = false; this.dgvMission.DataSource = null; Cursor = Cursors.WaitCursor; //TbcResult.TabPages.Remove(TpcMission); this.RoleInfoView.Cursor = Cursors.WaitCursor; CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.FJ_UserNick; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = ((DataTable)this.RoleInfoView.DataSource).Rows[e.RowIndex][1].ToString(); this.backgroundWorkerMissionQuery.RunWorkerAsync(mContent); } }
private void BtnPost_Click(object sender, EventArgs e) { if (TxtAccount.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) { BtnPost.Enabled = false; //Cursor = Cursors.AppStarting; strDBip = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); strUser = TxtAccount.Text.Trim(); CEnum.Message_Body[,] mResult; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.FJ_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = strDBip; 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_FJ.iPageSize; mContent[3].eName = CEnum.TagName.FJ_UserID; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = strUser; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_UserBan_Query, mContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { CEnum.Message_Body[,] mResult1 = null; CEnum.Message_Body[] mContent1 = new CEnum.Message_Body[4]; mContent1[0].eName = CEnum.TagName.FJ_ServerIP; mContent1[0].eTag = CEnum.TagFormat.TLV_STRING; mContent1[0].oContent = Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); mContent1[1].eName = CEnum.TagName.FJ_UserID; mContent1[1].eTag = CEnum.TagFormat.TLV_STRING; mContent1[1].oContent = TxtAccount.Text.Trim(); mContent1[2].eName = CEnum.TagName.UserByID; mContent1[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent1[2].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent1[3].eName = CEnum.TagName.FJ_Reason; mContent1[3].eTag = CEnum.TagFormat.TLV_STRING; mContent1[3].oContent = TxtContent.Text.Trim(); lock (typeof(C_Event.CSocketEvent)) { mResult1 = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_UserBan_Close, mContent1); } if (mResult1[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show("²Ù×÷ʧ°Ü"); MessageBox.Show(config.ReadConfigValue("MFj", "FB_Code_MsgFail")); BtnPost.Enabled = true; return; } if (mResult1[0, 0].oContent.ToString() == "SUCESS") { MessageBox.Show(config.ReadConfigValue("MFj", "FB_Code_MsgSucc")); BtnPost.Enabled = true; TxtAccount.Text = ""; TxtContent.Text = ""; } else { //MessageBox.Show("²Ù×÷ʧ°Ü»òÊäÈëÕʺŴíÎó"); MessageBox.Show(config.ReadConfigValue("MFj", "FB_Code_MsgFailorIDFail")); BtnPost.Enabled = true; return; } } else { MessageBox.Show(config.ReadConfigValue("MFj", "FB_Code_MsgBanedUser")); BtnPost.Enabled = true; return; } //this.backgroundWorkerFreeze.RunWorkerAsync(mContent); } } else { MessageBox.Show(config.ReadConfigValue("MFj", "BA_Code_MsginputAccont")); } }
private void CmbServer_SelectedIndexChanged(object sender, EventArgs e) { tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text)); }
/// <summary> /// 添加公告信息内容 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOk_Click(object sender, EventArgs e) { //int vailnum = Getcishu(); //if (vailnum <= 0) //{ // MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_checktime")); // return; //} if (TxtConnet.Text == "" || TxtConnet.Text == null) { MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_checktext")); return; } if (TxtConnet.Text.Length > 500) { MessageBox.Show(config.ReadConfigValue("MFj", "FN_Code_MsgConnet")); return; } if (TxtCode.CheckedItems.Count <= 0) { MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_checkip")); return; } if (MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_msgaddnotice"), config.ReadConfigValue("MSDO", "FN_Code_msgnote"), MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { //Operation_FJ.GetItemAddr(mServerInfo, CmbServer.Text); CEnum.Message_Body[] mContent = new CEnum.Message_Body[7]; if (CheckStart.Checked) { mContent[0].eName = CEnum.TagName.FJ_StartTime; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = ""; } else { mContent[0].eName = CEnum.TagName.FJ_StartTime; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = DptStart.Text; } if (CheckEnd.Checked) { mContent[1].eName = CEnum.TagName.FJ_EndTime; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = ""; } else { mContent[1].eName = CEnum.TagName.FJ_EndTime; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = DptEnd.Text; } mContent[2].eName = CEnum.TagName.FJ_Interval; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Convert.ToInt32(NumMinnute.Value); mContent[3].eName = CEnum.TagName.FJ_MsgContent; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = TxtConnet.Text.Trim(); if (ischeck == true) { mContent[4].eName = CEnum.TagName.FJ_GSName; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = ""; } else { mContent[4].eName = CEnum.TagName.FJ_GSName; mContent[4].eTag = CEnum.TagFormat.TLV_STRING; mContent[4].oContent = ReturnSeverGsname(); } 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.FJ_ServerIP; mContent[6].eTag = CEnum.TagFormat.TLV_STRING; mContent[6].oContent = Operation_FJ.GetItemAddr(mChannelInfo, CmbServer.Text); CEnum.Message_Body[,] mResult1 = null; lock (typeof(C_Event.CSocketEvent)) { mResult1 = mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_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")) { MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_addfail")); } else { MessageBox.Show(config.ReadConfigValue("MSDO", "FN_Code_addsucces")); GrdList.DataSource = null; CEnum.Message_Body[] MBContent = new CEnum.Message_Body[1]; MBContent[0].eName = CEnum.TagName.FJ_ServerIP; MBContent[0].eTag = CEnum.TagFormat.TLV_STRING; MBContent[0].oContent = Operation_FJ.GetItemAddr(mChannelInfo, CmbServer.Text); CEnum.Message_Body[,] mResult = null; lock (typeof(C_Event.CSocketEvent)) { mResult = Operation_FJ.GetResult(tmp_ClientEvent, CEnum.ServiceKey.FJ_BoardList_Query, MBContent); } if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mResult[0, 0].oContent.ToString()); return; } Operation_FJ.BuildDataTable(this.m_ClientEvent, mResult, GrdList, out iPageCount); Setdefault(); } } }
private void cbxServerIP_SelectedIndexChanged(object sender, EventArgs e) { tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_FJ.GetItemAddr(serverIPResult, cbxServerIP.Text)); }