private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            _cashManager  = CashManager.RestoreState();
            _vendingLogic = VendingLogic.RestoreState();

            Refresh();
        }
        public static VendingLogic RestoreState()
        {
            if (File.Exists(_fileName))
            {
                return(VendingMachineStateHandler.Restore <VendingLogic>(_fileName));
            }

            VendingLogic vendingLogic = new VendingLogic();

            vendingLogic.LoadProductsForSale();
            return(vendingLogic);
        }