Beispiel #1
0
        private void Refresh()
        {
            listBoxSupplies.ItemsSource = VME.Data.GetData();

            using (var context = new Context())
            {
                Current.Text = context.CurrentStates.First(n => n.Location == VME.TerminalLocation).Money.ToString();
            }

            if (VME.CanBeBought() == true)
            {
                Buy.IsEnabled = true;
            }
            else
            {
                Buy.IsEnabled = false;
            }

            if (VME.context.CurrentStates.First(n => n.Location == VME.TerminalLocation).Money > 0)
            {
                Change.IsEnabled = true;
            }
            else
            {
                Change.IsEnabled = false;
            }
        }
Beispiel #2
0
        private void Refresh()
        {
            listBoxSupplies.ItemsSource = VME.Data.CurrentState.Product;

            Current.Text = VME.Data.CurrentState.Money.ToString();

            if (VME.CanBeBought() == true)
            {
                Buy.IsEnabled = true;
            }
            else
            {
                Buy.IsEnabled = false;
            }

            if (VME.Data.CurrentState.Money > 0)
            {
                Change.IsEnabled = true;
            }
            else
            {
                Change.IsEnabled = false;
            }
        }