Ejemplo n.º 1
0
        /// <summary>
        /// constractor of SUPER_BUS_LIST
        /// </summary>
        public SUPER_BUS_LIST()
        {
            m_BusCollection           = (BusCollection)this;
            m_BusCollection.m_busList = new List <Bus>();
            Program_6077_5711_02.initializeBusRoute(ref m_BusCollection, ref myUniqueStops);
            Random r = new Random();

            foreach (BusRoute bus in m_BusCollection)
            {
                int       i       = 0;
                SUPER_BUS newMbus = new SUPER_BUS(0, 0, 0, new DateTime(), bus.m_Stations, bus.m_direction, bus.m_Area, bus.m_BusLine);
                comprehensiveCollection.Add(new SUPER_BUS(0, 0, 0, new DateTime(), bus.m_Stations, bus.m_direction, bus.m_Area, bus.m_BusLine)
                {
                    m_fuel         = r.Next(1200),
                    m_licenseNum   = r.Next(100000000),
                    m_sum_Tr       = ((float)r.NextDouble() + r.Next(1200)),
                    m_yearStart    = r.Next(1950, 2020),
                    m_sum_Tr_Treat = r.Next(20000)
                });
            }
            foreach (SUPER_BUS bus in comprehensiveCollection)
            {
                int a = r.Next(2020, 2024);
                int b = r.Next(11) + 1;
                int c = r.Next(29) + 1;
                bus.m_time_Treat = new DateTime(a, b, c);
                bus.m_fuel       = r.Next(1200);
                m_BusCollection.m_busList.Add(bus);
            }
            SpecialInit();
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();


            List <BusStop> myUniqueStops = new List <BusStop>();

            Program_6077_5711_02.initializeBusRoute(ref myBusCollection, ref myUniqueStops);
            InitializeBusList(myBusCollection);
            this.DataContext = updateArea;
        }