本文整理汇总了C#中UI.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# UI.ToString方法的具体用法?C# UI.ToString怎么用?C# UI.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleContactItemButton
private void HandleContactItemButton(UI.ContactItem.Contact senderContact, UI.ContactItem.Buttons clickedButton)
{
Debug.Log("Clicked on ClientId={0} Button={1}.", senderContact.ClientId, clickedButton.ToString());
if (clickedButton == UI.ContactItem.Buttons.Information) {
if (this.m_guiContactInformation.Visibility == System.Windows.Visibility.Visible) {
this.m_guiContactInformation.Dispatcher.Invoke(() => this.m_guiContactInformation.Hide());
}
this.m_guiContactInformation.UpdatePublicKey(this.m_localClient.GetClientKey(senderContact.ClientId));
this.m_guiContactInformation.UpdateClient(senderContact.Username, senderContact.ClientId);
this.m_guiContactInformation.Dispatcher.Invoke(() => this.m_guiContactInformation.Show());
}
else if (clickedButton == UI.ContactItem.Buttons.Message) {
GUI.Message clientMessageUI = null;
if (this.m_guiMessages.ContainsKey(senderContact.ClientId)) {
Debug.Log("Accessing created message window for ClientId={0}.", senderContact.ClientId);
clientMessageUI = this.m_guiMessages[senderContact.ClientId];
}
else {
Debug.Log("Creating message window for ClientId={0}.", senderContact.ClientId);
this.m_guiContacts.Dispatcher.Invoke(() => clientMessageUI = new GUI.Message());
clientMessageUI.SetWindow(this.m_guiContacts.LocalContact, senderContact);
clientMessageUI.onMessageAccept += (string messageContent) => this.SendClientMessage(senderContact.ClientId, messageContent);
this.m_guiMessages.Add(senderContact.ClientId, clientMessageUI);
this.RequestClientPublicKey(senderContact.ClientId);
}
if (clientMessageUI.Visibility != System.Windows.Visibility.Visible) {
Debug.Log("Showing message window for ClientId={0}.", senderContact.ClientId);
clientMessageUI.Show();
}
}
}