private void btnSearch_Click(object sender, EventArgs e) { try { this.GrdCharacter.DataSource = null; if (cmbServer.Text == "") { MessageBox.Show(config.ReadConfigValue("MSD", "UIA_Hint_selectServer")); return; } serverIP = Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text); userName = txtAccount.Text.Trim(); userNick = txtNick.Text.Trim(); if (txtAccount.Text.Trim().Length > 0 || txtNick.Text.Trim().Length > 0) { PartInfo(); } else { MessageBox.Show(config.ReadConfigValue("MMagic", "UIA_Hint_inPutAccont")); return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearchInfo_Click(object sender, EventArgs e) { try { if (cmbServer.Text == "") { MessageBox.Show(config.ReadConfigValue("MMagic", "UIA_Hint_selectServer")); return; } if (txtQueryAccount.Text.Trim().Length > 0) { this.GrpSearch.Enabled = false; this.tbcResult.Enabled = false; this.Cursor = Cursors.WaitCursor;//改变鼠标状态 this.GrdIsBan.DataSource = null; serverIP = Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text); CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.SD_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = serverIP; mContent[1].eName = CEnum.TagName.SD_ServerName; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = this.cmbServer.Text.ToString(); mContent[2].eName = CEnum.TagName.SD_UserName; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = txtQueryAccount.Text.Trim(); mContent[3].eName = CEnum.TagName.SD_Type; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; mContent[4].eName = CEnum.TagName.Index; mContent[4].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[4].oContent = 1; mContent[5].eName = CEnum.TagName.PageSize; mContent[5].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[5].oContent = Operation_GD.iPageSize; backgroundWorkerQueryBan.RunWorkerAsync(mContent); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearch_Click(object sender, EventArgs e) { try { tbcResult.SelectedTab = tpgCharacter;//选择角色信息选项卡 this.GrdCharacter.DataSource = null; if (CmbServer.Text == "") { MessageBox.Show(config.ReadConfigValue("MSD", "UIA_Hint_selectServer")); return; } serverIP = Operation_GD.GetItemAddr(mServerInfo, CmbServer.Text); userName = TxtAccount.Text.Trim(); userNick = txtNick.Text.Trim(); if (TxtAccount.Text.Trim().Length > 0 || txtNick.Text.Trim().Length > 0) { this.GrpSearch.Enabled = false; this.tbcResult.Enabled = false; this.Cursor = Cursors.WaitCursor;//改变鼠标状态 CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; //查询玩家角色信息 mContent[0].eName = CEnum.TagName.SD_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = serverIP; mContent[1].eName = CEnum.TagName.SD_UserName; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = userName; mContent[2].eName = CEnum.TagName.f_pilot; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = userNick; backgroundWorkerSearch.RunWorkerAsync(mContent); } else { MessageBox.Show(config.ReadConfigValue("MMagic", "UIA_Hint_inPutAccont")); return; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void StraightRanking() { try { this.GrpSearch.Enabled = false; this.tbcResult.Enabled = false; this.Cursor = Cursors.WaitCursor;//改变鼠标状态 this.GrdStraightRanking.DataSource = null; this.pnlStraightRanking.Visible = false; this.cmbStraightRanking.Items.Clear(); this.pageStraightRanking = false; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.SD_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text); //mContent[1].eName = CEnum.TagName.f_idx; //mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[1].oContent = userID; //mContent[2].eName = CEnum.TagName.SD_UserName; //mContent[2].eTag = CEnum.TagFormat.TLV_STRING; //mContent[2].oContent = userName; 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_GD.iPageSize; mContent[3].eName = CEnum.TagName.SD_Type; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 2; this.backgroundWorkerStraightRanking.RunWorkerAsync(mContent); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void cmbComplexRank_SelectedIndexChanged(object sender, EventArgs e) { try { if (pageComplexRank) { this.GrpSearch.Enabled = false; this.tbcResult.Enabled = false; this.Cursor = Cursors.WaitCursor;//改变鼠标状态 this.GrdComplexRank.DataSource = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[4]; mContent[0].eName = CEnum.TagName.SD_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text); //mContent[1].eName = CEnum.TagName.f_idx; //mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; //mContent[1].oContent = userID; //mContent[2].eName = CEnum.TagName.SD_UserName; //mContent[2].eTag = CEnum.TagFormat.TLV_STRING; //mContent[2].oContent = userName; mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(this.cmbComplexRank.Text.Trim()); mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_GD.iPageSize; mContent[3].eName = CEnum.TagName.SD_Type; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = 1; this.backgroundWorkerReComplexRank.RunWorkerAsync(mContent); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void cmbServer_SelectedIndexChanged(object sender, EventArgs e) { tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text)); }
private void backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { cmbServer = Operation_GD.BuildCombox(mServerInfo, cmbServer); tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_GD.GetItemAddr(mServerInfo, cmbServer.Text)); }
private void GrdDistintegrationOfTheBody_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) //双击列名触发 { using (DataTable dt = (DataTable)GrdDistintegrationOfTheBody.DataSource) { userTime = dt.Rows[e.RowIndex][10].ToString(); SD_ID = dt.Rows[e.RowIndex][0].ToString(); if (MessageBox.Show("恢复机体解体记录!", "恢复机体", MessageBoxButtons.YesNo) == DialogResult.Yes) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[8]; mContent[0].eName = CEnum.TagName.f_idx; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = userID; mContent[1].eName = CEnum.TagName.SD_UserName; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = userName; mContent[2].eName = CEnum.TagName.SD_ServerIP; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = Operation_GD.GetItemAddr(mServerInfo, CmbServer.Text); mContent[3].eName = CEnum.TagName.SD_ItemID; mContent[3].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[3].oContent = int.Parse(dt.Rows[e.RowIndex][4].ToString()); 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.SD_ItemName; mContent[5].eTag = CEnum.TagFormat.TLV_STRING; mContent[5].oContent = dt.Rows[e.RowIndex][5].ToString(); mContent[6].eName = CEnum.TagName.BeginTime; mContent[6].eTag = CEnum.TagFormat.TLV_STRING; mContent[6].oContent = userTime; mContent[7].eName = CEnum.TagName.SD_ID; mContent[7].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[7].oContent = int.Parse(SD_ID); CEnum.Message_Body[,] result = Operation_GD.GetResult(m_ClientEvent, CEnum.ServiceKey.SD_ReGetUnits_Query, mContent); if (result[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(config.ReadConfigValue("MFj", "FM_Code_Msg1")); } else { MessageBox.Show(result[0, 0].oContent.ToString()); if (GrdDistintegrationOfTheBody.DataSource != null) { DataTable dt2 = (DataTable)GrdDistintegrationOfTheBody.DataSource; for (int i = 0; i < dt2.Rows.Count; i++) { if (dt2.Rows[i].ItemArray[0].ToString() == SD_ID) { this.GrdDistintegrationOfTheBody.Rows[i].DefaultCellStyle.BackColor = Color.Red; } } } //this.comboBoxGuild.Enabled = false; //this.buttonAdd.Enabled = false; //this.buttonQuit.Enabled = true; } //else if (result[0, 0].oContent.ToString() == "FAILURE") //{ // MessageBox.Show("恢复机体失败!"); //} } } //} //else //{ // MessageBox.Show(config.ReadConfigValue("MSDO", "CI_Code_inPutAccont")); //} } }
private void btnEditNotice_Click(object sender, EventArgs e) { try { if (this.clbServer.CheckedItems.Count <= 0) { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_selectServer")); return; } if (DptStartTime.Value > DptEndTime.Value) { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_TimeSpan")); return; } if (DptEndTime.Value <= DateTime.Now) { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_EndTime")); return; } if (cmbType.Text == "") { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_typeNull")); return; } if (this.txtContent.Text.Trim() == "") { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_txtContent")); return; } if (this.txtContent.Text.Trim().Length >= 512) { MessageBox.Show(config.ReadConfigValue("MSD", "NM_Hint_contentLength")); return; } serverIP = null; if (isCheck) { serverIP = "255.255.255.255,"; } else { for (int i = 0; i < clbServer.CheckedItems.Count; i++) { serverIP += Operation_GD.GetItemAddr(mServerInfo, clbServer.CheckedItems[i].ToString()); serverIP += ","; } } int noticeType = 0; if (cmbType.Text == config.ReadConfigValue("MSD", "NM_UI_cmbNoticeCheck")) { noticeType = 0; } else if (cmbType.Text == config.ReadConfigValue("MSD", "NM_UI_cmbNoticeCommon")) { noticeType = 1; } else if (cmbType.Text == config.ReadConfigValue("MSD", "NM_UI_cmbNoticeEvent")) { noticeType = 2; } else if (cmbType.Text == config.ReadConfigValue("MSD", "NM_UI_cmbNoticeSystem")) { noticeType = 3; } content = txtContent.Text.Trim().Replace("\n", "\\"); this.GrpServer.Enabled = false; this.GrpNotice.Enabled = false; this.Cursor = Cursors.WaitCursor;//改变鼠标状态 CEnum.Message_Body[] mContent = new CEnum.Message_Body[10]; mContent[0].eName = CEnum.TagName.SD_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = serverIP; mContent[1].eName = CEnum.TagName.UserByID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[2].eName = CEnum.TagName.SD_Limit; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = int.Parse(nudTimeSpan.Value.ToString()); mContent[3].eName = CEnum.TagName.SD_Content; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = content; mContent[4].eName = CEnum.TagName.SD_EndTime; mContent[4].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[4].oContent = DptEndTime.Value; mContent[5].eName = CEnum.TagName.SD_StartTime; mContent[5].eTag = CEnum.TagFormat.TLV_TIMESTAMP; mContent[5].oContent = DptStartTime.Value; mContent[6].eName = CEnum.TagName.SD_Type; mContent[6].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[6].oContent = noticeType; mContent[7].eName = CEnum.TagName.SD_SendType; mContent[7].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[7].oContent = typeSend; mContent[8].eName = CEnum.TagName.SD_ID; mContent[8].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[8].oContent = noticeID; mContent[9].eName = CEnum.TagName.SD_Status; mContent[9].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[9].oContent = 0; backgroundWorkerEditNotice.RunWorkerAsync(mContent); } catch (Exception ex) { MessageBox.Show(ex.Message); } }