private void lstv_xbAcc_SelectedIndexChanged(object sender, EventArgs e) { if (lstv_xbAcc.SelectedIndices != null && lstv_xbAcc.SelectedIndices.Count > 0) { lstv_xbAcc.Items[xbPlayersInfoSltIndex].BackColor = Color.Transparent; xbPlayersInfoSltIndex = this.lstv_xbAcc.SelectedItems[0].Index; lstv_xbAcc.Items[xbPlayersInfoSltIndex].BackColor = Color.Pink; txt_xbAccount.Text = lstv_xbAcc.Items[xbPlayersInfoSltIndex].SubItems[0].Text; txt_xbName.Text = lstv_xbAcc.Items[xbPlayersInfoSltIndex].SubItems[1].Text; //查询代币 txt_dbCurr.Text = "" + CSGHelper.SelectAcountPoint(txt_xbAccount.Text); } }
private void lstv_xblog_SelectedIndexChanged(object sender, EventArgs e) { // if (lstv_xblog.SelectedIndices != null && lstv_xblog.SelectedIndices.Count > 0) { lstv_xblog.Items[xblogSltIndex].BackColor = Color.Transparent; xblogSltIndex = this.lstv_xblog.SelectedItems[0].Index; lstv_xblog.Items[xblogSltIndex].BackColor = Color.Pink; txt_xbAccount.Text = lstv_xblog.Items[xblogSltIndex].SubItems[0].Text; txt_xbName.Text = lstv_xblog.Items[xblogSltIndex].SubItems[1].Text; txt_xbId1.Text = lstv_xblog.Items[xblogSltIndex].SubItems[2].Text; txt_xbName1.Text = lstv_xblog.Items[xblogSltIndex].SubItems[3].Text; txt_xbCount1.Text = lstv_xblog.Items[xblogSltIndex].SubItems[4].Text; txt_xbId2.Text = lstv_xblog.Items[xblogSltIndex].SubItems[5].Text; txt_xbName2.Text = lstv_xblog.Items[xblogSltIndex].SubItems[6].Text; txt_xbCount2.Text = lstv_xblog.Items[xblogSltIndex].SubItems[7].Text; txt_xbId3.Text = lstv_xblog.Items[xblogSltIndex].SubItems[8].Text; txt_xbName3.Text = lstv_xblog.Items[xblogSltIndex].SubItems[9].Text; txt_xbCount3.Text = lstv_xblog.Items[xblogSltIndex].SubItems[10].Text; txt_xbId4.Text = lstv_xblog.Items[xblogSltIndex].SubItems[11].Text; txt_xbName4.Text = lstv_xblog.Items[xblogSltIndex].SubItems[12].Text; txt_xbCount4.Text = lstv_xblog.Items[xblogSltIndex].SubItems[13].Text; txt_xbId5.Text = lstv_xblog.Items[xblogSltIndex].SubItems[14].Text; txt_xbName5.Text = lstv_xblog.Items[xblogSltIndex].SubItems[15].Text; txt_xbCount5.Text = lstv_xblog.Items[xblogSltIndex].SubItems[16].Text; txt_xbId6.Text = ""; txt_xbName6.Text = ""; txt_xbCount6.Text = ""; txt_xbId7.Text = ""; txt_xbName7.Text = ""; txt_xbCount7.Text = ""; txt_xbId8.Text = ""; txt_xbName8.Text = ""; txt_xbCount8.Text = ""; txt_xbId9.Text = ""; txt_xbName9.Text = ""; txt_xbCount9.Text = ""; txt_xbId10.Text = ""; txt_xbName10.Text = ""; txt_xbCount10.Text = ""; //查询代币 txt_dbCurr.Text = "" + CSGHelper.SelectAcountPoint(txt_xbAccount.Text); } }
private void btn_bxSend_Click(object sender, EventArgs e) { if (!m_Active) { MessageBox.Show("软件尚未激活! 请联系软件发布人给予激活!"); return; } if (txt_xbAccount.Text != string.Empty) { int xbCount1 = 0; int xbCount2 = 0; int xbCount3 = 0; int xbCount4 = 0; int xbCount5 = 0; int xbCount6 = 0; int xbCount7 = 0; int xbCount8 = 0; int xbCount9 = 0; int xbCount10 = 0; int xbId1 = 1; int xbId2 = 1; int xbId3 = 1; int xbId4 = 1; int xbId5 = 1; int xbId6 = 1; int xbId7 = 1; int xbId8 = 1; int xbId9 = 1; int xbId10 = 1; if (!string.IsNullOrEmpty(txt_xbCount1.Text) || CFormat.isNumberic(txt_xbCount1.Text)) { xbCount1 = Convert.ToInt32(txt_xbCount1.Text); } if (!string.IsNullOrEmpty(txt_xbCount2.Text) || CFormat.isNumberic(txt_xbCount2.Text)) { xbCount2 = Convert.ToInt32(txt_xbCount2.Text); } if (!string.IsNullOrEmpty(txt_xbCount3.Text) || CFormat.isNumberic(txt_xbCount3.Text)) { xbCount3 = Convert.ToInt32(txt_xbCount3.Text); } if (!string.IsNullOrEmpty(txt_xbCount4.Text) || CFormat.isNumberic(txt_xbCount4.Text)) { xbCount4 = Convert.ToInt32(txt_xbCount4.Text); } if (!string.IsNullOrEmpty(txt_xbCount5.Text) || CFormat.isNumberic(txt_xbCount5.Text)) { xbCount5 = Convert.ToInt32(txt_xbCount5.Text); } if (!string.IsNullOrEmpty(txt_xbCount6.Text) || CFormat.isNumberic(txt_xbCount6.Text)) { xbCount6 = Convert.ToInt32(txt_xbCount6.Text); } if (!string.IsNullOrEmpty(txt_xbCount7.Text) || CFormat.isNumberic(txt_xbCount7.Text)) { xbCount7 = Convert.ToInt32(txt_xbCount7.Text); } if (!string.IsNullOrEmpty(txt_xbCount8.Text) || CFormat.isNumberic(txt_xbCount8.Text)) { xbCount8 = Convert.ToInt32(txt_xbCount8.Text); } if (!string.IsNullOrEmpty(txt_xbCount9.Text) || CFormat.isNumberic(txt_xbCount9.Text)) { xbCount9 = Convert.ToInt32(txt_xbCount9.Text); } if (!string.IsNullOrEmpty(txt_xbCount10.Text) || CFormat.isNumberic(txt_xbCount10.Text)) { xbCount10 = Convert.ToInt32(txt_xbCount10.Text); } if (!string.IsNullOrEmpty(txt_xbId1.Text) || CFormat.isNumberic(txt_xbId1.Text)) { xbId1 = Convert.ToInt32(txt_xbId1.Text); if (xbId1 == 0) { xbId1 = 1; xbCount1 = 0; } } if (!string.IsNullOrEmpty(txt_xbId2.Text) || CFormat.isNumberic(txt_xbId2.Text)) { xbId2 = Convert.ToInt32(txt_xbId2.Text); if (xbId2 == 0) { xbId2 = 1; xbCount2 = 0; } } if (!string.IsNullOrEmpty(txt_xbId3.Text) || CFormat.isNumberic(txt_xbId3.Text)) { xbId3 = Convert.ToInt32(txt_xbId3.Text); if (xbId3 == 0) { xbId3 = 1; xbCount3 = 0; } } if (!string.IsNullOrEmpty(txt_xbId4.Text) || CFormat.isNumberic(txt_xbId4.Text)) { xbId4 = Convert.ToInt32(txt_xbId4.Text); if (xbId4 == 0) { xbId4 = 1; xbCount4 = 0; } } if (!string.IsNullOrEmpty(txt_xbId5.Text) || CFormat.isNumberic(txt_xbId5.Text)) { xbId5 = Convert.ToInt32(txt_xbId5.Text); if (xbId5 == 0) { xbId5 = 1; xbCount5 = 0; } } if (!string.IsNullOrEmpty(txt_xbId6.Text) || CFormat.isNumberic(txt_xbId6.Text)) { xbId6 = Convert.ToInt32(txt_xbId6.Text); if (xbId6 == 0) { xbId6 = 1; xbCount6 = 0; } } if (!string.IsNullOrEmpty(txt_xbId7.Text) || CFormat.isNumberic(txt_xbId7.Text)) { xbId7 = Convert.ToInt32(txt_xbId7.Text); if (xbId7 == 0) { xbId7 = 1; xbCount7 = 0; } } if (!string.IsNullOrEmpty(txt_xbId8.Text) || CFormat.isNumberic(txt_xbId8.Text)) { xbId8 = Convert.ToInt32(txt_xbId8.Text); if (xbId8 == 0) { xbId8 = 1; xbCount8 = 0; } } if (!string.IsNullOrEmpty(txt_xbId9.Text) || CFormat.isNumberic(txt_xbId9.Text)) { xbId9 = Convert.ToInt32(txt_xbId9.Text); if (xbId9 == 0) { xbId9 = 1; xbCount9 = 0; } } if (!string.IsNullOrEmpty(txt_xbId10.Text) || CFormat.isNumberic(txt_xbId10.Text)) { xbId10 = Convert.ToInt32(txt_xbId10.Text); if (xbId10 == 0) { xbId10 = 1; xbCount10 = 0; } } string msg = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n" + "代币:" + txt_dbSend.Text + "\n"; if (txt_xbId1.Text != "" && xbCount1 != 0) { msg += "物品:" + txt_xbName1.Text + "\t数量:" + txt_xbCount1.Text + "\t\n"; } if (txt_xbId2.Text != "" && xbCount2 != 0) { msg += "物品:" + txt_xbName2.Text + "\t数量:" + txt_xbCount2.Text + "\t\n"; } if (txt_xbId3.Text != "" && xbCount3 != 0) { msg += "物品:" + txt_xbName3.Text + "\t数量:" + txt_xbCount3.Text + "\t\n"; } if (txt_xbId4.Text != "" && xbCount4 != 0) { msg += "物品:" + txt_xbName4.Text + "\t数量:" + txt_xbCount4.Text + "\t\n"; } if (txt_xbId5.Text != "" && xbCount5 != 0) { msg += "物品:" + txt_xbName5.Text + "\t数量:" + txt_xbCount5.Text + "\t\n"; } if (txt_xbId6.Text != "" && xbCount6 != 0) { msg += "物品:" + txt_xbName6.Text + "\t数量:" + txt_xbCount6.Text + "\t\n"; } if (txt_xbId7.Text != "" && xbCount7 != 0) { msg += "物品:" + txt_xbName7.Text + "\t数量:" + txt_xbCount7.Text + "\t\n"; } if (txt_xbId8.Text != "" && xbCount8 != 0) { msg += "物品:" + txt_xbName8.Text + "\t数量:" + txt_xbCount8.Text + "\t\n"; } if (txt_xbId9.Text != "" && xbCount9 != 0) { msg += "物品:" + txt_xbName9.Text + "\t数量:" + txt_xbCount9.Text + "\t\n"; } if (txt_xbId10.Text != "" && xbCount10 != 0) { msg += "物品:" + txt_xbName10.Text + "\t数量:" + txt_xbCount10.Text + "\t\n"; } msg += "\n确认信息无误?"; DialogResult dr = MessageBox.Show(msg, "对话框标题", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr != DialogResult.OK) { return; } //确保有效 if ((txt_xbId1.Text == "" || xbCount1 == 0) && (txt_xbId2.Text == "" || xbCount2 == 0) && (txt_xbId3.Text == "" || xbCount3 == 0) && (txt_xbId4.Text == "" || xbCount4 == 0) && (txt_xbId5.Text == "" || xbCount5 == 0)) { } else { string cmd = "INSERT INTO " + txt_sanvtName.Text + @".dbo.vitem (Account,Disable,Card,Login_time,Get_time,SName,CharName,Type," + "DataID1,Number1,DataID2,Number2,DataID3,Number3,DataID4,Number4,DataID5,Number5)" + "values ('" + txt_xbAccount.Text + "',0,CONVERT(varchar(100), GETDATE(), 21),getdate(),getdate(),0,0,0," + xbId1 + "," + xbCount1 + "," + xbId2 + "," + xbCount2 + "," + xbId3 + "," + xbCount3 + "," + xbId4 + "," + xbCount4 + "," + xbId5 + "," + xbCount5 + ")"; string ret = CSGHelper.SqlCommand(cmd); if (ret == "success") { SGExHandle.WriteXbLog(txt_xbAccount.Text + "\t" + txt_xbName.Text + "\t" + txt_xbId1.Text + "\t" + txt_xbName1.Text + "\t" + txt_xbCount1.Text + "\t" + txt_xbId2.Text + "\t" + txt_xbName2.Text + "\t" + txt_xbCount2.Text + "\t" + txt_xbId4.Text + "\t" + txt_xbName3.Text + "\t" + txt_xbCount3.Text + "\t" + txt_xbId5.Text + "\t" + txt_xbName4.Text + "\t" + txt_xbCount4.Text + "\t" + txt_xbId6.Text + "\t" + txt_xbName5.Text + "\t" + txt_xbCount5.Text + "\t"); ListViewItem lvi = new ListViewItem(); lvi.Text = txt_xbAccount.Text; lvi.SubItems.Add(txt_xbName.Text); lvi.SubItems.Add(txt_xbId1.Text); lvi.SubItems.Add(txt_xbName1.Text); lvi.SubItems.Add(txt_xbCount1.Text); lvi.SubItems.Add(txt_xbId2.Text); lvi.SubItems.Add(txt_xbName2.Text); lvi.SubItems.Add(txt_xbCount2.Text); lvi.SubItems.Add(txt_xbId3.Text); lvi.SubItems.Add(txt_xbName3.Text); lvi.SubItems.Add(txt_xbCount3.Text); lvi.SubItems.Add(txt_xbId4.Text); lvi.SubItems.Add(txt_xbName4.Text); lvi.SubItems.Add(txt_xbCount4.Text); lvi.SubItems.Add(txt_xbId5.Text); lvi.SubItems.Add(txt_xbName5.Text); lvi.SubItems.Add(txt_xbCount5.Text); lstv_xblog.Items.Add(lvi); } else { string msg2 = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n"; if (txt_xbId1.Text != "" && xbCount1 != 0) { msg += "物品:" + txt_xbName1.Text + "\t数量:" + txt_xbCount1.Text + "\t\n"; } if (txt_xbId2.Text != "" && xbCount2 != 0) { msg += "物品:" + txt_xbName2.Text + "\t数量:" + txt_xbCount2.Text + "\t\n"; } if (txt_xbId3.Text != "" && xbCount3 != 0) { msg += "物品:" + txt_xbName3.Text + "\t数量:" + txt_xbCount3.Text + "\t\n"; } if (txt_xbId4.Text != "" && xbCount4 != 0) { msg += "物品:" + txt_xbName4.Text + "\t数量:" + txt_xbCount4.Text + "\t\n"; } if (txt_xbId5.Text != "" && xbCount5 != 0) { msg += "物品:" + txt_xbName5.Text + "\t数量:" + txt_xbCount5.Text + "\t\n"; } MessageBox.Show("发送失败,\t\n" + msg2); } } Thread.Sleep(200); if ((txt_xbId6.Text == "" || xbCount6 == 0) && (txt_xbId7.Text == "" || xbCount7 == 0) && (txt_xbId8.Text == "" || xbCount8 == 0) && (txt_xbId9.Text == "" || xbCount9 == 0) && (txt_xbId10.Text == "" || xbCount10 == 0)) { } else { string cmd = "INSERT INTO " + txt_sanvtName.Text + @".dbo.vitem (Account,Disable,Card,Login_time,Get_time,SName,CharName,Type," + "DataID1,Number1,DataID2,Number2,DataID3,Number3,DataID4,Number4,DataID5,Number5)" + "values ('" + txt_xbAccount.Text + "',0,CONVERT(varchar(100), GETDATE(), 21),getdate(),getdate(),0,0,0," + xbId6 + "," + xbCount6 + "," + xbId7 + "," + xbCount7 + "," + xbId8 + "," + xbCount8 + "," + xbId9 + "," + xbCount9 + "," + xbId10 + "," + xbCount10 + ")"; string ret = CSGHelper.SqlCommand(cmd); if (ret == "success") { SGExHandle.WriteXbLog(txt_xbAccount.Text + "\t" + txt_xbName.Text + "\t" + txt_xbId6.Text + "\t" + txt_xbName6.Text + "\t" + txt_xbCount6.Text + "\t" + txt_xbId7.Text + "\t" + txt_xbName7.Text + "\t" + txt_xbCount7.Text + "\t" + txt_xbId8.Text + "\t" + txt_xbName8.Text + "\t" + txt_xbCount8.Text + "\t" + txt_xbId9.Text + "\t" + txt_xbName9.Text + "\t" + txt_xbCount9.Text + "\t" + txt_xbId10.Text + "\t" + txt_xbName10.Text + "\t" + txt_xbCount10.Text + "\t"); ListViewItem lvi = new ListViewItem(); lvi.Text = txt_xbAccount.Text; lvi.SubItems.Add(txt_xbName.Text); lvi.SubItems.Add(txt_xbId6.Text); lvi.SubItems.Add(txt_xbName6.Text); lvi.SubItems.Add(txt_xbCount6.Text); lvi.SubItems.Add(txt_xbId7.Text); lvi.SubItems.Add(txt_xbName7.Text); lvi.SubItems.Add(txt_xbCount7.Text); lvi.SubItems.Add(txt_xbId8.Text); lvi.SubItems.Add(txt_xbName8.Text); lvi.SubItems.Add(txt_xbCount8.Text); lvi.SubItems.Add(txt_xbId9.Text); lvi.SubItems.Add(txt_xbName9.Text); lvi.SubItems.Add(txt_xbCount9.Text); lvi.SubItems.Add(txt_xbId10.Text); lvi.SubItems.Add(txt_xbName10.Text); lvi.SubItems.Add(txt_xbCount10.Text); lstv_xblog.Items.Add(lvi); } else { string msg2 = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n"; if (txt_xbId6.Text != "" && xbCount6 != 0) { msg += "物品:" + txt_xbName6.Text + "\t数量:" + txt_xbCount6.Text + "\t\n"; } if (txt_xbId7.Text != "" && xbCount7 != 0) { msg += "物品:" + txt_xbName7.Text + "\t数量:" + txt_xbCount7.Text + "\t\n"; } if (txt_xbId8.Text != "" && xbCount8 != 0) { msg += "物品:" + txt_xbName8.Text + "\t数量:" + txt_xbCount8.Text + "\t\n"; } if (txt_xbId9.Text != "" && xbCount9 != 0) { msg += "物品:" + txt_xbName9.Text + "\t数量:" + txt_xbCount9.Text + "\t\n"; } if (txt_xbId10.Text != "" && xbCount10 != 0) { msg += "物品:" + txt_xbName10.Text + "\t数量:" + txt_xbCount10.Text + "\t\n"; } MessageBox.Show("发送失败,\t\n" + msg2); } } Thread.Sleep(200); //代币 if (!string.IsNullOrEmpty(txt_dbSend.Text) && CFormat.isNumberic(txt_dbSend.Text)) { int dbCount = Convert.ToInt32(txt_dbSend.Text); if (dbCount > 0) { //虚宝增加 string cmd = "DECLARE @account varchar(21) \n" + "DECLARE @point int \n" + "DECLARE @old_point int \n" + "DECLARE @new_point int \n" + "set @account = '" + txt_xbAccount.Text + "' \n" + "set @point = " + dbCount + " \n" + "Select @old_point=point from dbo.game_acc where account = @account \n" + "SET @new_point = @point + @old_point \n" + "Update dbo.game_acc set point = @new_point where account = @account"; string ret = CSGHelper.SqlCommand(cmd); if (ret == "success") { txt_dbCurr.Text = "" + CSGHelper.SelectAcountPoint(txt_xbAccount.Text); } else { MessageBox.Show("发送代币失败,代币:" + dbCount); } } } if (cbx_xbconf.Text == "新人起步") { m_SGExHandle.SendWorldWords("新人玩家 " + txt_xbName.Text + " 的新手起步已经发放,请到大鸿胪处领取虚宝,欢迎加入大家庭,祝游戏愉快。"); } } else { MessageBox.Show("请核对发放帐号!"); } }
private void btn_bxSend_Click(object sender, EventArgs e) { if (!m_Active) { MessageBox.Show("软件尚未激活! 请联系软件发布人给予激活!"); return; } if (txt_xbAccount.Text != string.Empty) { int xbCount1 = 0; int xbCount2 = 0; int xbCount3 = 0; int xbCount4 = 0; int xbCount5 = 0; int xbCount6 = 0; int xbCount7 = 0; int xbCount8 = 0; int xbCount9 = 0; int xbCount10 = 0; int xbId1 = 1; int xbId2 = 1; int xbId3 = 1; int xbId4 = 1; int xbId5 = 1; int xbId6 = 1; int xbId7 = 1; int xbId8 = 1; int xbId9 = 1; int xbId10 = 1; if (!string.IsNullOrEmpty(txt_xbCount1.Text) || CFormat.isNumberic(txt_xbCount1.Text)) { xbCount1 = Convert.ToInt32(txt_xbCount1.Text); } if (!string.IsNullOrEmpty(txt_xbCount2.Text) || CFormat.isNumberic(txt_xbCount2.Text)) { xbCount2 = Convert.ToInt32(txt_xbCount2.Text); } if (!string.IsNullOrEmpty(txt_xbCount3.Text) || CFormat.isNumberic(txt_xbCount3.Text)) { xbCount3 = Convert.ToInt32(txt_xbCount3.Text); } if (!string.IsNullOrEmpty(txt_xbCount4.Text) || CFormat.isNumberic(txt_xbCount4.Text)) { xbCount4 = Convert.ToInt32(txt_xbCount4.Text); } if (!string.IsNullOrEmpty(txt_xbCount5.Text) || CFormat.isNumberic(txt_xbCount5.Text)) { xbCount5 = Convert.ToInt32(txt_xbCount5.Text); } if (!string.IsNullOrEmpty(txt_xbCount6.Text) || CFormat.isNumberic(txt_xbCount6.Text)) { xbCount6 = Convert.ToInt32(txt_xbCount6.Text); } if (!string.IsNullOrEmpty(txt_xbCount7.Text) || CFormat.isNumberic(txt_xbCount7.Text)) { xbCount7 = Convert.ToInt32(txt_xbCount7.Text); } if (!string.IsNullOrEmpty(txt_xbCount8.Text) || CFormat.isNumberic(txt_xbCount8.Text)) { xbCount8 = Convert.ToInt32(txt_xbCount8.Text); } if (!string.IsNullOrEmpty(txt_xbCount9.Text) || CFormat.isNumberic(txt_xbCount9.Text)) { xbCount9 = Convert.ToInt32(txt_xbCount9.Text); } if (!string.IsNullOrEmpty(txt_xbCount10.Text) || CFormat.isNumberic(txt_xbCount10.Text)) { xbCount10 = Convert.ToInt32(txt_xbCount10.Text); } if (!string.IsNullOrEmpty(txt_xbId1.Text) || CFormat.isNumberic(txt_xbId1.Text)) { xbId1 = Convert.ToInt32(txt_xbId1.Text); if (xbId1 == 0) { xbId1 = 1; xbCount1 = 0; } } if (!string.IsNullOrEmpty(txt_xbId2.Text) || CFormat.isNumberic(txt_xbId2.Text)) { xbId2 = Convert.ToInt32(txt_xbId2.Text); if (xbId2 == 0) { xbId2 = 1; xbCount2 = 0; } } if (!string.IsNullOrEmpty(txt_xbId3.Text) || CFormat.isNumberic(txt_xbId3.Text)) { xbId3 = Convert.ToInt32(txt_xbId3.Text); if (xbId3 == 0) { xbId3 = 1; xbCount3 = 0; } } if (!string.IsNullOrEmpty(txt_xbId4.Text) || CFormat.isNumberic(txt_xbId4.Text)) { xbId4 = Convert.ToInt32(txt_xbId4.Text); if (xbId4 == 0) { xbId4 = 1; xbCount4 = 0; } } if (!string.IsNullOrEmpty(txt_xbId5.Text) || CFormat.isNumberic(txt_xbId5.Text)) { xbId5 = Convert.ToInt32(txt_xbId5.Text); if (xbId5 == 0) { xbId5 = 1; xbCount5 = 0; } } if (!string.IsNullOrEmpty(txt_xbId6.Text) || CFormat.isNumberic(txt_xbId6.Text)) { xbId6 = Convert.ToInt32(txt_xbId6.Text); if (xbId6 == 0) { xbId6 = 1; xbCount6 = 0; } } if (!string.IsNullOrEmpty(txt_xbId7.Text) || CFormat.isNumberic(txt_xbId7.Text)) { xbId7 = Convert.ToInt32(txt_xbId7.Text); if (xbId7 == 0) { xbId7 = 1; xbCount7 = 0; } } if (!string.IsNullOrEmpty(txt_xbId8.Text) || CFormat.isNumberic(txt_xbId8.Text)) { xbId8 = Convert.ToInt32(txt_xbId8.Text); if (xbId8 == 0) { xbId8 = 1; xbCount8 = 0; } } if (!string.IsNullOrEmpty(txt_xbId9.Text) || CFormat.isNumberic(txt_xbId9.Text)) { xbId9 = Convert.ToInt32(txt_xbId9.Text); if (xbId9 == 0) { xbId9 = 1; xbCount9 = 0; } } if (!string.IsNullOrEmpty(txt_xbId10.Text) || CFormat.isNumberic(txt_xbId10.Text)) { xbId10 = Convert.ToInt32(txt_xbId10.Text); if (xbId10 == 0) { xbId10 = 1; xbCount10 = 0; } } string msg = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n" + "代币:" + txt_dbSend.Text + "\n"; if (txt_xbId1.Text != "" && xbCount1 != 0) { msg += "物品:" + txt_xbName1.Text + "\t数量:" + txt_xbCount1.Text + "\t\n"; } if (txt_xbId2.Text != "" && xbCount2 != 0) { msg += "物品:" + txt_xbName2.Text + "\t数量:" + txt_xbCount2.Text + "\t\n"; } if (txt_xbId3.Text != "" && xbCount3 != 0) { msg += "物品:" + txt_xbName3.Text + "\t数量:" + txt_xbCount3.Text + "\t\n"; } if (txt_xbId4.Text != "" && xbCount4 != 0) { msg += "物品:" + txt_xbName4.Text + "\t数量:" + txt_xbCount4.Text + "\t\n"; } if (txt_xbId5.Text != "" && xbCount5 != 0) { msg += "物品:" + txt_xbName5.Text + "\t数量:" + txt_xbCount5.Text + "\t\n"; } if (txt_xbId6.Text != "" && xbCount6 != 0) { msg += "物品:" + txt_xbName6.Text + "\t数量:" + txt_xbCount6.Text + "\t\n"; } if (txt_xbId7.Text != "" && xbCount7 != 0) { msg += "物品:" + txt_xbName7.Text + "\t数量:" + txt_xbCount7.Text + "\t\n"; } if (txt_xbId8.Text != "" && xbCount8 != 0) { msg += "物品:" + txt_xbName8.Text + "\t数量:" + txt_xbCount8.Text + "\t\n"; } if (txt_xbId9.Text != "" && xbCount9 != 0) { msg += "物品:" + txt_xbName9.Text + "\t数量:" + txt_xbCount9.Text + "\t\n"; } if (txt_xbId10.Text != "" && xbCount10 != 0) { msg += "物品:" + txt_xbName10.Text + "\t数量:" + txt_xbCount10.Text + "\t\n"; } msg += "\n确认信息无误?"; DialogResult dr = MessageBox.Show(msg, "对话框标题", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr != DialogResult.OK) { return; } //确保有效 if ((txt_xbId1.Text == "" || xbCount1 == 0) && (txt_xbId2.Text == "" || xbCount2 == 0) && (txt_xbId3.Text == "" || xbCount3 == 0) && (txt_xbId4.Text == "" || xbCount4 == 0) && (txt_xbId5.Text == "" || xbCount5 == 0)) { } else { bool result = CSGHelper.InsertSanvtItem(txt_xbAccount.Text , (uint)xbId1, (uint)xbCount1, (uint)xbId2, (uint)xbCount2, (uint)xbId3, (uint)xbCount3 , (uint)xbId4, (uint)xbCount4, (uint)xbId5, (uint)xbCount5); if (result) { SGExHandle.WriteXbLog(txt_xbAccount.Text + "\t" + txt_xbName.Text + "\t" + txt_xbId1.Text + "\t" + txt_xbName1.Text + "\t" + txt_xbCount1.Text + "\t" + txt_xbId2.Text + "\t" + txt_xbName2.Text + "\t" + txt_xbCount2.Text + "\t" + txt_xbId4.Text + "\t" + txt_xbName3.Text + "\t" + txt_xbCount3.Text + "\t" + txt_xbId5.Text + "\t" + txt_xbName4.Text + "\t" + txt_xbCount4.Text + "\t" + txt_xbId6.Text + "\t" + txt_xbName5.Text + "\t" + txt_xbCount5.Text + "\t"); ListViewItem lvi = new ListViewItem(); lvi.Text = txt_xbAccount.Text; lvi.SubItems.Add(txt_xbName.Text); lvi.SubItems.Add(txt_xbId1.Text); lvi.SubItems.Add(txt_xbName1.Text); lvi.SubItems.Add(txt_xbCount1.Text); lvi.SubItems.Add(txt_xbId2.Text); lvi.SubItems.Add(txt_xbName2.Text); lvi.SubItems.Add(txt_xbCount2.Text); lvi.SubItems.Add(txt_xbId3.Text); lvi.SubItems.Add(txt_xbName3.Text); lvi.SubItems.Add(txt_xbCount3.Text); lvi.SubItems.Add(txt_xbId4.Text); lvi.SubItems.Add(txt_xbName4.Text); lvi.SubItems.Add(txt_xbCount4.Text); lvi.SubItems.Add(txt_xbId5.Text); lvi.SubItems.Add(txt_xbName5.Text); lvi.SubItems.Add(txt_xbCount5.Text); lstv_xblog.Items.Add(lvi); } else { string msg2 = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n"; if (txt_xbId1.Text != "" && xbCount1 != 0) { msg += "物品:" + txt_xbName1.Text + "\t数量:" + txt_xbCount1.Text + "\t\n"; } if (txt_xbId2.Text != "" && xbCount2 != 0) { msg += "物品:" + txt_xbName2.Text + "\t数量:" + txt_xbCount2.Text + "\t\n"; } if (txt_xbId3.Text != "" && xbCount3 != 0) { msg += "物品:" + txt_xbName3.Text + "\t数量:" + txt_xbCount3.Text + "\t\n"; } if (txt_xbId4.Text != "" && xbCount4 != 0) { msg += "物品:" + txt_xbName4.Text + "\t数量:" + txt_xbCount4.Text + "\t\n"; } if (txt_xbId5.Text != "" && xbCount5 != 0) { msg += "物品:" + txt_xbName5.Text + "\t数量:" + txt_xbCount5.Text + "\t\n"; } MessageBox.Show("发送失败,\t\n" + msg2); } } Thread.Sleep(200); if ((txt_xbId6.Text == "" || xbCount6 == 0) && (txt_xbId7.Text == "" || xbCount7 == 0) && (txt_xbId8.Text == "" || xbCount8 == 0) && (txt_xbId9.Text == "" || xbCount9 == 0) && (txt_xbId10.Text == "" || xbCount10 == 0)) { } else { bool result = CSGHelper.InsertSanvtItem(txt_xbAccount.Text , (uint)xbId6, (uint)xbCount6, (uint)xbId7, (uint)xbCount7, (uint)xbId8, (uint)xbCount8 , (uint)xbId9, (uint)xbCount9, (uint)xbId10, (uint)xbCount10); if (result) { SGExHandle.WriteXbLog(txt_xbAccount.Text + "\t" + txt_xbName.Text + "\t" + txt_xbId6.Text + "\t" + txt_xbName6.Text + "\t" + txt_xbCount6.Text + "\t" + txt_xbId7.Text + "\t" + txt_xbName7.Text + "\t" + txt_xbCount7.Text + "\t" + txt_xbId8.Text + "\t" + txt_xbName8.Text + "\t" + txt_xbCount8.Text + "\t" + txt_xbId9.Text + "\t" + txt_xbName9.Text + "\t" + txt_xbCount9.Text + "\t" + txt_xbId10.Text + "\t" + txt_xbName10.Text + "\t" + txt_xbCount10.Text + "\t"); ListViewItem lvi = new ListViewItem(); lvi.Text = txt_xbAccount.Text; lvi.SubItems.Add(txt_xbName.Text); lvi.SubItems.Add(txt_xbId6.Text); lvi.SubItems.Add(txt_xbName6.Text); lvi.SubItems.Add(txt_xbCount6.Text); lvi.SubItems.Add(txt_xbId7.Text); lvi.SubItems.Add(txt_xbName7.Text); lvi.SubItems.Add(txt_xbCount7.Text); lvi.SubItems.Add(txt_xbId8.Text); lvi.SubItems.Add(txt_xbName8.Text); lvi.SubItems.Add(txt_xbCount8.Text); lvi.SubItems.Add(txt_xbId9.Text); lvi.SubItems.Add(txt_xbName9.Text); lvi.SubItems.Add(txt_xbCount9.Text); lvi.SubItems.Add(txt_xbId10.Text); lvi.SubItems.Add(txt_xbName10.Text); lvi.SubItems.Add(txt_xbCount10.Text); lstv_xblog.Items.Add(lvi); } else { string msg2 = "\n" + "账户:" + txt_xbAccount.Text + "\n" + "角色:" + txt_xbName.Text + "\n"; if (txt_xbId6.Text != "" && xbCount6 != 0) { msg += "物品:" + txt_xbName6.Text + "\t数量:" + txt_xbCount6.Text + "\t\n"; } if (txt_xbId7.Text != "" && xbCount7 != 0) { msg += "物品:" + txt_xbName7.Text + "\t数量:" + txt_xbCount7.Text + "\t\n"; } if (txt_xbId8.Text != "" && xbCount8 != 0) { msg += "物品:" + txt_xbName8.Text + "\t数量:" + txt_xbCount8.Text + "\t\n"; } if (txt_xbId9.Text != "" && xbCount9 != 0) { msg += "物品:" + txt_xbName9.Text + "\t数量:" + txt_xbCount9.Text + "\t\n"; } if (txt_xbId10.Text != "" && xbCount10 != 0) { msg += "物品:" + txt_xbName10.Text + "\t数量:" + txt_xbCount10.Text + "\t\n"; } MessageBox.Show("发送失败,\t\n" + msg2); } } Thread.Sleep(200); //代币 if (!string.IsNullOrEmpty(txt_dbSend.Text) && CFormat.isNumberic(txt_dbSend.Text)) { int dbCount = Convert.ToInt32(txt_dbSend.Text); if (dbCount > 0) { //虚宝增加 bool result = CSGHelper.AddAcountPoint(txt_xbAccount.Text, dbCount); if (result) { txt_dbCurr.Text = "" + CSGHelper.SelectAcountPoint(txt_xbAccount.Text); } else { MessageBox.Show("发送代币失败,代币:" + dbCount); } } } if (cbx_xbconf.Text == "新人起步") { m_SGExHandle.SendWorldWords("新人玩家 " + txt_xbName.Text + " 的新手起步已经发放,请到大鸿胪处领取虚宝,欢迎加入大家庭,祝游戏愉快。"); } } else { MessageBox.Show("请核对发放帐号!"); } }