Пример #1
0
 public RecentSessionList(ListBox box)
 {
     _sessionListBox                         = box;
     _sessionListBox.ItemHeight              = 40;
     _sessionListBox.DrawMode                = DrawMode.OwnerDrawVariable;
     _sessionListBox.DrawItem               += _sessionListBox_DrawItem;
     SessionAPI.RecentSessionChangedHandler += OnSessionChanged;
     _sessionListBox.MouseUp                += _sessionListBox_MouseUp;
     _actionWrapper = new InvokeActionWrapper(box);
 }
Пример #2
0
        private FriendsListForm()
        {
            InitializeComponent();
            this.Load        += FriendsListForm_Load;
            this.FormClosing += FriendsListForm_FormClosing;
            this.FormClosed  += FriendsListForm_FormClosed;
            RegisterClientCallback();
            listView1.ShowGroups = true;
            listView1.Groups.AddRange(_groups);
            _teamList          = new Team.TeamList(TeamListView);
            _sessionList       = new SessionList(chatListView);
            _recentSessionList = new RecentSessionList(recentSessionListbox);

            this.HandleCreated   += FriendsListForm_HandleCreated;
            _actionWrapper        = new InvokeActionWrapper(this);
            tabControl1.Selected += TabControl1_Selected;

            NIM.NIMSubscribeApi.RegPushEventCb(OnSubscribedEventChanged);
            NIM.NIMSubscribeApi.RegBatchPushEventCb(OnBatchSubscribedEventChanged);
        }