Ejemplo n.º 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     mainForm = new frmMain();
     Application.Run(mainForm);
 }
Ejemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var mainForm = new frmMain();

            mainForm.trayMenu = new ContextMenu();
            mainForm.trayMenu.MenuItems.Add("Hide", (sender, e) =>
            {
                if (mainForm.trayMenu.MenuItems[0].Text == "Show")
                {
                    mainForm.Show();
                    mainForm.trayMenu.MenuItems[0].Text = "Hide";
                }
                else
                {
                    mainForm.Hide();
                    mainForm.trayMenu.MenuItems[0].Text = "Show";
                }
            });

            mainForm.trayMenu.MenuItems.Add("Exit", (sender, e) =>
            {
                mainForm.Close();
                Application.Exit();
            });

            mainForm.trayIcon = new NotifyIcon();
            mainForm.trayIcon.Text        = "Esperantilo";
            mainForm.trayIcon.Icon        = mainForm.Icon;
            mainForm.trayIcon.ContextMenu = mainForm.trayMenu;
            mainForm.trayIcon.Visible     = true;

            Application.Run(mainForm);
        }
Ejemplo n.º 3
0
 public Operation(frmMain frm)
 {
     _frm=frm;
 }
Ejemplo n.º 4
0
 public frmSprite(frmMain parent)
 {
     InitializeComponent();
     StateVars.parent = parent;
 }
Ejemplo n.º 5
0
 private void button3_Click(object sender, EventArgs e)
 {
     frmMain f = new frmMain();
     f.Show();
 }