예제 #1
0
        //-----------------------------------------------------------------------------
        // Function: HandleOpenGroup
        //
        // Purpose:  Extracts the information from the dialog and calls
        //           OpenGroup to do the actual work.
        //
        // Returns:  HRESULT
        //
        HRESULT HandleOpenGroup()
        {
            var pwzGroup    = IDC_CB_GROUP.SelectedIndex != -1 ? ((PEER_NAME_PAIR)IDC_CB_GROUP.SelectedItem).pwzPeerName : null;
            var pwzIdentity = GroupChat.GetSelectedIdentity(IDC_CB_IDENTITY);

            return(GroupChat.Main.OpenGroup(pwzIdentity, pwzGroup));
        }
예제 #2
0
        //-----------------------------------------------------------------------------
        // Function: HandleJoinGroup
        //
        // Purpose:  Extracts the information from the dialog and calls
        //           JoinGroup to do the actual work.
        //
        // Returns:  HRESULT
        //
        private HRESULT HandleJoinGroup()
        {
            var wzPassword   = IDC_CHECK_PASSWORD.Checked ? IDC_EDIT_PASSWORD.Text : string.Empty;
            var wzInvitation = IDC_EDT_LOCATION.Text;

            return(GroupChat.Main.JoinGroup(GroupChat.GetSelectedIdentity(IDC_CB_IDENTITY), wzInvitation, wzPassword, IDC_CHECK_PASSWORD.Checked));
        }
 private void IDOK_Click(object sender, EventArgs e)
 {
     if (DeleteIdentity(GroupChat.GetSelectedIdentity(IDC_CB_IDENTITY)).Succeeded)
     {
         Close();
     }
 }
예제 #4
0
 private void IDOK_Click(object sender, EventArgs e)
 {
     if (GroupChat.Main.CreateGroup(IDC_EDT_GROUPNAME.Text, GroupChat.GetSelectedIdentity(IDC_CB_IDENTITY),
                                    IDC_EDIT_PASSWORD.Text, IDC_RADIO_AUTH_PASSW.Checked, IDC_RADIO_GLOBAL_SCOPE.Checked).Succeeded)
     {
         GroupChat.Main.SetStatus("Group created");
         Close();
     }
 }
예제 #5
0
 private void IDC_CB_IDENTITY_SelectedIndexChanged(object sender, EventArgs e)
 {
     GroupChat.RefreshGroupCombo(IDC_CB_GROUP, GroupChat.GetSelectedIdentity(IDC_CB_IDENTITY));
 }