diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..dd293cf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.sdf
diff --git a/source/ChanSort.Api/Lookup.csv b/source/ChanSort.Api/Lookup.csv
index 05bc1cd..6230918 100644
--- a/source/ChanSort.Api/Lookup.csv
+++ b/source/ChanSort.Api/Lookup.csv
@@ -13,9 +13,7 @@ SERVICETYPE;211;Option
ONID;Start;End;Name;Operator
ONID;0x0000;0x0000;(Reserved);(Reserved)
-ONID;0x0001;0x0001;Société Européenne des Satellites;Société Européenne des Satellites
-ONID;0x0002;0x0002;Société Européenne des Satellites;Société Européenne des Satellites
-ONID;0x0003;0x0019;Société Européenne des Satellites;Société Européenne des Satellites
+ONID;0x0001;0x0019;SES/Astra;SES/Astra
ONID;0x001A;0x001A;Quiero Televisión ;Quiero Televisión
ONID;0x001B;0x001B;RAI;RAI
ONID;0x001C;0x001C;Hellas-Sat S.A.;Hellas-Sat S.A.
diff --git a/source/ChanSort.Api/Model/ChannelInfo.cs b/source/ChanSort.Api/Model/ChannelInfo.cs
index db370d3..1590768 100644
--- a/source/ChanSort.Api/Model/ChannelInfo.cs
+++ b/source/ChanSort.Api/Model/ChannelInfo.cs
@@ -8,6 +8,8 @@ namespace ChanSort.Api
private const int MAX_FAV_LISTS = 5;
private string uid;
+ private string serviceTypeName;
+
///
/// List of channels that have the same UID as this channel and were not added to the channel list directly
///
@@ -151,7 +153,12 @@ namespace ChanSort.Api
#endregion
#region ServiceTypeName
- public string ServiceTypeName { get { return LookupData.Instance.GetServiceTypeDescription(this.ServiceType); } }
+
+ public string ServiceTypeName
+ {
+ get { return this.serviceTypeName ?? (this.serviceTypeName = LookupData.Instance.GetServiceTypeDescription(this.ServiceType)); }
+ set { this.serviceTypeName = value; }
+ }
#endregion
#region GetFavString()
@@ -212,6 +219,14 @@ namespace ChanSort.Api
for (int i = 0; i < len; i++)
this.AddDebug(data[offset + i]);
}
+
+ public void AddDebug(string val)
+ {
+ if (this.Debug == null)
+ this.Debug = val;
+ else
+ this.Debug += " " + val;
+ }
#endregion
#region UpdateRawData()
diff --git a/source/ChanSort.Api/Model/ChannelList.cs b/source/ChanSort.Api/Model/ChannelList.cs
index 2476b8b..2cd7655 100644
--- a/source/ChanSort.Api/Model/ChannelList.cs
+++ b/source/ChanSort.Api/Model/ChannelList.cs
@@ -6,8 +6,6 @@ namespace ChanSort.Api
{
public class ChannelList
{
- private readonly SignalSource source;
- private readonly IList channels = new List();
private readonly Dictionary> channelByUid = new Dictionary>();
private readonly Dictionary channelByProgNr = new Dictionary();
private readonly Dictionary> channelByName = new Dictionary>();
@@ -17,20 +15,21 @@ namespace ChanSort.Api
public ChannelList(SignalSource source, string caption)
{
- this.source = source;
+ this.SignalSource = source;
this.ShortCaption = caption;
this.FirstProgramNumber = (source & SignalSource.Digital) != 0 ? 1 : 0;
}
- public string ShortCaption { get; private set; }
- public SignalSource SignalSource { get { return this.source; } }
- public IList Channels { get { return this.channels; } }
- public int Count { get { return channels.Count; } }
- public int DuplicateUidCount { get { return duplicateUidCount; } }
- public int DuplicateProgNrCount { get { return duplicateProgNrCount; } }
+ public string ShortCaption { get; }
+ public SignalSource SignalSource { get; }
+ public IList Channels { get; } = new List();
+ public int Count => Channels.Count;
+ public int DuplicateUidCount => duplicateUidCount;
+ public int DuplicateProgNrCount => duplicateProgNrCount;
public bool ReadOnly { get; set; }
public int MaxChannelNameLength { get; set; }
public int PresetProgramNrCount { get; private set; }
+ public IList VisibleColumnFieldNames;
#region Caption
public string Caption
@@ -97,7 +96,7 @@ namespace ChanSort.Api
if (ci.ProgramNrPreset != 0)
++this.PresetProgramNrCount;
- this.channels.Add(ci);
+ this.Channels.Add(ci);
return warning2;
}
@@ -130,21 +129,21 @@ namespace ChanSort.Api
#region GetChannelByNewProgNr()
public IList GetChannelByNewProgNr(int newProgNr)
{
- return this.channels.Where(c => c.NewProgramNr == newProgNr).ToList();
+ return this.Channels.Where(c => c.NewProgramNr == newProgNr).ToList();
}
#endregion
#region GetChannelsByNewOrder()
public IList GetChannelsByNewOrder()
{
- return this.channels.OrderBy(c => c.NewProgramNr).ToList();
+ return this.Channels.OrderBy(c => c.NewProgramNr).ToList();
}
#endregion
#region RemoveChannel()
public void RemoveChannel(ChannelInfo channel)
{
- this.channels.Remove(channel);
+ this.Channels.Remove(channel);
var list = this.channelByUid.TryGet(channel.Uid);
if (list != null && list.Contains(channel))
list.Remove(channel);
diff --git a/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.csproj b/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.csproj
new file mode 100644
index 0000000..2da61ec
--- /dev/null
+++ b/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.csproj
@@ -0,0 +1,69 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D093E7EE-D3AD-4E7B-AF82-C6918CA017FB}
+ Library
+ Properties
+ ChanSort.Loader.Hisense
+ ChanSort.Loader.Hisense
+ v4.0
+ 512
+
+
+
+
+ true
+ full
+ false
+ ..\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ x86
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+ {dccffa08-472b-4d17-bb90-8f513fc01392}
+ ChanSort.Api
+
+
+
+
+
\ No newline at end of file
diff --git a/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.ini b/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.ini
new file mode 100644
index 0000000..5b3d3c5
--- /dev/null
+++ b/source/ChanSort.Loader.Hisense/ChanSort.Loader.Hisense.ini
@@ -0,0 +1,78 @@
+[Header]
+ID=0
+Name=2
+NameLength=34
+BlockSize=36
+
+[TSL_Record]
+RecordSize=328
+ID=0
+BroadcastType=2
+ServiceType=3
+Frequency=16
+SymbolRate=28
+Name=216
+NameLength=96
+
+
+[SVL_Record]
+RecordSize=304
+
+RecordId=0
+ChannelId=6
+
+HashcodeFieldMask=8
+HashcodeFieldMask_Name=0x01
+HashcodeFieldMask_ChannelId=0x02
+HashcodeFieldMask_BroadcastType=0x04
+HashcodeFieldMask_TslRecId=0x08
+HashcodeFieldMask_PrgNum=0x10
+HashcodeFieldMask_ShortName=0x20
+HashcodeFieldMask_Radio = 0x0400
+HashcodeFieldMask_Encrypted = 0x0800
+HashcodeFieldMask_Tv = 0x2000
+
+NwMask=12
+NwMask_Skip = 0x08
+NwMask_Fav1 = 0x10
+NwMask_Fav2 = 0x20
+NwMask_Fav3 = 0x40
+NwMask_Fav4 = 0x80
+NwMask_Lock = 0x80
+NwMask_Hide = 0x00
+
+OptionMask=16
+MaskRename = 0x08
+MaskMoved = 0x400
+
+OptionMask2=20
+
+ProgramId=24
+TslTableId=26
+TslRecordId=28
+NwlTableId=30
+NwlRecordId=32
+SatlTableId=34
+SatlRecordId=36
+BroadcastType=38
+ServiceType=39
+Name=40
+NameLength=96
+
+BroadcastSystemData=136
+
+[DVB_Data]
+ShortName=4
+ShortName_Size=16
+LinkageMask=28
+LinkageMask_Ts=0x04
+
+Onid=44
+Tsid=46
+Ssid=48
+Encrypted=64
+
+[Columns]
+DVB_T=Position,OldProgramNr,Name,ShortName,Favorites,Lock,Skip,Encrypted,ChannelOrTransponder,FreqInMhz,ServiceTypeName
+DVB_C=Position,OldProgramNr,Name,ShortName,Favorites,Lock,Skip,Encrypted,ChannelOrTransponder,FreqInMhz,ServiceTypeName,SymbolRate
+DVB_S=Position,OldProgramNr,Name,ShortName,Favorites,Lock,Skip,Encrypted,FreqInMhz,ServiceTypeName,SymbolRate
diff --git a/source/ChanSort.Loader.Hisense/HisSerializer.cs b/source/ChanSort.Loader.Hisense/HisSerializer.cs
new file mode 100644
index 0000000..0fd07cf
--- /dev/null
+++ b/source/ChanSort.Loader.Hisense/HisSerializer.cs
@@ -0,0 +1,305 @@
+using System;
+using System.CodeDom;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using ChanSort.Api;
+
+namespace ChanSort.Loader.Hisense
+{
+ public class HisSerializer : SerializerBase
+ {
+ private readonly ChannelList dvbcChannels = new ChannelList(SignalSource.DvbC | SignalSource.Tv | SignalSource.Radio, "DVB-C");
+ private readonly ChannelList dvbtChannels = new ChannelList(SignalSource.DvbT | SignalSource.Tv | SignalSource.Radio, "DVB-T");
+ private readonly ChannelList dvbsChannels = new ChannelList(SignalSource.DvbS | SignalSource.Tv | SignalSource.Radio, "DVB-S");
+
+ private byte[] svlFileContent;
+ private byte[] tslFileContent;
+ private const int MaxFileSize = 4 << 20; // 4 MB
+
+ private int tSize, cSize, sSize;
+
+
+ #region DisplayName
+ public override string DisplayName => "Hisense HIS_SVL.BIN Loader";
+ #endregion
+
+ private const string ERR_fileTooBig = "The file size {0} is larger than the allowed maximum of {1}.";
+ private const string ERR_badFileFormat = "The content of the file doesn't match the expected format.";
+
+ private DataMapping svlMapping, tslMapping, dvbMapping;
+ private readonly Dictionary transponder = new Dictionary();
+
+ #region ctor()
+ public HisSerializer(string inputFile) : base(inputFile)
+ {
+ this.Features.ChannelNameEdit = ChannelNameEditMode.All;
+ this.ReadConfigurationFromIniFile();
+ this.DataRoot.AddChannelList(dvbcChannels);
+ this.DataRoot.AddChannelList(dvbtChannels);
+ this.DataRoot.AddChannelList(dvbsChannels);
+ }
+ #endregion
+
+ #region ReadConfigurationFromIniFile()
+
+ private void ReadConfigurationFromIniFile()
+ {
+ string iniFile = this.GetType().Assembly.Location.ToLower().Replace(".dll", ".ini");
+ IniFile ini = new IniFile(iniFile);
+ this.svlMapping = new DataMapping(ini.GetSection("SVL_Record"));
+ this.svlMapping.DefaultEncoding = Encoding.UTF8;
+ this.tslMapping = new DataMapping(ini.GetSection("TSL_Record"));
+ this.tslMapping.DefaultEncoding = Encoding.UTF8;
+ this.dvbMapping = new DataMapping(ini.GetSection("DVB_Data"));
+ this.dvbMapping.DefaultEncoding = Encoding.UTF8;
+
+ var sec = ini.GetSection("Columns");
+ var fields = sec.GetString("DVB_T");
+ if (fields != null)
+ dvbtChannels.VisibleColumnFieldNames = fields.Trim().Split(',');
+ fields = sec.GetString("DVB_C");
+ if (fields != null)
+ dvbcChannels.VisibleColumnFieldNames = fields.Trim().Split(',');
+ fields = sec.GetString("DVB_S");
+ if (fields != null)
+ dvbsChannels.VisibleColumnFieldNames = fields.Trim().Split(',');
+ }
+ #endregion
+
+
+ #region Load()
+
+ public override void Load()
+ {
+ this.LoadTslFile(this.FileName.Replace("SVL", "TSL"));
+ this.LoadSvlFile(this.FileName);
+ }
+
+ #endregion
+
+ #region LoadTslFile()
+ private void LoadTslFile(string fileName)
+ {
+ long fileSize = new FileInfo(fileName).Length;
+ if (fileSize > MaxFileSize)
+ throw new FileLoadException(string.Format(ERR_fileTooBig, fileSize, MaxFileSize));
+ this.tslFileContent = File.ReadAllBytes(fileName);
+ int off = 0;
+
+ tSize = this.ReadHeader(tslFileContent, ref off);
+ cSize = this.ReadHeader(tslFileContent, ref off);
+ sSize = this.ReadHeader(tslFileContent, ref off);
+ this.ReadTransponder(ref off, tSize, 1, 1000000);
+ this.ReadTransponder(ref off, cSize, 2, 1000000);
+ this.ReadTransponder(ref off, sSize, 3, 1);
+ }
+ #endregion
+
+ #region ReadTransponder()
+ private void ReadTransponder(ref int off, int size, int table, int freqFactor)
+ {
+ int recordSize = tslMapping.Settings.GetInt("RecordSize");
+ if (size % recordSize != 0)
+ throw new FileLoadException(ERR_badFileFormat);
+ int count = size / recordSize;
+ if (count == 0)
+ return;
+
+ for (int i = 0; i < count; i++)
+ {
+ tslMapping.SetDataPtr(tslFileContent, off);
+ var id = (table << 16) + tslMapping.GetWord("ID");
+ var trans = new Transponder(id);
+ trans.FrequencyInMhz = (decimal)tslMapping.GetDword("Frequency") / freqFactor;
+ trans.SymbolRate = tslMapping.GetWord("SymbolRate");
+ this.transponder.Add(id, trans);
+ off += recordSize;
+ }
+ }
+ #endregion
+
+ #region LoadSvlFile()
+
+ private void LoadSvlFile(string fileName)
+ {
+ long fileSize = new FileInfo(fileName).Length;
+ if (fileSize > MaxFileSize)
+ throw new FileLoadException(string.Format(ERR_fileTooBig, fileSize, MaxFileSize));
+ this.svlFileContent = File.ReadAllBytes(this.FileName);
+ int off = 0;
+
+ tSize = this.ReadHeader(svlFileContent, ref off);
+ cSize = this.ReadHeader(svlFileContent, ref off);
+ sSize = this.ReadHeader(svlFileContent, ref off);
+ this.ReadChannelList(ref off, tSize, 1, dvbtChannels);
+ this.ReadChannelList(ref off, cSize, 2, dvbcChannels);
+ this.ReadChannelList(ref off, sSize, 3, dvbsChannels);
+ }
+ #endregion
+
+ #region ReadHeader()
+ private int ReadHeader(byte[] data, ref int off)
+ {
+ if (off + 40 > data.Length)
+ throw new FileLoadException(ERR_badFileFormat);
+ var blockSize = BitConverter.ToInt32(data, off + 36);
+ if (off + blockSize > data.Length)
+ throw new FileLoadException(ERR_badFileFormat);
+
+ off += 40;
+ return blockSize;
+ }
+ #endregion
+
+ #region ReadChannelList()
+ private void ReadChannelList(ref int off, int size, int table, ChannelList channels)
+ {
+ int recordSize = svlMapping.Settings.GetInt("RecordSize");
+ if (size % recordSize != 0)
+ throw new FileLoadException(ERR_badFileFormat);
+ int channelCount = size/recordSize;
+ if (channelCount == 0)
+ return;
+
+ var broadcastDataOffset = svlMapping.Settings.GetInt("BroadcastSystemData");
+ var nameLength = svlMapping.Settings.GetInt("NameLength");
+ var source = channels.SignalSource & (SignalSource.MaskAnalogDigital | SignalSource.MaskAntennaCableSat);
+ for (int i = 0; i < channelCount; i++)
+ {
+ svlMapping.SetDataPtr(svlFileContent, off);
+ dvbMapping.SetDataPtr(svlFileContent, off + broadcastDataOffset);
+ var ci = ReadChannel(source, i, nameLength);
+ if (ci != null)
+ this.DataRoot.AddChannel(channels, ci);
+ off += recordSize;
+ }
+ }
+ #endregion
+
+ #region ReadChannel()
+ private ChannelInfo ReadChannel(SignalSource source, int index, int nameLength)
+ {
+ ChannelInfo ci = new ChannelInfo(source, index, 0, "");
+ //ci.RecordIndex = svlMapping.GetWord("RecordId");
+ ci.OldProgramNr = svlMapping.GetWord("ChannelId") >> 2;
+
+ var nwMask = svlMapping.GetDword("NwMask");
+ ci.Skip = (nwMask & svlMapping.Settings.GetInt("NwMask_Skip")) != 0;
+ ci.Lock = (nwMask & svlMapping.Settings.GetInt("NwMask_Lock")) != 0;
+ ci.Hidden = (nwMask & svlMapping.Settings.GetInt("NwMask_Hide")) != 0;
+ for (int i = 0; i < 3; i++)
+ {
+ bool isFav = (nwMask & svlMapping.Settings.GetInt("NwMask_Fav" + (i + 1))) != 0;
+ if (isFav)
+ ci.Favorites |= (Favorites) (1 << i);
+ }
+
+ var fieldMask = svlMapping.GetDword("HashcodeFieldMask");
+
+ if ((fieldMask & svlMapping.Settings.GetInt("HashcodeFieldMask_Name")) != 0)
+ {
+ ci.Name = svlMapping.GetString("Name", nameLength);
+ int term = ci.Name.IndexOf('\0');
+ if (term >= 0)
+ ci.Name = ci.Name.Substring(0, term);
+ }
+
+ var serviceType = svlMapping.GetByte("ServiceType");
+ if (serviceType == 1)
+ {
+ ci.SignalSource |= SignalSource.Tv;
+ ci.ServiceTypeName = "TV";
+ }
+ else if (serviceType == 2)
+ {
+ ci.SignalSource |= SignalSource.Radio;
+ ci.ServiceTypeName = "Radio";
+ }
+ else
+ {
+ ci.ServiceTypeName = "Data";
+ }
+
+ if ((fieldMask & svlMapping.Settings.GetInt("HashcodeFieldMask_TslRecId")) != 0)
+ {
+ int transpTableId = svlMapping.GetByte("TslTableId");
+ int transpRecordId = svlMapping.GetByte("TslRecordId");
+ var transpId = (transpTableId << 16) + transpRecordId;
+ var transp = this.transponder.TryGet(transpId);
+ if (transp != null)
+ {
+ ci.Transponder = transp;
+ ci.FreqInMhz = transp.FrequencyInMhz;
+ ci.SymbolRate = transp.SymbolRate;
+ }
+ }
+
+ if ((fieldMask & svlMapping.Settings.GetInt("HashcodeFieldMask_BroadcastType")) != 0)
+ {
+ var bcastType = svlMapping.GetByte("BroadcastType");
+ if (bcastType == 1)
+ ReadAnalogData(ci);
+ else if (bcastType == 2)
+ ReadDvbData(ci);
+ }
+
+ ci.Encrypted = (fieldMask & svlMapping.Settings.GetInt("HashcodeFieldMask_Encrypted")) != 0;
+
+ //ci.AddDebug("u1=");
+ //ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 2, 2);
+ //ci.AddDebug("u2=");
+ //ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 4, 2);
+ //ci.AddDebug(", hash=");
+ //ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 8, 2);
+ //ci.AddDebug(", nw=");
+ //ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 12, 4);
+ //ci.AddDebug(", o1=");
+ //ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 16, 4);
+ ci.AddDebug(", o2=");
+ ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 20, 4);
+ ci.AddDebug("progId=");
+ ci.AddDebug(svlMapping.Data, svlMapping.BaseOffset + 24, 4);
+
+ return ci;
+ }
+ #endregion
+
+ #region ReadAnalogData()
+ private void ReadAnalogData(ChannelInfo ci)
+ {
+
+ }
+ #endregion
+
+ #region ReadDvbData()
+ private void ReadDvbData(ChannelInfo ci)
+ {
+ var mask = dvbMapping.GetDword("LinkageMask");
+ var tsFlag = dvbMapping.Settings.GetInt("LinkageMask_Ts");
+
+ if ((mask & tsFlag) != 0)
+ {
+ ci.OriginalNetworkId = dvbMapping.GetWord("Onid");
+ ci.TransportStreamId = dvbMapping.GetWord("Tsid");
+ ci.ServiceId = dvbMapping.GetWord("Ssid");
+ }
+ //ci.Encrypted = dvbMapping.GetByte("Encrypted") != 0;
+
+ if ((ci.SignalSource & SignalSource.DvbT) == SignalSource.DvbT)
+ ci.ChannelOrTransponder = LookupData.Instance.GetDvbtTransponder(ci.FreqInMhz).ToString();
+
+ ci.ShortName = dvbMapping.GetString("ShortName", dvbMapping.Settings.GetInt("ShortName_Size"));
+ }
+ #endregion
+
+
+ // Saving ====================================
+
+ #region Save()
+ public override void Save(string tvOutputFile)
+ {
+ }
+ #endregion
+ }
+}
diff --git a/source/ChanSort.Loader.Hisense/HisSerializerPlugin.cs b/source/ChanSort.Loader.Hisense/HisSerializerPlugin.cs
new file mode 100644
index 0000000..b148984
--- /dev/null
+++ b/source/ChanSort.Loader.Hisense/HisSerializerPlugin.cs
@@ -0,0 +1,26 @@
+//#define HISENSE_ENABLED
+
+/*
+Support for the Hisense file format (Sep 2015) is currently disabled due to the risk of damaging the TV when
+users import files in an older/newer format than the currently installed firmware expects.
+*/
+
+using ChanSort.Api;
+
+namespace ChanSort.Loader.Hisense
+{
+#if HISENSE_ENABLED
+ public class HisSerializerPlugin : ISerializerPlugin
+ {
+ public string PluginName => "Hisense HIS_*.bin";
+ public string FileFilter => "HIS_SVL.BIN";
+
+#region CreateSerializer()
+ public SerializerBase CreateSerializer(string inputFile)
+ {
+ return new HisSerializer(inputFile);
+ }
+#endregion
+ }
+#endif
+}
diff --git a/source/ChanSort.Loader.Hisense/Properties/AssemblyInfo.cs b/source/ChanSort.Loader.Hisense/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8df14bb
--- /dev/null
+++ b/source/ChanSort.Loader.Hisense/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ChanSort.Loader.Hisense")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ChanSort.Loader.Hisense")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d093e7ee-d3ad-4e7b-af82-c6918ca017fb")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/source/ChanSort/MainForm.cs b/source/ChanSort/MainForm.cs
index 1d33b74..fb99dfd 100644
--- a/source/ChanSort/MainForm.cs
+++ b/source/ChanSort/MainForm.cs
@@ -25,7 +25,7 @@ namespace ChanSort.Ui
{
public partial class MainForm : XtraForm
{
- public const string AppVersion = "v2015-09-16";
+ public const string AppVersion = "v2015-09-19";
private const int MaxMruEntries = 10;
@@ -598,7 +598,7 @@ namespace ChanSort.Ui
this.SaveInputGridLayout(this.currentChannelList.SignalSource);
if (channelList != null)
{
- this.LoadInputGridLayout(channelList.SignalSource);
+ this.LoadInputGridLayout(channelList);
this.gridRight.DataSource = channelList.Channels;
this.gridLeft.DataSource = channelList.Channels;
@@ -1224,9 +1224,10 @@ namespace ChanSort.Ui
#endregion
#region LoadInputGridLayout()
- private void LoadInputGridLayout(SignalSource newSource)
+ private void LoadInputGridLayout(ChannelList list)
{
string newLayout;
+ var newSource = list.SignalSource;
if ((newSource & SignalSource.Analog) != 0)
newLayout = Settings.Default.InputGridLayoutAnalog;
else if ((newSource & SignalSource.DvbS) != 0)
@@ -1237,7 +1238,7 @@ namespace ChanSort.Ui
this.SetGridLayout(this.gviewRight, newLayout);
foreach (GridColumn col in this.gviewRight.Columns)
- col.Visible = GetGridColumnVisibility(col, newSource);
+ col.Visible = GetGridColumnVisibility(col, list);
this.ClearRightFilter();
}
@@ -1258,8 +1259,13 @@ namespace ChanSort.Ui
#region GetGridColumnVisibility()
- private bool GetGridColumnVisibility(GridColumn col, SignalSource source)
+ private bool GetGridColumnVisibility(GridColumn col, ChannelList list)
{
+ var filter = list.VisibleColumnFieldNames;
+ if (filter != null && !filter.Contains(col.FieldName))
+ return false;
+
+ var source = list.SignalSource;
if (col == this.colChannelOrTransponder) return (source & SignalSource.Sat) == 0;
if (col == this.colShortName) return (source & SignalSource.Digital) != 0;
if (col == this.colEncrypted) return (source & SignalSource.Digital) != 0;
diff --git a/source/ChanSort/Properties/licenses.licx b/source/ChanSort/Properties/licenses.licx
index e69de29..9fecd31 100644
--- a/source/ChanSort/Properties/licenses.licx
+++ b/source/ChanSort/Properties/licenses.licx
@@ -0,0 +1,6 @@
+DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v15.1, Version=15.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/source/makeDistribZip.cmd b/source/makeDistribZip.cmd
index ab84fbf..62f1caa 100644
--- a/source/makeDistribZip.cmd
+++ b/source/makeDistribZip.cmd
@@ -1,7 +1,7 @@
@echo off
set curdate=%date:~6,4%-%date:~3,2%-%date:~0,2%
set target=%cd%\..\..\ChanSort_%curdate%
-set DXversion=14.2
+set DXversion=15.1
mkdir "%target%" 2>nul
del /s /q "%target%\*"
copy debug\ChanSort.exe* "%target%"