private void 使用物品ToolStripMenuItem_Click(object sender, EventArgs e) { if ((textBoxID.Text == "")) { MessageBox.Show("物品信息不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } UnityGMClient.EItemType type = UnityGMClient.EItemType.EITEM_TP_PROP_VITALITY; uint index = UInt32.Parse(textBoxID.Text); UnityGMClient.CClientCore.Singleton.SendMsgPlayerSystemGC2GMReqUseBagItemData(type, index, CbUseBagItemData); }
private void 出售物品ToolStripMenuItem_Click(object sender, EventArgs e) { if ((textBoxID.Text == "")) { MessageBox.Show("物品信息不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } try { UnityGMClient.EItemType type = UnityGMClient.EItemType.EITEM_TP_EQUIP_GLOVE; uint index = UInt32.Parse(textBoxID.Text); uint count = 1; UnityGMClient.CClientCore.Singleton.SendMsgPlayerSystemGC2GMReqSoldBagItemData(type, index, count, CbSoldBagItemData); } catch (Exception) { MessageBox.Show("输入数据错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }