예제 #1
0
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            txtProduto prod  = new txtProduto();
            frmLogin   login = new frmLogin();
            frmAdd     add   = new frmAdd();
            frmMain    main  = new frmMain();


            if (login.ShowDialog() == DialogResult.OK)
            {
                main.ShowDialog();
            }

            //if (main.ShowDialog() == DialogResult.OK)
            //{
            //    Application.Run(new frmAdd());
            //}
            //else
            //{
            //    Application.Exit();
            //}

            //if (main.ShowDialog() == DialogResult.Yes)
            //{
            //    Application.Run(new frmBusca());
            //}

            //if (add.ShowDialog() == DialogResult.Retry)
            //{
            //    Application.Run(new frmMain());
            //}
            //else
            //{
            //    Application.Exit();
            //}
        }
예제 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAdd add = new frmAdd();

            add.ShowDialog();
        }