예제 #1
0
        private void mnuAddPrivateChat_Click(object sender, EventArgs e)
        {
            using (frmAddPrivateChat frm = new frmAddPrivateChat())
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        MeshNetwork network = _node.CreatePrivateChat(frm.PeerUserId, frm.PeerDisplayName, frm.LocalNetworkOnly, frm.InvitationMessage);

                        lstChats.SelectItem(AddChatView(network));
                        ShowSelectedChatView();

                        SaveProfile();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
            }
        }