Files
ChanSort/ChanSort.Loader.Samsung/ModelConstants.cs
hbeham 6d3826cd2e - FIX: Resizing a column caused an exception
- FIX: Deleting satellite channels from an SCM file did not work correctly
- Improved SCM file format detection
- Samsung E/F-Series: channels in the favorite lists now use their prog#  instead of all being put at #1
- fixed LG unit tests
- fixed Samsung tests
2013-06-23 23:22:09 +02:00

41 lines
1.6 KiB
C#

using ChanSort.Api;
namespace ChanSort.Loader.Samsung
{
internal class ModelConstants
{
public readonly string series;
public readonly int dvbsSatelliteLength;
public readonly int dvbsTransponderLength;
public readonly int dvbsChannelLength;
public readonly int dvbtChannelLength;
public readonly int avbtChannelLength;
public readonly int hdplusChannelLength;
public readonly int avbtFineTuneLength;
public readonly int dvbtFineTuneLength;
public readonly Favorites supportedFavorites;
public readonly int ptcLength;
public readonly bool SortedFavorites;
public ModelConstants(IniFile.Section iniSection)
{
this.series = iniSection.Name.Substring(iniSection.Name.Length - 1);
this.avbtChannelLength = iniSection.GetInt("map-AirA");
this.dvbtChannelLength = iniSection.GetInt("map-AirD");
this.dvbsChannelLength = iniSection.GetInt("map-SateD");
this.ptcLength = iniSection.GetInt("PTC");
this.hdplusChannelLength = iniSection.GetInt("map-AstraHDPlusD");
this.dvbsSatelliteLength = iniSection.GetInt("SatDataBase.dat");
this.dvbsTransponderLength = iniSection.GetInt("TransponderDataBase.dat");
this.avbtFineTuneLength = iniSection.GetInt("FineTune");
this.dvbtFineTuneLength = iniSection.GetInt("FineTune_Digital");
int numFavorites = iniSection.GetInt("Favorites");
int mask = 0;
for (int i = 0; i < numFavorites; i++)
mask = (mask << 1) | 1;
this.supportedFavorites = (Favorites)mask;
this.SortedFavorites = iniSection.GetInt("SortedFavorites") != 0;
}
}
}