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 Shared Function GetTrialUnitsCount(ByVal dimensions As Integer) As Integer

 

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 IntelliProtectorService.IntelliProtector class: enUnitDimension 

 Public Enum enUnitDimension

         eudMinutes

         eudHours

         eudDays

         eudWeeks

         eudMonths

 End Enum        

 

Return value

 

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

 

Requirements

 

 file: IntelliProtector.vb

 

Example

 

Public Sub ShowTrialDays()

    Dim trialDaysQty As Integer = IntelliProtectorService.IntelliProtector.GetTrialUnitsCount(IntelliProtectorService.IntelliProtector.enUnitDimension.eudDays)

    Dim daysInTrialMessage As [String] = [String].Format("Trial days: {0}", trialDaysQty)

    System.Windows.Forms.MessageBox.Show(daysInTrialMessage)

End Sub

 





Copyright © 2011 intelliprotector.com