Ejemplo n.º 1
0
        private void Top_Menu_Click(object sender, EventArgs e)
        {
            switch ((sender as ToolStripMenuItem).Name)
            {
            case "About":
            {
                about = new AboutBox();
                about.ShowDialog();
                break;
            }

            case "Help":
            {
                if ((help == null) || (help.IsDisposed))
                {
                    help = new Help_form();
                    help.Show();
                }
                break;
            }

            case "СhangeUser":
            {
                CloseConnection();
                break;
            }

            case "Exit":
            {
                Application.Exit();
                break;
            }
            }
        }
Ejemplo n.º 2
0
 private void Chat_form_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         if ((help == null) || (help.IsDisposed))
         {
             help = new Help_form();
             help.Show();
         }
     }
 }