53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace StormChatWPF
|
|
{
|
|
/// <summary>
|
|
/// UserWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
private void AddUserList()
|
|
{
|
|
if (Chat.ContactsList.Any())
|
|
{
|
|
foreach (var user in Chat.ContactsList)
|
|
{
|
|
UsersList.Items.Add(user);
|
|
}
|
|
}
|
|
}//向联系人列表listview中添加元素
|
|
|
|
private void UsersList_Selected(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void UsersList_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
AddUserList();
|
|
}
|
|
}
|
|
}
|