Example #1
0
 private void frmBase_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.A)
     {
         f = new Archivo();
         f.abrirArchivo(listaEntidad);
         this.activarMenus();
     }
     if (e.Control && e.KeyCode == Keys.G)
     {
         //f.guardarArchivo(listaEntidad);
     }
     if (e.Control && e.KeyCode == Keys.N)
     {
         f = new Archivo();
         f.crearArchivo(0);
         this.activarMenus();
         band4 = true;
         this.Form1_Paint(this, null);//
     }
 }
Example #2
0
        private void archivo(object sender, ToolStripItemClickedEventArgs e)
        {
            switch (e.ClickedItem.AccessibleName)
            {
            case "nuevo":
                archivoToolStripMenuItem.HideDropDown();
                f = new Archivo();
                f.crearArchivo(0);
                this.activarMenus();
                break;

            case "guardar":
                archivoToolStripMenuItem.HideDropDown();
                f.guardarArchivo(listaEntidad);
                break;

            case "abrir":
                archivoToolStripMenuItem.HideDropDown();
                f            = new Archivo();
                listaEntidad = new List <Entidad>();
                f.abrirArchivo(listaEntAux);
                listaEntidad = f.lista;
                //inertarEntidad(0);
                this.activarMenus();
                band4 = true;
                break;

            case "cerrar":
                archivoToolStripMenuItem.HideDropDown();
                listaEntidad = new List <Entidad>();
                f            = new Archivo();
                //manejo_dataGrid();
                dataGridView1.Rows.Clear();
                dataGridView1.Refresh();
                desactivarMenus();
                break;
            }
        }