Ejemplo n.º 1
0
        private void RefreshChList(bool showLoading)
        {
            Channels channels = Channels.Get();

            if (showLoading)
            {
                loadingPanel.Size    = this.Size;
                loadingPanel.Visible = true;
                loadingPanel.BringToFront();
            }
            new System.Threading.Thread(delegate()
            {
                channels.RefreshList();
                if (channels.NeedRefresh())
                {
                    fillChannelList();
                    cmbGroups.Invoke((System.Threading.ThreadStart) delegate
                    {
                        cmbGroups.Items.Clear();
                        foreach (string group in lstListsChannels.Keys)
                        {
                            cmbGroups.Items.Add(group);
                        }
                    });
                }
                loadingPanel.Invoke((System.Threading.ThreadStart) delegate {
                    loadingPanel.Visible = false;
                });
            }).Start();
        }
Ejemplo n.º 2
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Preferences pref = new Preferences();

            pref.ShowDialog();
            Channels channels = Channels.Get();

            if (channels.NeedRefresh())
            {
                loadingPanel.Visible = true;
                loadingPanel.Size    = new Size(799, 516);
                loadingPanel.BringToFront();
                new System.Threading.Thread(delegate()
                {
                    channels.RefreshList();
                    fillChannelList();
                    loadingPanel.Invoke((System.Threading.ThreadStart) delegate {
                        loadingPanel.Visible = false;
                        loadingPanel.Size    = new Size(20, 20);
                    });
                }).Start();
            }
            EPG_DB epgDB = EPG_DB.Get();

            if (epgDB.Refresh)
            {
                loadingPanel.Visible = true;
                loadingPanel.Size    = new Size(799, 516);
                loadingPanel.BringToFront();
                DownloadEPGFile(epgDB, config.AppSettings.Settings["Epg"].Value);
            }
        }
Ejemplo n.º 3
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Preferences pref = new Preferences();

            pref.PrincipalForm = this;

            pref.ShowDialog();
            Channels channels = Channels.Get();

            if (channels.NeedRefresh())
            {
                loadingPanel.Visible = true;

                loadingPanel.Size = this.Size;
                loadingPanel.BringToFront();
                new System.Threading.Thread(delegate()
                {
                    channels.RefreshList();
                    fillChannelList();
                    cmbGroups.Invoke((System.Threading.ThreadStart) delegate
                    {
                        cmbGroups.Items.Clear();
                        foreach (string group in lstListsChannels.Keys)
                        {
                            cmbGroups.Items.Add(group);
                        }
                    });
                    loadingPanel.Invoke((System.Threading.ThreadStart) delegate {
                        loadingPanel.Visible = false;
                        loadingPanel.Size    = new Size(20, 20);
                    });
                }).Start();
            }
            EPG_DB epgDB = EPG_DB.Get();

            if (epgDB.Refresh)
            {
                loadingPanel.Visible = true;
                loadingPanel.Size    = this.Size;
                loadingPanel.BringToFront();
                DownloadEPGFile(epgDB, AmiConfiguration.Get().URL_EPG);
            }
        }
Ejemplo n.º 4
0
        private void RefreshChList(bool showLoading)
        {
            Channels channels = Channels.Get();

            if (showLoading)
            {
                loadingPanel.Visible = true;
                loadingPanel.BringToFront();
            }
            new System.Threading.Thread(delegate()
            {
                channels.RefreshList();
                if (channels.NeedRefresh())
                {
                    fillChannelList();
                }
                loadingPanel.Invoke((System.Threading.ThreadStart) delegate {
                    loadingPanel.Visible = false;
                });
            }).Start();
        }