Beispiel #1
0
 public static AirportManager GetAirportManager()
 {
     lock (_lock)
     {
         if (instance == null)
         {
             instance = new AirportManager();
         }
         return(instance);
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            Thread DeskThread     = new Thread(AirportManager.GetAirportManager().GiveBagageToDesk);
            Thread SorterThread   = new Thread(AirportManager.GetAirportManager().GiveBagageToSorter);
            Thread TerminalThread = new Thread(AirportManager.GetAirportManager().PlaneLeaveTerminal);

            AirportManager.GetAirportManager().bagageDesked += Desk_BagageDesked;
            AirportManager.GetAirportManager().bagageSorted += Sort_BagageSorted;
            DeskThread.Start();
            SorterThread.Start();
            TerminalThread.Start();
            Console.Read();
        }