private void Frm_SDO_Shopping_Load(object sender, EventArgs e) { IntiFontLib(); //服务器列表 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 = 3; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); this.backgroundWorkerFormLoad.RunWorkerAsync(mContent); //mServerInfo = Operation_SDO.GetServerList(this.m_ClientEvent, mContent); //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 = ""; }
/// <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 = 1; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); lock (typeof(C_Event.CSocketEvent)) { mChannelInfo = Operation_SDO.GetServerList(this.m_ClientEvent, mContent); } if (mChannelInfo[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(mChannelInfo[0, 0].oContent.ToString()); return; } for (int i = 0; i < mChannelInfo.GetLength(0); i++) { TxtCode.Items.Add(mChannelInfo[i, 1].oContent.ToString()); } }
/// <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); }
/// <summary> /// 删除游戏 /// </summary> private void DelGame() { int selectIndex = 0; try { //要删除的游戏所在行 selectIndex = this.listViewGameList.SelectedItems[0].Index; } catch { MessageBox.Show(config.ReadConfigValue("MGM", "GL_UI_ChooseGame"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } try { if (MessageBox.Show(config.ReadConfigValue("MGM", "GL_UI_SureToDeleteGame"), "", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } //要删除的游戏id int gameID = int.Parse(this.listViewGameList.Items[selectIndex].Tag.ToString()); //执行操作的返回结果 C_Global.CEnum.Message_Body[,] resultMsgBody = null; //发送的信息 C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.UserByID; messageBody[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.GameID; messageBody[1].oContent = gameID; resultMsgBody = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.GAME_DELETE, C_Global.CEnum.Msg_Category.GAME_ADMIN, messageBody); //检测状态 if (resultMsgBody[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { MessageBox.Show(resultMsgBody[0, 0].oContent.ToString()); //Application.Exit(); return; } if (resultMsgBody[0, 0].oContent.ToString().Trim().ToUpper().Equals("SUCESS")) { InitializeListView(); //this.listViewGameList.Items[selectIndex].Remove(); MessageBox.Show(config.ReadConfigValue("MGM", "GL_UI_Succeed")); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, System.EventArgs e) { button1.Enabled = false; Cursor = Cursors.AppStarting; string sModuleID = ""; for (int i = 0; i < moduleIDs.Count; i++) { sModuleID += moduleIDs[i].ToString() + ","; } DefaultRoles defaultRols = new DefaultRoles(m_ClientEvent, gmType == 0 ? false : true); sModuleID += defaultRols.GetRoleIDString(); //sModuleID = sModuleID.Substring(1,sModuleID.Length-1); C_Global.CEnum.Message_Body[,] resultMsgBody = null; C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[3]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.UserByID; messageBody[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.User_ID; messageBody[1].oContent = this.userID; messageBody[2].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[2].eName = C_Global.CEnum.TagName.ModuleList; messageBody[2].oContent = sModuleID; this.backgroundWorkerBtnOK.RunWorkerAsync(messageBody); //resultMsgBody = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.USER_MODULE_UPDATE, C_Global.CEnum.Msg_Category.USER_MODULE_ADMIN, messageBody); //try //{ // int iSrvCount = int.Parse(m_ClientEvent.GetInfo("ServersCount").ToString()); // for (int iSrvIndex = 1; iSrvIndex <= iSrvCount; iSrvIndex++) // { // ((CSocketEvent)m_ClientEvent.GetInfo("Server" + iSrvIndex)).RequestResult(C_Global.CEnum.ServiceKey.USER_MODULE_UPDATE, C_Global.CEnum.Msg_Category.USER_MODULE_ADMIN, messageBody); // } //} //catch { } ////检测状态 //if (resultMsgBody[0,0].eName == C_Global.CEnum.TagName.ERROR_Msg) //{ // MessageBox.Show(resultMsgBody[0,0].oContent.ToString()); // //Application.Exit(); // return; //} //if(resultMsgBody[0,0].oContent.ToString().ToUpper().Equals("SUCESS")) //{ // MessageBox.Show(config.ReadConfigValue("MGM", "MR_Code_Succeed")); //} //this.Close(); }
/// <summary> /// 初始化华文字语言库 /// </summary> private void IntiFontLib() { config = (ConfigValue)m_ClientEvent.GetInfo("INI"); dgTable = new DataTable(); dgTable.Columns.Add("跋"); dgTable.Columns.Add("IndexID"); dgTable.Columns.Add("眀腹"); }
/// <summary> /// 初始化游戏服务器列表 /// </summary> public void InitializeServerIP() { try { this.cbxServerIP.Items.Clear(); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.ServerInfo_GameID; messageBody[0].oContent = m_ClientEvent.GetInfo("GameID_SDO"); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.ServerInfo_GameDBID; messageBody[1].oContent = 1; serverIPResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.SERVERINFO_IP_QUERY, C_Global.CEnum.Msg_Category.COMMON, messageBody); //检测状态 if (serverIPResult[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { MessageBox.Show(serverIPResult[0, 0].oContent.ToString()); return; } //显示内容到列表 for (int i = 0; i < serverIPResult.GetLength(0); i++) { this.cbxServerIP.Items.Add(serverIPResult[i, 1].oContent.ToString()); } if (!_editType) { for (int i = 0; i < serverIPResult.GetLength(0); i++) { if (serverIPResult[i, 1].oContent.ToString().Equals(_serverName)) { cbxServerIP.SelectedIndex = i; } } } cbxServerIP.Enabled = false; } catch { } }
private void FrmPlayerTradeLog_Load(object sender, EventArgs e) { IntiFontLib(); 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 = 1; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_RC"); this.backgroundWorkerServerLoad.RunWorkerAsync(mContent); }
private void Frm_SDO_Status_Load(object sender, EventArgs e) { IntiFontLib(); 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 = 1; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); mServerInfo = Operation_SDO.GetServerList(this.m_ClientEvent, mContent); CmbServer = Operation_SDO.BuildCombox(mServerInfo, CmbServer); }
private void FrmPlayerTrade_Load(object sender, EventArgs e) { //服务器列表 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 = 3; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); mServerInfo = Operation_Kart.GetServerList(this.m_ClientEvent, mContent); CmbServer = Operation_Kart.BuildCombox(mServerInfo, CmbServer); //货币类型 CmbType.Items.Add("M币"); CmbType.Items.Add("G币"); CmbType.Items.Add("所有类型"); CmbType.SelectedIndex = 0; PnlPage.Visible = false; LblTotal.Text = ""; }
private void ReadedMails(int _NotesID) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.NOTES_ID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = _NotesID; mContent[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; mContent[1].eName = C_Global.CEnum.TagName.UserByID; mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[2].eName = CEnum.TagName.Status; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = 0; lock (typeof(C_Event.CSocketEvent)) { mailInfos = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.NOTES_CONTENT_UPDATE, C_Global.CEnum.Msg_Category.NOTES_ADMIN, mContent); } if (mailInfos[0, 0].eName == CEnum.TagName.ERROR_Msg) { //MessageBox.Show(mailInfos[0, 0].oContent.ToString()); //return; } //this.backgroundWorkerMailsStauas.RunWorkerAsync(mContent); }
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 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)); }
C_Global.CEnum.Message_Body[,] doResult = null; //玩家信息列表 #endregion #region 函数 /// <summary> /// 初始化道具所在服务器列表 /// </summary> public void InitializeServerIP() { try { this.cbxServerIP.Items.Clear(); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.ServerInfo_GameID; messageBody[0].oContent = m_ClientEvent.GetInfo("GameID_AU"); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.ServerInfo_GameDBID; messageBody[1].oContent = 2; this.backgroundWorkerFormLoad.RunWorkerAsync(messageBody); //lock (typeof(C_Event.CSocketEvent)) //{ // serverIPResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.SERVERINFO_IP_QUERY, C_Global.CEnum.Msg_Category.COMMON, messageBody); //} ////检测状态 //if (serverIPResult[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) //{ // MessageBox.Show(serverIPResult[0, 0].oContent.ToString()); // //Application.Exit(); // return; //} ////显示内容到列表 //for (int i = 0; i < serverIPResult.GetLength(0); i++) //{ // this.cbxServerIP.Items.Add(serverIPResult[i, 1].oContent.ToString()); //} //cbxServerIP.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void SendReadMails(int _NotesID) { CEnum.Message_Body[] mContent = new CEnum.Message_Body[3]; mContent[0].eName = CEnum.TagName.NOTES_ID; mContent[0].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[0].oContent = _NotesID; mContent[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; mContent[1].eName = C_Global.CEnum.TagName.UserByID; mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); mContent[2].eName = CEnum.TagName.Status; mContent[2].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[2].oContent = 1; this.backgroundWorkerMailsStauas.RunWorkerAsync(mContent); }
/// <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); } }
private void button1_Click(object sender, System.EventArgs e) { string sModuleID = ""; for (int i = 0; i < moduleIDs.Count; i++) { sModuleID += moduleIDs[i].ToString() + ","; } DefaultRoles defaultRols = new DefaultRoles(m_ClientEvent, gmType == 0 ? false : true); sModuleID += defaultRols.GetRoleIDString(); //sModuleID = sModuleID.Substring(1,sModuleID.Length-1); C_Global.CEnum.Message_Body[,] resultMsgBody = null; C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[3]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.UserByID; messageBody[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.User_ID; messageBody[1].oContent = this.userID; messageBody[2].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[2].eName = C_Global.CEnum.TagName.ModuleList; messageBody[2].oContent = sModuleID; resultMsgBody = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.USER_MODULE_UPDATE, C_Global.CEnum.Msg_Category.USER_MODULE_ADMIN, messageBody); //检测状态 if (resultMsgBody[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { MessageBox.Show(resultMsgBody[0, 0].oContent.ToString()); //Application.Exit(); return; } if (resultMsgBody[0, 0].oContent.ToString().ToUpper().Equals("SUCESS")) { MessageBox.Show(config.ReadConfigValue("MGM", "MR_Code_Succeed")); } this.Close(); }
/// <summary> /// 初始化游戏服务器列表 /// </summary> public void InitializeServerIP() { try { this.CmbServer.Items.Clear(); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.ServerInfo_GameID; messageBody[0].oContent = m_ClientEvent.GetInfo("GameID_Soccer"); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.ServerInfo_GameDBID; messageBody[1].oContent = 1; lock (typeof(C_Event.CSocketEvent)) { mServerInfo = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.SERVERINFO_IP_QUERY, C_Global.CEnum.Msg_Category.COMMON, messageBody); } //检测状态 if (mServerInfo[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { MessageBox.Show(mServerInfo[0, 0].oContent.ToString()); return; } //显示内容到列表 for (int i = 0; i < mServerInfo.GetLength(0); i++) { this.CmbServer.Items.Add(mServerInfo[i, 1].oContent.ToString()); } this.CmbServer.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 初始化游戏服务器列表 /// </summary> public void InitializeServerIP() { try { this.cbxServerIP.Items.Clear(); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.ServerInfo_GameID; messageBody[0].oContent = m_ClientEvent.GetInfo("GameID_O2jam2"); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.ServerInfo_GameDBID; messageBody[1].oContent = 1; lock (typeof(C_Event.CSocketEvent)) { serverIPResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.SERVERINFO_IP_QUERY, C_Global.CEnum.Msg_Category.COMMON, messageBody); } //检测状态 if (serverIPResult[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { MessageBox.Show(serverIPResult[0, 0].oContent.ToString()); //Application.Exit(); return; } //显示内容到列表 for (int i = 0; i < serverIPResult.GetLength(0); i++) { this.cbxServerIP.Items.Add(serverIPResult[i, 1].oContent.ToString()); } cbxServerIP.SelectedIndex = 0; } catch { } }
private void Frm_Kart_Board_Load(object sender, EventArgs e) { 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_CR"); mServerInfo = Operation_Kart.GetServerList(this.m_ClientEvent, mContent); CmbServer = Operation_Kart.BuildCombox(mServerInfo, CmbServer); PnlPage.Visible = false; iOperation = 1; TxtCode.Items.Clear(); }
private void Frm_SDO_Trade_Load(object sender, EventArgs e) { IntiFontLib(); 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 = 3; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); this.backgroundWorkerFormLoad.RunWorkerAsync(mContent); //mServerInfo = Operation_SDO.GetServerList(this.m_ClientEvent, mContent); //CmbServer = Operation_SDO.BuildCombox(mServerInfo, CmbServer); //PnlPage.Visible = false; }
private void FrmPlayerBan_Load(object sender, EventArgs e) { 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 = 1; mContent[1].eName = CEnum.TagName.ServerInfo_GameID; mContent[1].eTag = CEnum.TagFormat.TLV_INTEGER; mContent[1].oContent = m_ClientEvent.GetInfo("GameID_SDO"); mServerInfo = Operation_Kart.GetServerList(this.m_ClientEvent, mContent); CmbServer = Operation_Kart.BuildCombox(mServerInfo, CmbServer); LblUser.Text = ""; PnlInput.Visible = true; GrdList.DataSource = null; PnlPage.Visible = false; }
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); }
/// <summary> /// 修改玩家信息 /// </summary> private void ResetIDCard() { 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.CARD_username; messageBody[0].oContent = mResult[0, 1].oContent.ToString(); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.UserByID; messageBody[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); modiInfoResult = m_ClientEvent.RequestResult(CEnum.ServiceKey.CARD_USERINFO_CLEAR, C_Global.CEnum.Msg_Category.CARD_ADMIN, messageBody); if (modiInfoResult[0, 0].eName == CEnum.TagName.ERROR_Msg) { MessageBox.Show(modiInfoResult[0, 0].oContent.ToString()); return; } if (modiInfoResult[0, 0].oContent.ToString().Equals("FAILURE")) { MessageBox.Show("重置玩家的身份证及其类型失败"); return; } if (modiInfoResult[0, 0].oContent.ToString().Equals("SUCCESS")) { MessageBox.Show("重置玩家的身份证及其类型成功"); ReadInfo(); return; } } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
/// <summary> /// 初始化帐号服务器列表 /// </summary> public void InitializeAccountServerIP() { try { this.cbxServerIP.Items.Clear(); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.ServerInfo_GameID; messageBody[0].oContent = m_ClientEvent.GetInfo("GameID_AU"); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.ServerInfo_GameDBID; messageBody[1].oContent = 2; accountServerIPResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.SERVERINFO_IP_QUERY, C_Global.CEnum.Msg_Category.COMMON, messageBody); //检测状态 if (accountServerIPResult[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { //游戏列表为空错误信息 //MessageBox.Show(serverIPResult[0, 0].oContent.ToString()); //Application.Exit(); return; } //显示内容到列表 for (int i = 0; i < accountServerIPResult.GetLength(0); i++) { this.cbxServerIP.Items.Add(accountServerIPResult[i, 1].oContent.ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 添加部门 /// </summary> private void AddNewDepart() { C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[4]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.UserByID; messageBody[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[1].eName = C_Global.CEnum.TagName.DepartName; messageBody[1].oContent = txtDeptName.Text; messageBody[2].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[2].eName = C_Global.CEnum.TagName.DepartRemark; messageBody[2].oContent = txtRemark.Text; messageBody[3].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[3].eName = C_Global.CEnum.TagName.GameContent; messageBody[3].oContent = gameRoles; createResult = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.DEPARTMENT_CREATE, C_Global.CEnum.Msg_Category.USER_ADMIN, messageBody); if (createResult[0, 0].oContent.Equals("FAILURE")) { MessageBox.Show(config.ReadConfigValue("MGM", "ND_Code_CreatFailed")); return; } if (createResult[0, 0].oContent.Equals("SUCESS")) { GetDepartmentList(); dpSet.Visible = false; dpVerticalLine.Visible = false; MessageBox.Show(config.ReadConfigValue("MGM", "ND_Code_CreatSucceed")); return; } }
private void BugList_Load(object sender, EventArgs e) { IntiFontLib(); this.groupBoxBugInfo.Enabled = false; this.groupBoxBugView.Enabled = false; this.Cursor = Cursors.WaitCursor; this.userID = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[1]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.User_ID; messageBody[0].oContent = userID; this.backgroundWorkerFormLoad.RunWorkerAsync(messageBody); }
/// <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); } }
/// <summary> /// 执行存储默认权限 /// </summary> /// <param name="userID"></param> /// <returns></returns> public bool InsertDefaultRols(int userID) { //执行结果状态 bool result = true; //获取权限id int[] roleIDs = GetRoleID(); //组合权限值 string sModuleID = ""; for (int i = 0; i < roleIDs.Length; i++) { sModuleID += roleIDs[i].ToString() + ","; } C_Global.CEnum.Message_Body[,] resultMsgBody = null; C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[3]; messageBody[0].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[0].eName = C_Global.CEnum.TagName.UserByID; messageBody[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString()); messageBody[1].eTag = C_Global.CEnum.TagFormat.TLV_INTEGER; messageBody[1].eName = C_Global.CEnum.TagName.User_ID; messageBody[1].oContent = userID; messageBody[2].eTag = C_Global.CEnum.TagFormat.TLV_STRING; messageBody[2].eName = C_Global.CEnum.TagName.ModuleList; messageBody[2].oContent = sModuleID; resultMsgBody = m_ClientEvent.RequestResult(C_Global.CEnum.ServiceKey.USER_MODULE_UPDATE, C_Global.CEnum.Msg_Category.USER_MODULE_ADMIN, messageBody); if (resultMsgBody[0, 0].eName == C_Global.CEnum.TagName.ERROR_Msg) { result = false; } if (resultMsgBody[0, 0].oContent.ToString().ToUpper().Equals("SUCESS")) { result = true; } return(result); }
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); }