2013-02-21 01:33:05 +00:00
|
|
|
using System;
|
|
|
|
|
2013-06-10 16:57:30 +00:00
|
|
|
namespace MediaBrowser.Model.Entities
|
2013-02-21 01:33:05 +00:00
|
|
|
{
|
|
|
|
public class MBRegistrationRecord
|
|
|
|
{
|
2013-04-13 21:21:45 +00:00
|
|
|
public DateTime ExpirationDate { get; set; }
|
|
|
|
public bool IsRegistered { get; set;}
|
|
|
|
public bool RegChecked { get; set; }
|
|
|
|
public bool RegError { get; set; }
|
2013-02-21 01:33:05 +00:00
|
|
|
private bool? _isInTrial;
|
|
|
|
public bool TrialVersion
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if (_isInTrial == null)
|
|
|
|
{
|
|
|
|
if (!RegChecked) return false; //don't set this until we've successfully obtained exp date
|
|
|
|
_isInTrial = ExpirationDate > DateTime.Now;
|
|
|
|
}
|
|
|
|
return (_isInTrial.Value && !IsRegistered);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public bool IsValid
|
|
|
|
{
|
|
|
|
get { return !RegChecked || (IsRegistered || TrialVersion); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|