Example #1
0
        static void Main(string[] args)
        {
            var compressionStockingstocking = new StockingCtrl(new CompressionCtrl(new Pump(), new Timer()));
            ConsoleKeyInfo consoleKeyInfo;

            Console.WriteLine("Compression Stocking Control User Interface");
            Console.WriteLine("A:   Compress");
            Console.WriteLine("Z:   Decompress");
            Console.WriteLine("ESC: Terminate application");

            do
            {
                consoleKeyInfo = Console.ReadKey(true); // true = do not echo character
                if (consoleKeyInfo.Key == ConsoleKey.A) compressionStockingstocking.StartBtnPushed();
                if (consoleKeyInfo.Key == ConsoleKey.Z) compressionStockingstocking.StopBtnPushed();

            } while (consoleKeyInfo.Key != ConsoleKey.Escape);
        }
Example #2
0
 static void Main(string[] args)
 {
     ICompressionCtrl AirComp  = new AirCompression();
     IStockingCtrl    Stocking = new StockingCtrl(AirComp);
 }