Exemplo n.º 1
0
        private void ApplySettings()
        {
            if (groupSettings == null)
            {
                return;
            }

            // Apply settings to header
            lblGroupName.Text      = groupSettings.GroupName;
            lblGroupName.ForeColor = groupSettings.GroupNameColor;
            lblGroupName.Font      = groupSettings.GroupNameFont;
            pnlHeader.BackColor    = groupSettings.GroupNameBackgroundColor;

            // Apply settings to all shop controls
            foreach (Control ctrl in pnlShopItems.Controls)
            {
                if (ctrl is ListingViewItemCtrl)
                {
                    ListingViewItemCtrl listingViewItemCtrl = (ListingViewItemCtrl)ctrl;
                    listingViewItemCtrl.ShopNameColor        = groupSettings.ShopNameColor;
                    listingViewItemCtrl.ShopNameFont         = groupSettings.ShopNameFont;
                    listingViewItemCtrl.BackgroundColor      = groupSettings.ShopBackgroundColor;
                    listingViewItemCtrl.ShopDescriptionColor = groupSettings.ShopDescriptionColor;
                    listingViewItemCtrl.ShopDescriptionFont  = groupSettings.ShopDescriptionFont;
                    listingViewItemCtrl.ShopControlSize      = groupSettings.ShopControlSize;
                }
            }

            this.Size = groupSettings.ShopControlSize;
        }
Exemplo n.º 2
0
        private ListingViewItemCtrl CreateItemCtrl(Shop shop)
        {
            ListingViewItemCtrl ctrl = new ListingViewItemCtrl();

            ctrl.ShopName    = shop.Name;
            ctrl.Description = ctrl.Description;
            ctrl.IconName    = shop.IconName;
            return(ctrl);
        }
Exemplo n.º 3
0
 private void LoadShops()
 {
     if (shops != null)
     {
         pnlShopItems.Controls.Clear();
         foreach (Shop shop in shops)
         {
             ListingViewItemCtrl listingViewItemCtrl = CreateItemCtrl(shop);
             pnlShopItems.Controls.Add(listingViewItemCtrl);
         }
     }
 }