Ejemplo n.º 1
0
        public override bool Check()
        {
            LicenseEndDate = InstallDate;
            LicenseEndDate.PlusDay(DayOffFree);
            DataTime_My localDate = DataTime_My.LocalDateTime();

            return(DataTime_My.CompareDates(LicenseEndDate, localDate) >= 0);
        }
Ejemplo n.º 2
0
 public static int CompareDates(DataTime_My firstDate, DataTime_My secondDate)
 {
     if (firstDate.Year > secondDate.Year)
     {
         return(1);
     }
     else if (firstDate.Year < secondDate.Year)
     {
         return(-1);
     }
     else
     { // years are equals
         if (firstDate.Month > secondDate.Month)
         {
             return(1);
         }
         else if (firstDate.Month < secondDate.Month)
         {
             return(-1);
         }
         else
         { // month are equals
             if (firstDate.Day > secondDate.Day)
             {
                 return(1);
             }
             else if (firstDate.Day < secondDate.Day)
             {
                 return(-1);
             }
             else
             {
                 return(0);
             }
         }
     }
     return(-1);
 }
Ejemplo n.º 3
0
 public ComercialSoftware(string name, DevStudio dev, DataTime_My install, int freeDays) : base(name, dev)
 {
     InstallDate = install;
     DayOffFree  = freeDays;
 }
Ejemplo n.º 4
0
 public Shareware(string name, DevStudio dev, DataTime_My date, int days) : base(name, dev)
 {
     InstallDate = date;
     DayOffFree  = days;
 }