Channel.cs
author StephaneLenclud
Sun, 17 May 2015 19:36:48 +0200
changeset 6 3061de2306d9
parent 1 f203331a8f4a
permissions -rw-r--r--
Fixing character encoding issues.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Reflection;
     5 using System.Runtime.CompilerServices;
     6 using System.Text;
     7 using System.Threading.Tasks;
     8 
     9 namespace SatChanGen
    10 {
    11 	class Channel
    12 	{
    13 		//Sky Atlantic HD
    14 		public string Name { get; set; }
    15 		//------------------------------------------------------
    16 		//19.2E
    17 		public string OrbitalPosition { get; set; }
    18 		//Astra 1M
    19 		public string Satellite { get; set; }
    20 		//10773.25
    21 		public string Frequency { get; set; }
    22 		//Horizontal/Vertical
    23 		public string Polarisation { get; set; }
    24 		//53
    25 		public string Transponder { get; set; }
    26 		//Astra 1M
    27 		public string Beam { get; set; }
    28 		//DVB-S2
    29 		public string Standard { get; set; }
    30 		//8PSK
    31 		public string Modulation { get; set; }
    32 		//22000
    33 		public string SymbolRate { get; set; }
    34 		//3/4
    35 		public string FEC { get; set; }
    36 		//ASTRA 1
    37 		public string Provider { get; set; }
    38 		//47.9 Mbps
    39 		public string Bitrate { get; set; }
    40 		//1
    41 		public string NetworkID { get; set; }
    42 		//1053
    43 		public string TransponderID { get; set; }
    44 		//------------------------------------------------------
    45 		//Germany
    46 		public string Country { get; set; }
    47 		//Entertainment
    48 		public string Category { get; set; }
    49 		//Sky Deutschland
    50 		public string Packages { get; set; }
    51 		//
    52 		public string Encryption { get; set; }
    53 		//
    54 		public string SID { get; set; }
    55 		//
    56 		public string VPID { get; set; }
    57 		//
    58 		public string Audio { get; set; }
    59 		//
    60 		public string PMT { get; set; }
    61 		//
    62 		public string PCR { get; set; }
    63 		//
    64 		public string TXT { get; set; }
    65 
    66         //////
    67 	    public void Copy(Channel aChannel)
    68 	    {
    69             PropertyInfo[] properties = typeof(Channel).GetProperties();
    70             foreach (PropertyInfo property in properties)
    71             {
    72                 object value = property.GetValue(aChannel);
    73                 property.SetValue(this,value);
    74             }	        
    75 	    }
    76 
    77 		//////
    78 		public override string ToString()
    79 		{
    80 			string res = "============[Channel]============\n";
    81 			PropertyInfo[] properties = typeof(Channel).GetProperties();
    82 			foreach (PropertyInfo property in properties)
    83 			{
    84 				object value = property.GetValue(this);
    85 				if (value is string)
    86 				{
    87 					res += property.Name + ": " + value + "\n";
    88 				}
    89 			}
    90 
    91 			return res;
    92 		}
    93 	}
    94 }