mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-13 02:42:03 +01:00
- added "Settings / Reset to defaults and restart" function to delete the stored customized settings in case something went wrong (like massively oversized column widths) - Philips ChannelMap\_30: fixed error when trying to save this type of list - Upgraded to DevExpress WinForms 20.2.7 user interface library
38 lines
987 B
C#
38 lines
987 B
C#
using System;
|
|
using System.Text;
|
|
|
|
namespace ChanSort.Loader.Samsung.Scm
|
|
{
|
|
internal class SatelliteMapping
|
|
{
|
|
private static readonly Encoding utf16Encoding = new UnicodeEncoding(false, false);
|
|
|
|
private readonly byte[] data;
|
|
public int BaseOffset;
|
|
|
|
public SatelliteMapping(byte[] data, int offset)
|
|
{
|
|
this.data = data;
|
|
this.BaseOffset = offset;
|
|
}
|
|
|
|
public byte MagicMarker { get { return data[BaseOffset]; } }
|
|
public int SatelliteNr { get { return BitConverter.ToInt32(data, BaseOffset + 1); } }
|
|
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
var name = utf16Encoding.GetString(data, BaseOffset + 9, 128);
|
|
var i = name.IndexOf('\0');
|
|
if (i >= 0)
|
|
name = name.Substring(0, i);
|
|
return name;
|
|
}
|
|
}
|
|
|
|
public bool IsEast { get { return BitConverter.ToInt32(data, BaseOffset + 137) != 0; } }
|
|
public int Longitude { get { return BitConverter.ToInt32(data, BaseOffset + 141); } }
|
|
}
|
|
}
|