private void Main_Load(object sender, EventArgs e) { try { gMap_mapa.MapProvider = GMapProviders.GoogleMap; gMap_mapa.DragButton = MouseButtons.Left; gMap_mapa.Position = new PointLatLng(41.289182, 2.0746423); gMap_mapa.MinZoom = 1; gMap_mapa.MaxZoom = 20; gMap_mapa.Zoom = 7; gMap_mapa.ShowCenter = false; label_starttime.Text = starttime.ToString(@"hh\:mm\:ss"); timer.Interval = 1000; trackBar_speedtime.Value = 1000; listaCAT10 = listas.getListCAT10(); listaCAT20 = listas.getListCAT20(); listaCAT21 = listas.getListCAT21(); listFLights = listas.getSingleList(); tablaSingle.Columns.Add("#", typeof(int)); tablaSingle.Columns.Add("CAT", typeof(int)); tablaSingle.Columns.Add("ACID", typeof(string)); tablaSingle.Columns.Add("Time", typeof(TimeSpan)); tablaSingle.Columns.Add("Coordinates", typeof(string)); tablaSingle.Columns.Add("Real index", typeof(int)); dataGridView_flights.DataSource = tablaSingle; } catch (Exception a) { MessageBox.Show(a.Message); } }
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; } }