Пример #1
0
 private void ChoosePersonButton_Click(object sender, EventArgs e)
 {
     if (ChoosePerson != null)
     {
         ChoosePerson.Invoke();
     }
 }
Пример #2
0
        private void MemberList_AddMember(object sender, EventArgs e)
        {
            _parent.Darkened = true;
            ChoosePerson window = new ChoosePerson(_parent, ConversationList.SelectedConversation.Members);

            _parent.mainCanvas.Children.Add(window);

            window.ReadyButtonClicked += (s, ea) =>
            {
                List <PersonModel> selectedPersons = window.SelectedPersons;

                _parent.Client.AddConversationMember(ConversationList.SelectedConversation.Id, selectedPersons);
                _parent.mainCanvas.Children.Remove(window);
                _parent.Darkened = false;
            };

            window.CancelButtonClicked += (s, ea) =>
            {
                _parent.mainCanvas.Children.Remove(window);
                _parent.Darkened = false;
            };
        }