Пример #1
0
        private void LANTalkIcon_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                IconMenu.Show();
            }
            if (e.Button == MouseButtons.Left)
            {
                switch (Mode)
                {
                case 0:
                    this.Show();
                    this.Activate();
                    this.WindowState = FormWindowState.Normal;
                    break;

                case 1:
                    ServerForm.Show();
                    ServerForm.Activate();
                    ServerForm.WindowState = FormWindowState.Normal;
                    break;

                case 2:
                    ClientForm.Show();
                    ClientForm.Activate();
                    ClientForm.WindowState = FormWindowState.Normal;
                    break;
                }
            }
        }
Пример #2
0
        static void Main()
        {
            IconMenu menu = new IconMenu();

            menu.Show();

            Application.Run();
        }
Пример #3
0
 /// <summary>
 /// 右键菜单
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void notify_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         IconMenu.Items[0].Text = Program.infoResource.GetLocalizedString(language.InfoId.APPExit);
         IconMenu.Show();
     }
 }