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(); }
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); } }
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); } }
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(); }