本文整理汇总了C#中Host.GenerateGameString方法的典型用法代码示例。如果您正苦于以下问题:C# Host.GenerateGameString方法的具体用法?C# Host.GenerateGameString怎么用?C# Host.GenerateGameString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Host
的用法示例。
在下文中一共展示了Host.GenerateGameString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RequestDuel
private void RequestDuel(object sender, EventArgs e)
{
ListBox list = (UserTabs.SelectedTab.Text == Program.LanguageManager.Translation.chatTabUsers ? UserList : FriendList);
if (list.SelectedItem == null)
return;
if (list.SelectedItem.ToString() == Program.UserInfo.Username)
NewMessage(new ChatMessage(MessageType.System, CurrentChatWindow().Name, "You cannot duel request your self."));
else
{
Host form = new Host();
server.SendPacket("REQUESTDUEL||" + list.SelectedItem.ToString() +"||"
+ form.GenerateGameString(false));
NewMessage(new ChatMessage(MessageType.System, CurrentChatWindow().Name, "Duel request sent to " + list.SelectedItem.ToString() + "."));
}
}
示例2: RequestDuel
private void RequestDuel(object sender, EventArgs e)
{
ListBox list = (UserListTabs.SelectedTab.Name == OnlineTab.Name ? UserList : (UserListTabs.SelectedTab.Name == TeamTab.Name ? TeamList : FriendList));
if (list.SelectedItem == null)
{
return;
}
if (list.SelectedItem.ToString() == Program.UserInfo.Username)
{
WriteMessage(new ChatMessage(MessageType.System, CommandType.None, null, "You cannot duel request your self."));
}
else
{
var form = new Host();
Program.ChatServer.SendPacket("REQUESTDUEL||" + list.SelectedItem + "||" + form.GenerateGameString(false));
WriteMessage(new ChatMessage(MessageType.System, CommandType.None, null, "Duel request sent to " + list.SelectedItem + "."));
}
}