Click here to Skip to main content
15,894,017 members
Articles / Web Development / HTML

Gallery Server Pro - An ASP.NET Gallery for Sharing Photos, Video, Audio and Other Media

Rate me:
Please Sign up or sign in to vote.
4.86/5 (131 votes)
18 Oct 2013GPL331 min read 828.6K   2.6K   539  
Gallery Server Pro is a complete, stable ASP.NET gallery for sharing photos, video, audio and other media. This article presents the overall architecture and major features.
using System;
using GalleryServerPro.Business.Interfaces;

namespace GalleryServerPro.Business
{
	/// <summary>
	/// Represents a license for the Gallery Server Pro software.
	/// </summary>
	public class License : ILicense
	{
		private string _productKey;
		private bool _isValid;
		private string _email;
		private string _version;
		private LicenseLevel _licenseType;
		private string _keyInvalidReason;
		private bool _isInTrialPeriod;
		private DateTime _installDate;

		/// <summary>
		/// Gets or sets the product key.
		/// </summary>
		/// <value>The product key.</value>
		public string ProductKey
		{
			get { return _productKey; }
			set { _productKey = value; }
		}

		/// <summary>
		/// Gets or sets a value indicating whether the license contained in this instance is legitimate and authorized.
		/// </summary>
		/// <value><c>true</c> if the license is valid; otherwise, <c>false</c>.</value>
		public bool IsValid
		{
			get { return _isValid; }
			set { _isValid = value; }
		}

		/// <summary>
		/// Gets or sets a value indicating whether the application is currently in the initial 30-day trial period.
		/// </summary>
		/// <value><c>true</c> if the application is in the trial period; otherwise, <c>false</c>.</value>
		public bool IsInTrialPeriod
		{
			get { return _isInTrialPeriod; }
			set { _isInTrialPeriod = value; }
		}

		/// <summary>
		/// Gets a value indicating whether the initial 30-day trial for the application has expired and no valid product key 
		/// has been entered.
		/// </summary>
		/// <value><c>true</c> if the application is in the trial period; otherwise, <c>false</c>.</value>
		public bool IsInReducedFunctionalityMode
		{
			get
			{
				return (!IsInTrialPeriod && !IsValid);
			}
		}

		/// <summary>
		/// Gets or sets a message explaining why the key is invalid. Applies only when <see cref="ILicense.IsValid" /> is <c>false</c>.
		/// </summary>
		/// <value>A string explaining why the key is invalid.</value>
		public string KeyInvalidReason
		{
			get { return _keyInvalidReason; }
			set { _keyInvalidReason = value; }
		}

		/// <summary>
		/// Gets or sets the e-mail the license is assigned to.
		/// </summary>
		/// <value>The e-mail the license is assigned to.</value>
		public string Email
		{
			get { return _email; }
			set { _email = value; }
		}

		/// <summary>
		/// Gets or sets the application version the license applies to. Example: 2.4, 2.5
		/// </summary>
		/// <value>The application version the license applies to.</value>
		public string Version
		{
			get { return _version; }
			set { _version = value; }
		}

		/// <summary>
		/// Gets or sets the type of the license applied to the current application.
		/// </summary>
		/// <value>The type of the license.</value>
		public LicenseLevel LicenseType
		{
			get { return _licenseType; }
			set { _licenseType = value; }
		}

		/// <summary>
		/// Gets the date/time this application was installed. The timestamp of the oldest gallery's creation date is
		/// considered to be the application install date.
		/// </summary>
		/// <value>The date/time this application was installed.</value>
		public DateTime InstallDate
		{
			get { return _installDate; }
			set { _installDate = value; }
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior) Tech Info Systems
United States United States
I have nearly 20 years of industry experience in software development, architecture, and Microsoft Office products. My company Tech Info Systems provides custom software development services for corporations, governments, and other organizations. Tech Info Systems is a registered member of the Microsoft Partner Program and I am a Microsoft Certified Professional Developer (MCPD).

I am the creator and lead developer of Gallery Server Pro, a free, open source ASP.NET gallery for sharing photos, video, audio, documents, and other files over the web. It has been developed over several years and has involved thousands of hours. The end result is a robust, configurable, and professional grade gallery that can be integrated into your web site, whether you are a large corporation, small business, professional photographer, or a local church.

Comments and Discussions