예제 #1
0
        //
        private void novaFaturaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFaturar fat = new frmFaturar();

            fat.MdiParent = this;
            if (Application.OpenForms.OfType <frmFaturar>().Count() > 0)
            {
                Application.OpenForms["frmFaturar"].BringToFront();
            }
            else
            {
                fat.Show();
            }
        }
예제 #2
0
        //
        private void Dashboard_Load(object sender, EventArgs e)
        {
            /* Minimizando aplicação na bandeja do windows */
            this.Visible = true;
            //this.WindowState = FormWindowState.Minimized;
            this.ShowInTaskbar   = true;
            notDashboard.Visible = true;
            // cria menu contexto no icone de notificação
            var contMenu = new ContextMenu();

            contMenu.MenuItems.Add(new MenuItem("Sair do Programa", ExitToolsStripMenuItem_Click));
            contMenu.MenuItems.Add(new MenuItem("Clientes", gerClientesMenu_Click));
            contMenu.MenuItems.Add(new MenuItem("Novo Cliente", btnATimer_Click));
            contMenu.MenuItems.Add(new MenuItem("Projetos", gerenciarProjetosToolStripMenuItem_Click));
            contMenu.MenuItems.Add(new MenuItem("Novo Projeto", btnATimer_Click));
            contMenu.MenuItems.Add(new MenuItem("Registros do Timer", novaFaturaToolStripMenuItem_Click));
            contMenu.MenuItems.Add(new MenuItem("Iniciar Timer", btnATimer_Click));
            notDashboard.ContextMenu = contMenu;
            //
            frmFaturar fat = new frmFaturar();

            fat.MdiParent = this;
            fat.Show();
        }