Beispiel #1
0
 private void myMenuPhone2PhoneCallToolStripButton_Click(object sender, EventArgs e)
 {
     NTContact selectedContact;
     if (myRosterListTreeView.SelectedNode != null)
     {
         if (myRosterListTreeView.SelectedNode.Level == 1)
         {
             NTContact meContact;
             if (mContactBook.getCandidatesForJabberID(mUserAccount.Username).Count > 0)
             {
                 meContact = (NTContact)mContactBook.getCandidatesForJabberID(mUserAccount.Username)[0];
             }
             else
             {
                 meContact = new NTContact();
             }
             ContactList foundContactsList = mContactBook.getCandidatesForJabberID(myRosterListTreeView.SelectedNode.Tag.ToString());
             if (foundContactsList.Count > 0)
             {
                 selectedContact = (NTContact)foundContactsList[0];
             }
             else
             {
                 selectedContact = new NTContact();
             }
             myPhone2PhoneWindow = new Phone2PhoneWindow(selectedContact, meContact);
             myPhone2PhoneWindow.FormClosing += new FormClosingEventHandler(myPhone2PhoneWindow_FormClosing);
             myPhone2PhoneWindow.Show();
         }
     }
 }
Beispiel #2
0
 private void callPhone2PhoneToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     RadListBoxItem selectedItem = (RadListBoxItem)myContactsListBox.SelectedItem;
     if (selectedItem != null)
     {
         NTContact meContact;
         if (mContactBook.getCandidatesForJabberID(mUserAccount.Username).Count > 0)
         {
             meContact = (NTContact)mContactBook.getCandidatesForJabberID(mUserAccount.Username)[0];
         }
         else
         {
             meContact = new NTContact();
         }
         NTContact selectedContact = (NTContact)selectedItem.Tag;
         myPhone2PhoneWindow = new Phone2PhoneWindow(selectedContact, meContact);
         myPhone2PhoneWindow.FormClosing += new FormClosingEventHandler(myPhone2PhoneWindow_FormClosing);
         myPhone2PhoneWindow.Show();
     }
 }