Exemple #1
0
        /// <summary>
        /// Initilize the cwactivation object.  This overload does no includes a list of object to control.
        /// </summary>
        /// <param name="privateFileName"></param>
        /// <param name="activationCount"></param>
        /// <param name="packageName"></param>
        /// <param name="trialBegin"></param>
        /// <param name="trialPeriod"></param>
        /// <param name="periodType"></param>
        /// <param name="objectsToSecure"></param>
        /// <returns></returns>
        static public void Initilize(String privateFileName,
                                     Int32 activationCount,
                                     String packageName,
                                     DateTime trialBegin,
                                     Int32 trialPeriod,
                                     PeriodType periodType)
        {
            m_FileName = privateFileName;

            if (!InitActivationObject())
            {
                InitCommonDataMembers(activationCount, packageName, trialBegin, trialPeriod, periodType);
                CWProductProtection.Persist();                 //Save it.
            }
        }
Exemple #2
0
        /// <summary>
        /// Initilize the cwactivation object.  This overload includes a list of object to control.
        /// </summary>
        /// <param name="privateFileName"></param>
        /// <param name="activationCount"></param>
        /// <param name="packageName"></param>
        /// <param name="trialBegin"></param>
        /// <param name="trialPeriod"></param>
        /// <param name="periodType"></param>
        /// <param name="objectsToSecure"></param>
        /// <returns>Does not return any value</returns>
        static public void Initilize(String privateFileName,
                                     Int32 activationCount,
                                     String packageName,
                                     DateTime trialBegin,
                                     Int32 trialPeriod,
                                     PeriodType periodType,
                                     List <String> objectsToSecure)
        {
            m_FileName = privateFileName;

            if (!InitActivationObject())
            {
                InitCommonDataMembers(activationCount, packageName, trialBegin, trialPeriod, periodType);
                foreach (String obj in objectsToSecure)
                {
                    CWProductProtection.cwActivation.AddControlledObject(obj);
                }
                CWProductProtection.Persist();                 //Save it.
            }
        }