Exemple #1
0
        static void Main(string[] args)
        {
            CutleryDesk cutleryDesk = CutleryDesk.cutleryDeskInstance();
            OrderDesk   orderDesk   = OrderDesk.orderDeskInstance();

            while (true)
            {
                char key = Console.ReadKey().KeyChar;
                if (key.Equals('w'))
                {
                    new Pause().PauseThreads();
                }
                else if (key.Equals('x'))
                {
                    new Pause().Resume();
                }
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            afficher = new Affichage();

            HallInterface salle = Hall.hallInstance();

            MHotel = MaîtreHôtel.maîtreHôtelInstance();

            CutleryDesk.cutleryDeskInstance();
            OrderDesk.orderDeskInstance();


            string rep = Console.ReadLine();


            Thread threadClient = new Thread(() => ArriverClient(rep));

            new Pause().AddThread(threadClient);
            threadClient.Start();


            Thread threadAccueilMaitreHotel = new Thread(() => AccueilMaitreHotel());

            new Pause().AddThread(threadAccueilMaitreHotel);
            threadAccueilMaitreHotel.Start();

            while (true)
            {
                char key = Console.ReadKey().KeyChar;
                if (key.Equals('w'))
                {
                    new Pause().PauseThreads();
                }
                else if (key.Equals('x'))
                {
                    new Pause().Resume();
                }
            }
        }