private static int CompareStationNames(LineupConfig lineupConfig, string left, string right) { SDStation leftStation = lineupConfig.GetStationByID(left); SDStation rightStation = lineupConfig.GetStationByID(right); return(leftStation.name.CompareTo(rightStation.name)); }
private static int CompareStationCallsigns(LineupConfig lineupConfig, string left, string right) { SDStation leftStation = lineupConfig.GetStationByID(left); SDStation rightStation = lineupConfig.GetStationByID(right); return(leftStation.callsign.CompareTo(rightStation.callsign)); }
internal MXFService(SDStation sdStation) { string stationId = sdStation.stationID; id = StationCache.instance.GetServiceIdByStationId(stationId); uid = "!Service!GSD" + stationId; name = sdStation.name; callSign = sdStation.callsign; if (!string.IsNullOrEmpty(sdStation.affiliate)) { affiliate = StationCache.instance.AddAffiliateAndGetId(sdStation.affiliate); } else { affiliate = StationCache.instance.AddAffiliateAndGetId("Cablecast"); } if (sdStation.logo != null) { logoImage = ImageCache.instance.FindOrCreateMXFImageId(sdStation.logo.URL); } }
private void ChannelSettingsDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.RowIndex >= stationIDs_.Count()) { return; } ChannelSettingsColumn column = GetColumnByIndex(e.ColumnIndex); string stationID = stationIDs_[e.RowIndex]; SDStation station = channelSettingsLineup.GetStationByID(stationID); switch (column) { case ChannelSettingsColumn.Download: channelSettingsLineup.SetExcludedFromDownload(stationID, !channelSettingsLineup.ExcludedFromDownload(stationID)); ChannelSettingsDataGridView.InvalidateRow(e.RowIndex); break; case ChannelSettingsColumn.IncludeInGuide: channelSettingsLineup.SetExcludedFromGuide(stationID, !channelSettingsLineup.ExcludedFromGuide(stationID)); ChannelSettingsDataGridView.InvalidateRow(e.RowIndex); break; } }
internal StationInfo(SDStation station) { sdStation_ = station; }
internal MXFService(SDStation sdStation) { string stationId = sdStation.stationID; id = StationCache.instance.GetServiceIdByStationId(stationId); uid = "!Service!GSD" + stationId; name = sdStation.name; callSign = sdStation.callsign; if (!string.IsNullOrEmpty(sdStation.affiliate)) { affiliate = StationCache.instance.AddAffiliateAndGetId(sdStation.affiliate); } else affiliate = StationCache.instance.AddAffiliateAndGetId("Cablecast"); if (sdStation.logo != null) { logoImage = ImageCache.instance.FindOrCreateMXFImageId(sdStation.logo.URL); } }
internal MXFChannel(ChannelNumberConfig channelNumberConfig, SDStation station) { channelNumberConfig_ = channelNumberConfig; station_ = station; }
private void ChannelSettingsDataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { if (e.RowIndex >= stationIDs_.Count()) { return; } ChannelSettingsColumn column = GetColumnByIndex(e.ColumnIndex); string stationID = stationIDs_[e.RowIndex]; SDStation station = channelSettingsLineup.GetStationByID(stationID); switch (column) { case ChannelSettingsColumn.Callsign: e.Value = station.callsign; break; case ChannelSettingsColumn.DefaultGuideChannels: var defaultChannelNumbers = channelSettingsLineup.defaultStationChannelNumbers[stationID]; e.Value = string.Join("\n", defaultChannelNumbers); break; case ChannelSettingsColumn.DefaultPhysicalChannels: var defaultPhysicalChannels = channelSettingsLineup.defaultStationTuningParams[stationID]; e.Value = string.Join("\n", defaultPhysicalChannels); break; case ChannelSettingsColumn.Download: e.Value = !channelSettingsLineup.ExcludedFromDownload(stationID); break; case ChannelSettingsColumn.EffectiveGuideChannels: var effectiveChannelNumbers = channelSettingsLineup.EffectiveStationChannelNumbers(stationID); e.Value = string.Join("\n", effectiveChannelNumbers); break; case ChannelSettingsColumn.EffectivePhysicalChannels: var effectivePhysicalChannels = channelSettingsLineup.EffectivePhysicalChannelNumbers(stationID); e.Value = string.Join("\n", effectivePhysicalChannels); break; case ChannelSettingsColumn.IncludeInGuide: e.Value = !channelSettingsLineup.ExcludedFromGuide(stationID); break; case ChannelSettingsColumn.Logo: string url = station.logo?.URL; Image image = null; if (url != null) { image = Misc.LoadImageFromURL(url); } e.Value = (image != null) ? image : new Bitmap(1, 1); break; case ChannelSettingsColumn.PhysicalChannelOverride: case ChannelSettingsColumn.GuideChannelOverride: e.Value = "Override"; break; case ChannelSettingsColumn.StationID: e.Value = stationID; break; case ChannelSettingsColumn.StationName: e.Value = station.name; break; } }