public void Activate(User user, Item item)
        {
            UiScope.OnScope(this, () =>
            {
                Enabled = true;
                Visible = true;

                labelItemDescription.Text = item.Description;
                labelItemPrice.Text       = string.Format("für {0}", item.Price.AsPrice());
                labelBalance.ForeColor    = user.Balance >= 0.0f ? Color.Black : Color.Red;
                labelBalance.Text         = string.Format("Dein {1}: {0}", user.Balance.AsPrice(), user.Balance >= 0.0f ? "Guthaben" : "Minus");

                Image image = ImageCache.Get(item.Barcode);
                if (image != null)
                {
                    pictureBoxItemImage.Image   = image;
                    pictureBoxItemImage.Visible = true;
                }
                else
                {
                    pictureBoxItemImage.Visible = false;
                }
            });

            SendInfoMail(user, item);
            SendBalanceWarningMail(user);
        }
 public void Activate(User user, Item item)
 {
     UiScope.OnScope(this, () =>
     {
         Enabled = true;
         Visible = true;
     });
 }
 public void Deactivate()
 {
     UiScope.OnScope(this, () =>
     {
         Enabled = false;
         Visible = false;
     });
 }
 public void Deactivate()
 {
     UiScope.OnScope(this, () =>
     {
         pictureBoxItemImage.Image = null;
         Enabled = false;
         Visible = false;
     });
 }
 public void Activate(User user, Item item)
 {
     UiScope.OnScope(this, () =>
     {
         Enabled            = true;
         Visible            = true;
         labelUserName.Text = string.Format("Hallo {0}!", user.Name);
     });
 }
        public void Activate(User user, Item item)
        {
            UiScope.OnScope(this, () =>
            {
                Enabled = true;
                Visible = true;

                labelItemDescription.Text = item.Description;
                labelItemPrice.Text       = string.Format("für {0}", item.Price.AsPrice());
                Image image = ImageCache.Get(item.Barcode);
                if (image != null)
                {
                    pictureBoxItemImage.Image   = image;
                    pictureBoxItemImage.Visible = true;
                }
                else
                {
                    pictureBoxItemImage.Visible = false;
                }
            });
        }