Beispiel #1
0
        private void LoadRemoteImages(LineupStation station)
        {
            if (station.Logo != null)
            {
                pbDefaultRemote.BackColor = Color.FromArgb(255, 6, 15, 30);;
                pbDefaultRemote.Load(station.Logo.Url);
            }

            if (station.StationLogos == null)
            {
                return;
            }
            foreach (var image in station.StationLogos)
            {
                switch (image.Category)
                {
                case "dark":
                    if (pbDarkRemote.Image != null)
                    {
                        break;
                    }
                    pbDarkRemote.BackColor = Color.FromArgb(255, 6, 15, 30);;
                    pbDarkRemote.Load(image.Url);
                    pbDarkRemote.Refresh();
                    break;

                case "white":
                    if (pbWhiteRemote.Image != null)
                    {
                        break;
                    }
                    pbWhiteRemote.BackColor = Color.FromArgb(255, 6, 15, 30);;
                    pbWhiteRemote.Load(image.Url);
                    pbWhiteRemote.Refresh();
                    break;

                case "light":
                    if (pbLightRemote.Image != null)
                    {
                        break;
                    }
                    pbLightRemote.BackColor = Color.White;
                    pbLightRemote.Load(image.Url);
                    pbLightRemote.Refresh();
                    break;

                case "gray":
                    if (pbGrayRemote.Image != null)
                    {
                        break;
                    }
                    pbGrayRemote.BackColor = Color.White;
                    pbGrayRemote.Load(image.Url);
                    pbGrayRemote.Refresh();
                    break;
                }
            }
        }
Beispiel #2
0
        public frmLogos(LineupStation station)
        {
            InitializeComponent();

            _callsign = station.Callsign;
            _station  = station;

            label7.Text = $"{station.Callsign}\n{station.Name}\n{station.Affiliate}";
            openFileDialog1.InitialDirectory = $"{Helper.Epg123LogosFolder}";
        }