Exemplo n.º 1
0
        private void m_trainSimItem_Click(object sender, EventArgs e)
        {
            TrainSimModal trainSimModal = new TrainSimModal();

            trainSimModal.Owner = this;
            trainSimModal.ShowDialog();
        }
Exemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            TrainSimModal trainSimModal = new TrainSimModal();

            trainSimModal.Owner = this;
            trainSimModal.Show();


            for (int i = 1; i < 31; i++)
            {
                m_comboBoxTrain.Items.Add("Train" + i.ToString());
            }

            m_comboBoxTrain.SelectedIndex = 0;



            //m_dataGridViewAllTrains.DataSource = m_allOBATP.;


            m_dataGridViewAllTrains.DataSource = m_dataTable;

            //m_listViewVirtualOccupation.DataBindings = ahmet;

            //m_dataGridViewAllTrains.ColumnCount = 7;


            //table.Columns.Add("ID");
            //table.Columns.Add("Train_Name");
            //table.Columns.Add("Speed");
            //table.Columns.Add("Front_Track");
            //table.Columns.Add("Front_Track_Location");
            //table.Columns.Add("Front_Track_Max_Speed");
            //table.Columns.Add("Rear_Track");
            //table.Columns.Add("Rear_Track_Location");
            //table.Columns.Add("Rear_Track_Max_Speed");
            //table.Columns.Add("Total_Route_Distance");



            m_dataGridViewAllTrains.Columns[0].HeaderText = "ID";
            m_dataGridViewAllTrains.Columns[1].HeaderText = "Train Name";
            m_dataGridViewAllTrains.Columns[2].HeaderText = "Speed(km/h)";
            m_dataGridViewAllTrains.Columns[3].HeaderText = "Front Track ID";
            m_dataGridViewAllTrains.Columns[4].HeaderText = "Front Track Location";
            m_dataGridViewAllTrains.Columns[5].HeaderText = "Front Track Length";

            m_dataGridViewAllTrains.Columns[6].HeaderText  = "Front Track Max Speed";
            m_dataGridViewAllTrains.Columns[7].HeaderText  = "Rear Track ID";
            m_dataGridViewAllTrains.Columns[8].HeaderText  = "Rear Track Location";
            m_dataGridViewAllTrains.Columns[9].HeaderText  = "Rear Track Length";
            m_dataGridViewAllTrains.Columns[10].HeaderText = "Rear Track Max Speed";
            m_dataGridViewAllTrains.Columns[11].HeaderText = "Total Route Distance(cm)";

            m_dataGridViewAllTrains.Columns[0].Width = 50;
            m_dataGridViewAllTrains.Columns[1].Width = 70;
        }