示例#1
0
        private void mnuAddGroupChat_Click(object sender, EventArgs e)
        {
            using (frmAddChat frmCreateChat = new frmAddChat())
            {
                if (frmCreateChat.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    BitChat chat = _service.CreateBitChat(frmCreateChat.txtNetworkNameOrPeerEmailAddress.Text, frmCreateChat.txtPassword.Text);

                    AddChatView(chat);
                }
            }
        }
示例#2
0
        private void mnuAddPrivateChat_Click(object sender, EventArgs e)
        {
            using (frmAddChat frmCreateChat = new frmAddChat(BitChatClient.Network.BitChatNetworkType.PrivateChat))
            {
                if (frmCreateChat.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    BitChat chat = _service.CreateBitChat(new System.Net.Mail.MailAddress(frmCreateChat.txtNetworkNameOrPeerEmailAddress.Text.ToLower()), frmCreateChat.txtPassword.Text);

                    AddChatView(chat);
                }
            }
        }
示例#3
0
        private void mnuAddGroupChat_Click(object sender, EventArgs e)
        {
            using (frmAddChat frm = new frmAddChat(BitChatCore.Network.BitChatNetworkType.GroupChat, null))
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        BitChat chat = _node.CreateGroupChat(frm.NetworkNameOrPeerEmailAddress, frm.SharedSecret, !frm.OnlyLanChat, frm.DhtOnlyTracking);

                        lstChats.SelectItem(AddChatView(chat));
                        ShowSelectedChatView();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
            }
        }
示例#4
0
        private void ShowAddPrivateChat(string networkNameOrPeerEmailAddress = null)
        {
            using (frmAddChat frm = new frmAddChat(BitChatCore.Network.BitChatNetworkType.PrivateChat, networkNameOrPeerEmailAddress))
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        BitChat chat = _node.CreatePrivateChat(new System.Net.Mail.MailAddress(frm.NetworkNameOrPeerEmailAddress.ToLower()), frm.SharedSecret, !frm.OnlyLanChat, frm.DhtOnlyTracking, frm.InvitationMessage);

                        lstChats.SelectItem(AddChatView(chat));
                        ShowSelectedChatView();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
            }
        }
示例#5
0
        private void mnuAddPrivateChat_Click(object sender, EventArgs e)
        {
            using (frmAddChat frmCreateChat = new frmAddChat(BitChatClient.Network.BitChatNetworkType.PrivateChat))
            {
                if (frmCreateChat.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    BitChat chat = _service.CreateBitChat(new System.Net.Mail.MailAddress(frmCreateChat.txtNetworkNameOrPeerEmailAddress.Text.ToLower()), frmCreateChat.txtPassword.Text);

                    AddChatView(chat);
                }
            }
        }
示例#6
0
        private void mnuAddGroupChat_Click(object sender, EventArgs e)
        {
            using (frmAddChat frmCreateChat = new frmAddChat())
            {
                if (frmCreateChat.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    BitChat chat = _service.CreateBitChat(frmCreateChat.txtNetworkNameOrPeerEmailAddress.Text, frmCreateChat.txtPassword.Text);

                    AddChatView(chat);
                }
            }
        }