示例#1
0
        private void Tox_OnGroupInvite(object sender, ToxEventArgs.GroupInviteEventArgs e)
        {
            int groupNumber = ProfileManager.Instance.Tox.JoinGroup(e.FriendNumber, e.Data);

            MainWindow.Instance.UInvoke(() =>
            {
                var model        = new GroupControlViewModel();
                model.ChatNumber = groupNumber;
                model.Name       = ProfileManager.Instance.Tox.GetGroupTitle(groupNumber);

                //add the friend to the list, sorted
                AddObject(model);
                SortObject(model);

                //auto switch to converation view of this friend (?)
                SelectObject(model);
            });
        }
 public GroupConversationViewModel(GroupControlViewModel model)
 {
     Group = model;
 }