private void JoinButton_Click(object sender, RoutedEventArgs e) { string JID = Client.GetChatroomJID(Client.GetObfuscatedChatroomName(ChatNameTextBox.Text.ToLower(), ChatPrefixes.Public), string.Empty, true); GroupChatItem item = new GroupChatItem(JID, ChatNameTextBox.Text); NotificationChatGroup ChatGroup = new NotificationChatGroup(); ChatGroup.Tag = item; ChatGroup.GroupTitle = item.GroupTitle; ChatGroup.Margin = new Thickness(1, 0, 1, 0); ChatGroup.GroupLabelName.Content = item.GroupTitle; if (!Client.GroupChatItems.Any(i => i.GroupTitle == ChatNameTextBox.Text)) { Client.ChatListView.Items.Add(ChatGroup); Client.GroupChatItems.Add(item); } Client.ClearNotification(typeof(JoinPublicChat)); }
private void JoinButton_Click(object sender, RoutedEventArgs e) { var jid = Client.GetChatroomJID( Client.GetObfuscatedChatroomName(ChatNameTextBox.Text.ToLower(), ChatPrefixes.Public), string.Empty, true); var item = new GroupChatItem(jid, ChatNameTextBox.Text); var chatGroup = new NotificationChatGroup { Tag = item, GroupTitle = item.GroupTitle, Margin = new Thickness(1, 0, 1, 0), GroupLabelName = { Content = item.GroupTitle } }; if (Client.GroupChatItems.All(i => i.GroupTitle != ChatNameTextBox.Text)) { Client.ChatListView.Items.Add(chatGroup); Client.GroupChatItems.Add(item); } Client.ClearNotification(typeof(JoinPublicChat)); }
private void JoinButton_Click(object sender, RoutedEventArgs e) { var Jid = Client.GetChatroomJid( Client.GetObfuscatedChatroomName(ChatNameTextBox.Text.ToLower(), ChatPrefixes.Public), string.Empty, true); var item = new GroupChatItem(Jid, ChatNameTextBox.Text); var chatGroup = new NotificationChatGroup { Tag = item, GroupTitle = item.GroupTitle, Margin = new Thickness(1, 0, 1, 0), GroupLabelName = {Content = item.GroupTitle} }; if (Client.GroupChatItems.All(i => i.GroupTitle != ChatNameTextBox.Text)) { Client.ChatListView.Items.Add(chatGroup); Client.GroupChatItems.Add(item); } Client.ClearNotification(typeof (JoinPublicChat)); }