ActivateTrial static method

int ActivateTrial()

Starts the verified trial in your application by contacting the Cryptlex servers. Returns LexStatusCodes LA_OK, LA_TRIAL_EXPIRED

This function should be executed when your application starts first time on the user's computer, ideally on a button click. Note: This function is only meant for verified trials.

The function throws a LexActivatorException on error.

Implementation

static int ActivateTrial() {
  int status = _lexActivatorNative.ActivateTrial();
  switch (status) {
    case LexStatusCodes.LA_OK:
      return LexStatusCodes.LA_OK;
    case LexStatusCodes.LA_TRIAL_EXPIRED:
      return LexStatusCodes.LA_TRIAL_EXPIRED;
    case LexStatusCodes.LA_FAIL:
      return LexStatusCodes.LA_FAIL;
    default:
      throw LexActivatorException(status);
  }
}