예제 #1
0
        private void MenuPrincipalCliente_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.O)
            {
                Form car = new FormCarrito();
                car.Show();
                this.Hide();
            }

            if (e.KeyCode == Keys.F1)
            {
                System.Diagnostics.Process ayuda = new System.Diagnostics.Process();
                ayuda.StartInfo.FileName = "C:\\Users\\julii\\Desktop\\ManualUsuario\\ManualAyuda_MenuCliente.pdf";
                ayuda.Start();
                ayuda.Close();
            }

            if (e.KeyCode == Keys.Escape)
            {
                string            message = "Estas seguro de cerrar sesión?";
                string            caption = "Salir";
                MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                DialogResult      result;


                dcTiendaDataContext dc = new dcTiendaDataContext();
                dc.Limpiarcarrito();

                // Displays the MessageBox.

                result = MessageBox.Show(message, caption, buttons);

                if (result == System.Windows.Forms.DialogResult.Yes)
                {
                    this.Close();
                    Form p = new MenuIniciarSesion();
                    p.Show();
                    this.Hide();
                }
            }


            if (e.KeyCode == Keys.F2)
            {
                if (sidemenu.Width == 55)
                {
                    //EXPAND
                    sidemenu.Visible = true;
                    sidemenu.Width   = 260;
                }
                else
                {
                    //Minimize

                    sidemenu.Visible = true;
                    sidemenu.Width   = 55;
                }
            }
        }
예제 #2
0
파일: Nota.cs 프로젝트: 1630273/JBGamesC-
        private void btnPdf_Click(object sender, EventArgs e)
        {
            dcTiendaDataContext dc = new dcTiendaDataContext();

            dc.Limpiarcarrito();

            MenuPrincipalCliente ir = new MenuPrincipalCliente();

            ir.Show();
            this.Hide();
        }
예제 #3
0
        private void btnsalir_Click(object sender, EventArgs e)
        {
            string            message = "Estas seguro de cerrar sesión?";
            string            caption = "Salir";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult      result;


            dcTiendaDataContext dc = new dcTiendaDataContext();

            dc.Limpiarcarrito();

            // Displays the MessageBox.

            result = MessageBox.Show(message, caption, buttons);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                this.Close();
                Form p = new MenuIniciarSesion();
                p.Show();
                this.Hide();
            }
        }