Exemple #1
0
        public Registration(DataPersistance dp, string EngineName)
        {
            this.dp         = dp;
            this.EngineName = EngineName;
            Vars            = dp.GetVariables("License");

            _AppName = dp.GetVariable <string>("System", "AppName",
                                               string.Empty);

            UserName = Vars.GetVariable <string>("UserName",
                                                 string.Empty);
            CompanyName = Vars.GetVariable <string>("CompanyName",
                                                    string.Empty);
            Limitation      = Vars.GetVariable <int>("Limitation", 0);
            MonthLimitation = Vars.GetVariable <int>(
                "MonthLimitation", 6);
            _RegistrationNo = HardwareIdentification.Pack(
                HardwareIdentification.Value() + _AppName);
            ActivationCode = Vars.GetVariable <string>(
                EngineName + _RegistrationNo, string.Empty);
            if (Limitation < 0 || Limitation > 2)
            {
                Limitation = 0;
            }
            IsOldValidReg = IsValidActivationCode() && Limitation != 0;
        }