private void backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer = Operation_SDO.BuildCombox(mServerInfo, CmbServer); PnlPage.Visible = false; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)); }
private void CmbPage_SelectedIndexChanged(object sender, EventArgs e) { if (bFirst) { CmbPage.Enabled = false; Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = (int.Parse(CmbPage.Text) - 1) * Operation_Audition.iPageSize + 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Audition.iPageSize; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text)); this.backgroundWorkerPageChanged.RunWorkerAsync(mContent); //CEnum.Message_Body[,] mGetResult = Operation_Audition.GetResult(m_ClientEvent.GetSocket(m_ClientEvent,Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.AU_ACCOUNTREMOTE_QUERY, mContent); //Operation_Audition.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); } }
/// <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 (CmbServer.Text == "") { MessageBox.Show(config.ReadConfigValue("MSDO", "LO_Code_Msg1")); return; } BtnSearch.Enabled = false; Cursor = Cursors.WaitCursor; RoleInfoView.DataSource = null; C_Global.CEnum.Message_Body[] mContent = new CEnum.Message_Body[2]; mContent[0].eName = CEnum.TagName.SDO_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.SDO_Account; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = TxtAccount.Text.Trim(); tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)); this.backgroundWorkerSearch.RunWorkerAsync(mContent); }
/// <summary> /// 获取CSocketEvent中已存的ServersCount、IpForServer + i、(CSocketEvent)(Server + i) /// /// </summary> /// <param name="m_ClientEvent"></param> /// <returns></returns> public CSocketEvent GetSocket(CSocketEvent m_ClientEvent, string sCurrServerIp) { CSocketEvent returnValue = null; if (sCurrServerIp == null) { return(m_ClientEvent); } int ServersCount = int.Parse(m_ClientEvent.GetInfo("ServersCount").ToString()); for (int i = 1; i <= ServersCount; i++) { if ((m_ClientEvent.GetInfo("IpForServer" + i).ToString()).IndexOf(sCurrServerIp) != -1) { returnValue = (CSocketEvent)m_ClientEvent.GetInfo("Server" + i); break; } } if (returnValue == null) { returnValue = m_ClientEvent; } return(returnValue); }
private void BtnSearch_Click(object sender, EventArgs e) { try { this.tbcResult.SelectedIndex = 0; /* * 清除上一次显示的内容 */ if (CmbServer.Text == "") { MessageBox.Show(config.ReadConfigValue("MSDO", "LO_Code_Msg1")); return; } BtnSearch.Enabled = false; Cursor = Cursors.WaitCursor; RoleInfoView.DataSource = null; CEnum.Message_Body[] mContent = new CEnum.Message_Body[6]; mContent[0].eName = CEnum.TagName.JW2_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_JW2.GetItemAddr(mServerInfo, this.CmbServer.Text); mContent[1].eName = CEnum.TagName.JW2_ServerName; mContent[1].eTag = CEnum.TagFormat.TLV_STRING; mContent[1].oContent = this.CmbServer.Text.ToString(); mContent[2].eName = CEnum.TagName.JW2_ACCOUNT; mContent[2].eTag = CEnum.TagFormat.TLV_STRING; mContent[2].oContent = this.txtAccount.Text.ToString(); mContent[3].eName = CEnum.TagName.JW2_UserNick; mContent[3].eTag = CEnum.TagFormat.TLV_STRING; mContent[3].oContent = txtNick.Text.ToString(); 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_JW2.iPageSize; backgroundWorkerSearch.RunWorkerAsync(mContent); tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_JW2.GetItemAddr(mServerInfo, CmbServer.Text)); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public static DataTable GetDataTable(CSocketEvent mEvent, CEnum.Message_Body[,] val, out int PageCount) { ConfigValue config = (ConfigValue)mEvent.GetInfo("INI"); DataTable mDataTable = BuildColumn(mEvent, val); return(BuildRow(mEvent, val, mDataTable, out PageCount)); }
public static DataTable BuildDataTableItemAdd(CSocketEvent mEvent, CEnum.Message_Body[,] val, System.Windows.Forms.DataGridView mGrid, out int PageCount) { ConfigValue config = (ConfigValue)mEvent.GetInfo("INI"); DataTable mDataTable = BuildColumnItemAdd(mEvent, val); mGrid.DataSource = BuildRowItemAdd(mEvent, val, mDataTable, out PageCount); return(null); }
public ExchangeMoreInfo(string sss, CEnum.Message_Body[,] val, CSocketEvent m_ClientEvent) { InitializeComponent(); LblUser.Text = "玩家 " + sss + " 的兑换记录详细信息:"; Operation_Shop.BuildDataTable(m_ClientEvent, val, GrdInfo, out iPageCount); }
private void Btn_Search_Click(object sender, EventArgs e) { LblUser.Text = ""; PnlInput.Visible = true; GrdList.DataSource = null; CmbPage.Items.Clear(); TbcResult.SelectedTab = TpgList; bFirst = false; Btn_Search.Enabled = false; Cursor = Cursors.AppStarting; CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.AU_ServerIP; mContent[0].eTag = CEnum.TagFormat.TLV_STRING; mContent[0].oContent = Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text); mContent[1].eName = CEnum.TagName.Index; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = 1; mContent[2].eName = CEnum.TagName.PageSize; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = Operation_Audition.iPageSize; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text)); this.backgroundWorkerSearch.RunWorkerAsync(mContent); //CEnum.Message_Body[,] mGetResult = Operation_Audition.GetResult(m_ClientEvent.GetSocket(m_ClientEvent,Operation_Audition.GetItemAddr(mServerInfo, CmbServer.Text)), CEnum.ServiceKey.AU_ACCOUNTREMOTE_QUERY, mContent); ////无内容显示 //if (mGetResult[0, 0].eName == CEnum.TagName.ERROR_Msg) //{ // MessageBox.Show(mGetResult[0, 0].oContent.ToString()); // return; //} //Operation_Audition.BuildDataTable(this.m_ClientEvent, mGetResult, GrdList, out iPageCount); //if (iPageCount <= 0) //{ // PnlPage.Visible = false; //} //else //{ // for (int i = 0; i < iPageCount; i++) // { // CmbPage.Items.Add(i+1); // } // CmbPage.SelectedIndex = 0; // bFirst = true; // PnlPage.Visible = true; //} }
/// <summary> /// 构造 DataGridView 列 /// </summary> /// <param name="val">数据</param> /// <param name="mDataRow">DataRow</param> /// <returns>DataRow</returns> private static DataTable BuildRow(CSocketEvent mEvent, CEnum.Message_Body[,] m_val, DataTable mTable, out int PageCount) { try { PageCount = 0; ConfigValue config = (ConfigValue)mEvent.GetInfo("INI"); CEnum.Message_Body[,] val = m_val; for (int i = 0; i < val.GetLength(0); i++) { DataRow mRow = mTable.NewRow(); for (int j = 0; j < val.GetLength(1); j++) { if (val[i, j].eName != CEnum.TagName.PageCount && val[i, j].eName != CEnum.TagName.FJ_BoardFlag) { if (val[i, j].eName == CEnum.TagName.FJ_Sex) { if (val[i, j].oContent.ToString().Equals("0")) { val[i, j].oContent = config.ReadConfigValue("MSDO", "OP_Code_Msex"); } //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = config.ReadConfigValue("MSDO", "OP_Code_Fsex"); else { val[i, j].oContent = config.ReadConfigValue("MSDO", "OP_Code_Fsex"); } //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = config.ReadConfigValue("MSDO", "OP_Code_Msex"); } if (val[i, j].oContent == null) { mRow[(string)config.ReadConfigValue("GLOBAL", val[i, j].eName.ToString())] = "N/A"; //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = "N/A"; } else { mRow[(string)config.ReadConfigValue("GLOBAL", val[i, j].eName.ToString())] = val[i, j].oContent.ToString(); //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = val[i, j].oContent; } } else { PageCount = int.Parse(val[i, j].oContent.ToString()); } } mTable.Rows.Add(mRow); } return(mTable); } catch (Exception ex) { PageCount = 0; return(null); } }
public static CEnum.Message_Body[,] GetGsServerList(CSocketEvent mEvent, CEnum.Message_Body[] mContent) { CEnum.Message_Body[,] mReturn = null; mReturn = mEvent.RequestResult(CEnum.ServiceKey.AU_MsgServerinfo_Query, CEnum.Msg_Category.COMMON, mContent); return(mReturn); }
/// <summary> /// 获取服务器地址列表 /// </summary> /// <param name="mEvent">Socket事件</param> /// <param name="mContent">消息内容</param> /// <returns>请求结果</returns> public static CEnum.Message_Body[,] GetServerList(CSocketEvent mEvent, CEnum.Message_Body[] mContent) { CEnum.Message_Body[,] mReturn = null; mReturn = mEvent.RequestResult(CEnum.ServiceKey.SERVERINFO_IP_QUERY, CEnum.Msg_Category.COMMON, mContent); return(mReturn); }
/// <summary> /// 获取信息列表 /// </summary> /// <param name="mEvent">Socket事件</param> /// <param name="mKey">请求标记</param> /// <param name="mContent">消息内容</param> /// <returns>请求结果</returns> public static CEnum.Message_Body[,] GetResult(CSocketEvent mEvent, CEnum.ServiceKey mKey, CEnum.Message_Body[] mContent) { CEnum.Message_Body[,] mReturn = null; mReturn = mEvent.RequestResult(mKey, CEnum.Msg_Category.FJ_ADMIN, mContent); return(mReturn); }
public FrmMBuyLogDetail(CSocketEvent m_event, string strord, string _strReciver, string _Itemname, string _Buytime, string _Buyzone) { InitializeComponent(); this.m_ClientEvent = m_event; strorderID = strord; strReciver = _strReciver; AuShopItemName = _Itemname; AuShopBuytime = _Buytime; AuShopBuyzone = _Buyzone; }
public static C_Global.CEnum.Message_Body[,] ModuleModi(CSocketEvent m_Event, C_Global.CEnum.Message_Body[] mMsg) { C_Global.CEnum.Message_Body[,] mReturn = null; mReturn = m_Event.RequestResult(C_Global.CEnum.ServiceKey.MODULE_UPDATE, C_Global.CEnum.Msg_Category.MODULE_ADMIN, mMsg); return(mReturn); }
public ItemsShow(CSocketEvent m_ClientEvent, string srvIP, System.Windows.Forms.TextBox result, string recvUser, int xPos, int yPos) { InitializeComponent(); this.srvIP = srvIP; this.result = result; this.m_ClientEvent = m_ClientEvent; this.recvUser = recvUser; this.xPos = xPos; this.yPos = yPos; }
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)); }
/// <summary> /// 构造 DataGridView 列 /// </summary> /// <param name="val">数据</param> /// <param name="mDataRow">DataRow</param> /// <returns>DataRow</returns> private static DataTable BuildRow(CSocketEvent mEvent, CEnum.Message_Body[,] val, DataTable mTable, out int PageCount) { PageCount = 0; for (int i = 0; i < val.GetLength(0); i++) { DataRow mRow = mTable.NewRow(); for (int j = 0; j < val.GetLength(1); j++) { if (val[i, j].eName != CEnum.TagName.PageCount) { if (val[i, j].eName == CEnum.TagName.SDO_MoneyType) { if (val[i, j].oContent.ToString() == "1") { val[i, j].oContent = "M"; } else { val[i, j].oContent = "G"; } } if (val[i, j].eName == CEnum.TagName.SDO_SEX) { if (val[i, i].oContent.Equals("0")) { mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = "女"; } else { mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = "男"; } } if (val[i, j].oContent == null) { mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = "N/A"; } else { mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = val[i, j].oContent; } } else { PageCount = int.Parse(val[i, j].oContent.ToString()); } } mTable.Rows.Add(mRow); } return(mTable); }
public FrmNewMission(CSocketEvent m_event, string nickname, string serverip, string questid, string content, string state, int level) { InitializeComponent(); this.m_ClientEvent = m_event; this.serverIP = serverip; this.nickName = nickname; this.questID = questid; this.content = content; this.state = state; this.level = level; }
public NotesList(CSocketEvent clientEvent) { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // this.m_ClientEvent = clientEvent; }
public ExchangeMoreInfo(string sss, CEnum.Message_Body[,] val, CSocketEvent m_ClientEvent) { ConfigValue config = (ConfigValue)m_ClientEvent.GetInfo("INI"); this.Text = config.ReadConfigValue("MAUDITION", "EMI_UI_ExchangeMoreInfo"); InitializeComponent(); LblUser.Text = config.ReadConfigValue("MAUDITION", "EMI_Code_LblUser").Replace("{user}", sss); //LblUser.Text = "玩家 " + sss + " 的兑换记录详细信息:"; Operation_Shop.BuildDataTable(m_ClientEvent, val, GrdInfo, out iPageCount); }
private void backgroundWorkerServerLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer.Items.Clear(); for (int i = 0; i < mServerInfo.GetLength(0); i++) { CmbServer.Items.Add(mServerInfo[i, 1].oContent); } CmbServer.SelectedIndex = 0; bFirst = true; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_RCode.GetItemAddr(mServerInfo, CmbServer.Text)); }
/// <summary> /// 创建类库中的窗体 /// </summary> /// <param name="oParent">MDI 程序的父窗体</param> /// <param name="oSocket">Socket</param> /// <returns>类库中的窗体</returns> public Form CreateModule(object oParent, object oEvent) { this.m_ClientEvent = (CSocketEvent)oEvent; if (oParent != null) { this.MdiParent = (Form)oParent; this.Show(); } else { this.ShowDialog(); } return(this); }
/// <summary> /// 构造 DataGridView 列 /// </summary> /// <param name="val">数据</param> /// <param name="mDataTable">DataTable</param> /// <returns>DataTable</returns> private static DataTable BuildColumn(CSocketEvent mEvent, CEnum.Message_Body[,] val) { DataTable mDataTable = new DataTable(); for (int i = 0; i < val.GetLength(1); i++) { if (val[0, i].eName != CEnum.TagName.PageCount) { mDataTable.Columns.Add((string)mEvent.DecodeFieldName(val[0, i].eName), typeof(string)); } } return(mDataTable); }
public static ComboBox DisplayComboBox(CSocketEvent m_Event, ComboBox mComboBox, C_Global.CEnum.Message_Body[,] mMsgBody) { for (int i = 0; i < mMsgBody.GetLength(0); i++) { for (int j = 0; j < mMsgBody.GetLength(1); j++) { if (mMsgBody[i, j].eName == C_Global.CEnum.TagName.GameName) { mComboBox.Items.Add(mMsgBody[i, j].oContent.ToString().Trim()); } } } return(mComboBox); }
/// <summary> /// 构造 DataGridView 列 /// </summary> /// <param name="val">数据</param> /// <param name="mDataRow">DataRow</param> /// <returns>DataRow</returns> private static DataTable BuildRowItemAdd(CSocketEvent mEvent, CEnum.Message_Body[,] m_val, DataTable mTable, out int PageCount) { try { PageCount = 0; ConfigValue config = (ConfigValue)mEvent.GetInfo("INI"); CEnum.Message_Body[,] val = m_val; for (int i = 0; i < val.GetLength(0); i++) { DataRow mRow = mTable.NewRow(); DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn(); for (int j = 0; j < val.GetLength(1); j++) { //mTable.Columns[j].ColumnName = val[i, j].eName.ToString(); if (val[i, j].eName != CEnum.TagName.PageCount && val[i, j].eName != CEnum.TagName.FJ_BoardFlag) { if (val[i, j].oContent == null) { //mRow[(string)config.ReadConfigValue("GLOBAL", val[i, j].eName.ToString())] = "N/A"; mRow[j] = "N/A"; //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = "N/A"; } else { //mRow[(string)config.ReadConfigValue("GLOBAL", val[i, j].eName.ToString())] = val[i, j].oContent.ToString(); mRow[j] = val[i, j].oContent; //mRow[(string)mEvent.DecodeFieldName(val[i, j].eName)] = val[i, j].oContent; } } else { PageCount = int.Parse(val[i, j].oContent.ToString()); } } mTable.Rows.Add(mRow); } return(mTable); } catch (Exception ex) { PageCount = 0; return(null); } }
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 backgroundWorkerFormLoad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { CmbServer = Operation_SDO.BuildCombox(mServerInfo, CmbServer); //货币类型 CmbType.Items.Add(config.ReadConfigValue("MSDO", "SP_Code_Mtype")); CmbType.Items.Add(config.ReadConfigValue("MSDO", "SP_Code_Gtype")); CmbType.Items.Add(config.ReadConfigValue("MSDO", "SP_Code_Jifen")); CmbType.Items.Add(config.ReadConfigValue("MSDO", "SP_Code_Alltype")); CmbType.SelectedIndex = 0; PnlPage.Visible = false; LblTotal.Text = ""; tmp_ClientEvent = m_ClientEvent.GetSocket(m_ClientEvent, Operation_SDO.GetItemAddr(mServerInfo, CmbServer.Text)); }
private static DataTable BuildColumnItemAdd(CSocketEvent mEvent, CEnum.Message_Body[,] val) { DataTable mDataTable = new DataTable(); ConfigValue config = (ConfigValue)mEvent.GetInfo("INI"); for (int i = 0; i < val.GetLength(1); i++) { if (val[0, i].eName != CEnum.TagName.PageCount && val[0, i].eName != CEnum.TagName.FJ_BoardFlag) { mDataTable.Columns.Add((string)config.ReadConfigValue("GLOBAL", val[0, i].eName.ToString()), typeof(string)); //mDataTable.Columns.Add((string)mEvent.DecodeFieldName(val[0, i].eName), typeof(string)); } } return(mDataTable); }