Exemplo n.º 1
0
 internal ProgramSwitch(NefitProgram prog)
 {
     DateTime now = Utils.GetNextDate(prog.d, prog.t);
     Timestamp = now;
     Name = (ProgramName) prog.name;
     Temperature = prog.T;            
 }
Exemplo n.º 2
0
 internal static ProgramSwitch[] ParseProgram(NefitProgram[] proag)
 {
     List<ProgramSwitch> programs2 = new List<ProgramSwitch>();
     foreach (NefitProgram prog in proag)
     {
         if (prog.active=="on")
         {
             programs2.Add(new ProgramSwitch(prog));
         }
     }
     programs2.Sort(
         delegate(ProgramSwitch p1, ProgramSwitch p2)
         {
             return p1.Timestamp.CompareTo(p2.Timestamp);
         });
     return programs2.ToArray();
 }