Ejemplo n.º 1
0
 private void button_open_Click(object sender, EventArgs e)
 {
     try
     {
         OpenFileDialog ofd = new OpenFileDialog();
         ofd.DefaultExt = "AST";
         ofd.Filter     = "Archivos AST|*.AST|All files(*.*)|*.*";
         ofd.Title      = "Abrir archivos";
         ofd.ShowDialog();
         fichero = new Fichero(ofd.FileName);
         fichero.leer();
         listaCAT10 = fichero.getListCAT10();
         listaCAT20 = fichero.getListCAT20();
         listaCAT21 = fichero.getListCAT21();
         listas     = new ManageListas(listaCAT10, listaCAT20, listaCAT21);
         listas.resolvelistas();
         listas.actualizarTabla();
         tablaCAT10 = listas.getTablaCAT10();
         tablaCAT20 = listas.getTablaCAT20();
         tablaCAT21 = listas.getTablaCAT21();
         listas.singleList();
         MessageBox.Show("File decoded correctly");
     }
     catch (Exception g)
     {
         MessageBox.Show(g.Message);
     }
 }
Ejemplo n.º 2
0
        private void button_open_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.DefaultExt = "AST";
            ofd.Filter     = "Archivos AST|*.AST|All files(*.*)|*.*";
            ofd.Title      = "Abrir archivos";
            ofd.ShowDialog();
            fichero = new Fichero(ofd.FileName);
            fichero.leer();
            listaCAT10 = fichero.getListCAT10();
            listaCAT20 = fichero.getListCAT20();
            listaCAT21 = fichero.getListCAT21();
            listas     = new ManageListas(listaCAT10, listaCAT20, listaCAT21);
            listas.resolvelistas();
            listas.actualizarTabla();
            tablaCAT10 = listas.getTablaCAT10();
            tablaCAT20 = listas.getTablaCAT20();
            tablaCAT21 = listas.getTablaCAT21();
            listas.singleList();
            MessageBox.Show("File decoded correctly");
            dataGridView_CAT10.DataSource = tablaCAT10;
            dataGridView_CAT20.DataSource = tablaCAT20;
            dataGridView_CAT21.DataSource = tablaCAT21;
            if (listaCAT10.Count != 0)
            {
                dataGridView_CAT10.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
            if (listaCAT20.Count != 0)
            {
                dataGridView_CAT20.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
            if (listaCAT21.Count != 0)
            {
                dataGridView_CAT21.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
        }
Ejemplo n.º 3
0
        private void TablaVuelos_Load(object sender, EventArgs e)
        {
            listaCAT10 = listas.getListCAT10();
            listaCAT20 = listas.getListCAT20();
            listaCAT21 = listas.getListCAT21();
            tablaCAT10 = listas.getTablaCAT10();
            tablaCAT20 = listas.getTablaCAT20();
            tablaCAT21 = listas.getTablaCAT21();
            dataGridView_CAT10.DataSource         = tablaCAT10;
            dataGridView_CAT20.DataSource         = tablaCAT20;
            dataGridView_CAT21.DataSource         = tablaCAT21;
            dataGridView_CAT10.AllowUserToAddRows = false;
            dataGridView_CAT20.AllowUserToAddRows = false;
            dataGridView_CAT21.AllowUserToAddRows = false;
            dataGridView_CAT10.RowHeadersVisible  = false;
            dataGridView_CAT20.RowHeadersVisible  = false;
            dataGridView_CAT21.RowHeadersVisible  = false;

            dataGridView_CAT10.RowsDefaultCellStyle.BackColor = Color.FromArgb(45, 45, 48);
            dataGridView_CAT20.RowsDefaultCellStyle.BackColor = Color.FromArgb(45, 45, 48);
            dataGridView_CAT21.RowsDefaultCellStyle.BackColor = Color.FromArgb(45, 45, 48);

            dataGridView_CAT10.DefaultCellStyle.ForeColor = Color.White;
            dataGridView_CAT20.DefaultCellStyle.ForeColor = Color.White;
            dataGridView_CAT21.DefaultCellStyle.ForeColor = Color.White;

            dataGridView_CAT10.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
            dataGridView_CAT20.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
            dataGridView_CAT21.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;

            dataGridView_CAT10.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(0, 124, 191);
            dataGridView_CAT20.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(0, 124, 191);
            dataGridView_CAT21.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(0, 124, 191);

            dataGridView_CAT10.EnableHeadersVisualStyles = false;
            dataGridView_CAT20.EnableHeadersVisualStyles = false;
            dataGridView_CAT21.EnableHeadersVisualStyles = false;

            dataGridView_CAT10.DefaultCellStyle.SelectionBackColor = Color.FromArgb(45, 45, 48);
            dataGridView_CAT20.DefaultCellStyle.SelectionBackColor = Color.FromArgb(45, 45, 48);
            dataGridView_CAT21.DefaultCellStyle.SelectionBackColor = Color.FromArgb(45, 45, 48);



            if (tablaCAT10.Rows.Count != 0)
            {
                checkBox_CAT10.Checked                 = true;
                checkBox_CAT20.Checked                 = false;
                checkBox_CAT21.Checked                 = false;
                dataGridView_CAT10.Visible             = true;
                dataGridView_CAT20.Visible             = false;
                dataGridView_CAT21.Visible             = false;
                dataGridView_CAT10.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
            else if (tablaCAT20.Rows.Count != 0)
            {
                checkBox_CAT10.Checked                 = false;
                checkBox_CAT20.Checked                 = true;
                checkBox_CAT21.Checked                 = false;
                dataGridView_CAT10.Visible             = false;
                dataGridView_CAT20.Visible             = true;
                dataGridView_CAT21.Visible             = false;
                dataGridView_CAT20.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
            else if (tablaCAT21.Rows.Count != 0)
            {
                checkBox_CAT10.Checked                 = false;
                checkBox_CAT20.Checked                 = false;
                checkBox_CAT21.Checked                 = true;
                dataGridView_CAT10.Visible             = false;
                dataGridView_CAT20.Visible             = false;
                dataGridView_CAT21.Visible             = true;
                dataGridView_CAT21.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
        }