示例#1
0
        public static bool CheckLicence(Licence licence)
        {
            if (licence == null)
            {
                return false;
            }

            if (licence.Status != Licence.LicenceStatus.OK)
            {
                // trial
                licence.RecordUsage();

                return false;
            }

            return true;
        }
示例#2
0
        public static bool Activate(Licence licence)
        {
            if (!licence.IsValid)
            {
                return false;
            }

            Options.Current.Licence = licence;
            Options.Current.Save();

            return true;
        }