GetTrialUnitsCount

Top  Previous  Next

This function obtains total units of the trial period. This is can be minutes, hours, days, weeks, months and they are depending from the dimension.

 

public static int IntelliProtector.GetTrialUnitsCount(int dimensions);

 

Parameters

 

 int dimensions - type of the timeframe, where:

         0 - minutes

         1 - hours

         2 - weeks

         3 - days

         4 - months

 

 You can use the predefined enum from the IntelliProtector class: enUnitDimension 

 public enum enUnitDimension

       {

           eudMinutes,

           eudHours,

           eudDays,

           eudWeeks,

           eudMonths

       };

 

Return value

 

 Returns count of time units which are available in the trial period.

 

Requirements

 

 file: IntelliProtector.cs

 namespace: IntelliProtectorService;

 

Example

 

public void ShowTrialDays()

{

 int trialDaysQty = IntelliProtector.GetTrialUnitsCount(IntelliProtector.enUnitDimension.eudDays);

 String daysInTrialMessage = String.Format("Trial days: {0}", trialDaysQty);

 MessageBox.Show(daysInTrialMessage);

}





Copyright © 2011 intelliprotector.com