public void RunInterface()
        {
            bool     done   = false;
            UIAction action = UIAction.DisplayMainMenu;

            while (!done)
            {
                uiManager.CurrentBalance = vendingMachine.CurrentBalance;
                VendingMachineTransaction transaction;
                try
                {
                    switch (action)
                    {
                    case UIAction.DisplayMainMenu:
                        action = uiManager.PrintMainMenu();
                        break;

                    case UIAction.DisplayPurchasing:
                        action = uiManager.PrintPurchasingMenu();
                        break;

                    case UIAction.FeedMoney:
                        int amount = uiManager.FeedMoneyRequest();
                        transaction = vendingMachine.FeedMoney(amount);
                        dataManager.WriteTransaction(transaction, vendingMachine.CurrentBalance);
                        uiManager.CurrentBalance = vendingMachine.CurrentBalance;
                        uiManager.PrintTransaction(transaction);
                        action = UIAction.DisplayPurchasing;
                        break;

                    case UIAction.ReviewItems:
                        action = uiManager.PrintProductSelectionMenu(vendingMachine.GetAllItems(), UIAction.CheckItem);
                        break;

                    case UIAction.DisplayItems:
                        action = uiManager.PrintProductSelectionMenu(vendingMachine.GetAllItems(), UIAction.PurchaseItem);
                        break;

                    case UIAction.CheckItem:
                        VendingMachineItem item = null;
                        item = vendingMachine.CheckItem(uiManager.CurrentType, uiManager.CurrentSlot);
                        uiManager.PrintItemCheck(item);
                        action = UIAction.DisplayMainMenu;
                        break;

                    case UIAction.PurchaseItem:
                        transaction = vendingMachine.PurchaseItem(uiManager.CurrentType, uiManager.CurrentSlot);
                        dataManager.WriteTransaction(transaction, vendingMachine.CurrentBalance);
                        uiManager.CurrentBalance = vendingMachine.CurrentBalance;
                        uiManager.PrintTransaction(transaction);
                        action = UIAction.DisplayPurchasing;
                        break;

                    case UIAction.FinishTransaction:
                        transaction = vendingMachine.FinishTransaction();
                        dataManager.WriteTransaction(transaction, vendingMachine.CurrentBalance);
                        uiManager.PrintTransaction(transaction);
                        action = UIAction.DisplayMainMenu;
                        break;

                    case UIAction.Exit:
                        done = true;
                        break;

                    case UIAction.SalesReport:
                        action = UIAction.DisplayMainMenu;
                        // I can't decide between this Query syntax or that Lambda syntax..
                        //var items = from itemArray in vendingMachine.GetAllItems().Values
                        //            from item in itemArray
                        //            where item != null
                        //            select item;
                        IEnumerable <VendingMachineItem> items = vendingMachine.GetAllItems().Values
                                                                 .SelectMany(x => x).Where(x => x != null);
                        dataManager.GenerateSalesReport(items.ToList());
                        uiManager.PrintTransaction(new VendingMachineTransaction(TransactionType.GenerateSalesReport));
                        break;

                    default:
                        action = UIAction.DisplayMainMenu;
                        break;
                    }
                }
                catch (Exception e)
                {
                    uiManager.PrintException(e);
                    action = UIAction.DisplayMainMenu;
                }
            }
            Console.ForegroundColor = ConsoleColor.Gray;
            Console.SetCursorPosition(1, Console.WindowHeight - 1);
        }