Exemple #1
0
 public void UpdateTime(BerlinClockDateTime dateTime)
 {
     //No parameter validation, since DateTime is non-nullable type
     currentDateTime = dateTime;
     TopLight        = GetTopLightUiStatus();
     FirstRow        = GetFirstRowUiStatus();
     SecondRow       = GetSecondRowUiStatus();
     ThirdRow        = GetThirdRowUistatus();
     FourthRow       = GetFourthRowUiStatus();
 }
Exemple #2
0
 //[19-11-23, U.Bar] Renamed method from convertTime to ConvertTime: methods should be named with Pascal capitalization style
 public string ConvertTime(string aTime)
 {
     //Method parameters validation
     if (string.IsNullOrEmpty(aTime))
     {
         throw new ArgumentNullException(nameof(aTime));
     }
     try
     {
         //Convert the string in a BerlinClockDateTime object
         BerlinClockDateTime berlinClockDateTime = new BerlinClockDateTime(aTime);
         BerlinClockStatus   berlinClockLayout   = new BerlinClockStatus(berlinClockDateTime);
         return(berlinClockLayout.ToString());
     }
     catch (FormatException e)
     {
         throw new ArgumentException("Could not be converted in BerlinClockDateTime object", nameof(aTime), e);
     }
 }
Exemple #3
0
 public BerlinClockStatus(BerlinClockDateTime dateTime)
 {
     UpdateTime(dateTime);
 }