namespace PerpetuumSoft.Widgets.Licensing
{
    using System;

    internal class RegKey
    {
        private string hardwareID = string.Empty;
        private bool isTrial = true;
        private string registerName = string.Empty;

        public bool IsValid(string registerName)
        {
            if (!this.isTrial && !(registerName != this.registerName))
            {
                return (LicensingUtilities.HardwareID == this.hardwareID);
            }
            return true;
        }

        public string HardwareID
        {
            get
            {
                return this.hardwareID;
            }
            set
            {
                this.hardwareID = value;
            }
        }

        public bool IsTrial
        {
            get
            {
                return this.isTrial;
            }
            set
            {
                this.isTrial = value;
            }
        }

        public string RegisterName
        {
            get
            {
                return this.registerName;
            }
            set
            {
                this.registerName = value;
            }
        }
    }
}
