Пример #1
0
        private void Track_Click(object sender, RoutedEventArgs e)
        {
            winTrack myTrack = new winTrack(listData_track);

            myTrack.Owner = this;
            myTrack.ShowDialog();
            if (bool.Parse(listData_track[5].ToString()) == true)
            {
                track_len         = int.Parse(listData_track[0].ToString());
                station_site      = int.Parse(listData_track[1].ToString());
                time              = int.Parse(listData_track[2].ToString());
                sm                = int.Parse(listData_track[3].ToString());
                pause_time        = int.Parse(listData_track[4].ToString());
                txtTrack.Text    += "更新轨道信息:\n";
                txtTrack.Text    += "轨道长度:" + track_len;
                txtTrack.Text    += "\n车站位置:" + station_site;
                txtTrack.Text    += "\n模拟时间:" + time;
                txtTrack.Text    += "\n安全距离:" + sm;
                txtTrack.Text    += "\n停留时间:" + pause_time;
                txtTrack.Text    += "\n----------------------------\n";
                listData_track[5] = false;
            }
        }
Пример #2
0
 private void Track_Click(object sender, RoutedEventArgs e)
 {
     winTrack myTrack = new winTrack(listData_track);
     myTrack.Owner = this;
     myTrack.ShowDialog();
     if (bool.Parse(listData_track[5].ToString()) == true)
     {
         track_len = int.Parse(listData_track[0].ToString());
         station_site = int.Parse(listData_track[1].ToString());
         time = int.Parse(listData_track[2].ToString());
         sm = int.Parse(listData_track[3].ToString());
         pause_time = int.Parse(listData_track[4].ToString());
         txtTrack.Text += "更新轨道信息:\n";
         txtTrack.Text += "轨道长度:" + track_len;
         txtTrack.Text += "\n车站位置:" + station_site;
         txtTrack.Text += "\n模拟时间:" + time;
         txtTrack.Text += "\n安全距离:" + sm;
         txtTrack.Text += "\n停留时间:" + pause_time;
         txtTrack.Text += "\n----------------------------\n";
         listData_track[5] = false;
     }
 }