示例#1
0
文件: License.cs 项目: wushian/QSet
        /// <summary>
        /// Checks to see if the license if valid for a feature.  If it is not the <see cref="LicenseAboutForm"/>
        /// is displayed to the user.
        /// </summary>
        /// <param name="feature">Feature to validate.</param>
        /// <returns>True if the license is valid for the feature, else false.</returns>
        public bool ValidateFeatureUse(Feature feature)
        {
            bool result = IsFeatureEnabled(feature);

            if (!result)
            {
                LicenseAboutForm licenseAboutForm = new LicenseAboutForm();
                licenseAboutForm.ShowDialog();
                licenseAboutForm.Dispose();
            }

            return(result);
        }
示例#2
0
		/// <summary>
		/// Checks to see if the license if valid for a feature.  If it is not the <see cref="LicenseAboutForm"/> 
		/// is displayed to the user.
		/// </summary>
		/// <param name="feature">Feature to validate.</param>
		/// <returns>True if the license is valid for the feature, else false.</returns>
		public bool ValidateFeatureUse(Feature feature)
		{
			bool result = IsFeatureEnabled(feature);
			
			if (!result)
			{
				LicenseAboutForm licenseAboutForm = new LicenseAboutForm();
				licenseAboutForm.ShowDialog();
				licenseAboutForm.Dispose();
			}

			return result;
		}