示例#1
0
        private void btnImportFromDreamBox_Click(object sender, EventArgs e)
        {
            String filter = (activeTypeTV ? "bouquets.tv |bouquets.tv" : "bouquets.radio |bouquets.radio");

            dlgOpenFile.FileName = "";
            dlgOpenFile.Filter   = filter;
            if (dlgOpenFile.ShowDialog() == DialogResult.OK)
            {
                mpTVAllChannels = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace("bouquets.tv", "lamedb"), out satteliteName);
                List <Channel> temp = (from c in mpTVAllChannels where c.Name == "Cinema 1 HD" select c).ToList(); //Cinema 1 HD
                mpChannelsSelection = new List <Channel>();
                foreach (var item in mpTVAllChannels)
                {
                    mpChannelsSelection.Add(new Channel(item));
                }
                //mpChannelsSelection = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace("bouquets.tv", "lamedb"), out satteliteName);
                grdMPAllChannels.DataSource = mpChannelsSelection;
                channelGroups = Importer.readBouqetsTV(dlgOpenFile.FileName);
            }

            //activeTypeTV decides to map on Radio/TV
            channelGroups = Importer.mapChannels(channelGroups, activeTypeTV ? mpTVAllChannels : mpRadioAllChannels,
                                                 chkDeleteUnknown.Checked, chkDeleteEmptyNames.Checked, chkDeleteEmptyGroups.Checked);
            RefreshLists();
        }
示例#2
0
        private void btnImportFromLamedb_Click(object sender, EventArgs e)
        {
            String filter = (activeTypeTV ? "lamedb |lamedb" : "bouquets.radio |bouquets.radio");

            dlgOpenFile.FileName = "";
            dlgOpenFile.Filter   = filter;
            if (dlgOpenFile.ShowDialog() == DialogResult.OK)
            {
                //mpTVAllChannels = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace("bouquets.tv", "lamedb"));
                mpChannelsSelection         = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace("bouquets.tv", "lamedb"), out satteliteName);
                grdMPAllChannels.DataSource = mpChannelsSelection;
                //channelGroups = Importer.readBouqetsTV(dlgOpenFile.FileName);
            }
            RefreshLists();
        }
示例#3
0
        private void btnImportfromUserboquet_Click(object sender, EventArgs e)
        {
            String filter = (activeTypeTV ? "File tv |*.tv" : "bouquets.radio |bouquets.radio");

            dlgOpenFile.FileName = "";
            dlgOpenFile.Filter   = filter;
            if (dlgOpenFile.ShowDialog() == DialogResult.OK)
            {
                string file = dlgOpenFile.FileName.Split(char.Parse("\\"))[dlgOpenFile.FileName.Split(char.Parse("\\")).Length - 1];
                mpTVAllChannels     = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace(file, "lamedb"), out satteliteName);
                mpChannelsSelection = new List <Channel>();
                foreach (var item in mpTVAllChannels)
                {
                    mpChannelsSelection.Add(new Channel(item));
                }
                //mpChannelsSelection = ImportFromSettings.getChannelsFromSetting(dlgOpenFile.FileName.Replace(file, "lamedb"), out satteliteName);
                grdMPAllChannels.DataSource = mpChannelsSelection;
                channelGroups = ImportFromSettings.getGroupFromSettings(dlgOpenFile.FileName, mpChannelsSelection);
            }
            RefreshLists();
        }