Inbox development 1
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
namespace FoxTube.Classes
|
||||
{
|
||||
public enum InboxItemType { Default, PatchNote}
|
||||
|
||||
public class InboxItem
|
||||
{
|
||||
public InboxItemType Type { get; set; } = InboxItemType.Default;
|
||||
DateTime TimeStamp { get; set; }
|
||||
|
||||
public string PatchVersion { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Content { get; set; }
|
||||
|
||||
public string Icon
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Type == InboxItemType.PatchNote)
|
||||
return @"";
|
||||
else
|
||||
return @"";
|
||||
}
|
||||
}
|
||||
public string Subtitle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Type == InboxItemType.PatchNote)
|
||||
return "Patch note";
|
||||
else
|
||||
return "Developer's message";
|
||||
}
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Type == InboxItemType.PatchNote)
|
||||
return $"What's new in v{PatchVersion}";
|
||||
else
|
||||
return Subject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public InboxItem(string version, string content, string timeStamp)
|
||||
{
|
||||
Type = InboxItemType.PatchNote;
|
||||
PatchVersion = version;
|
||||
Content = content;
|
||||
TimeStamp = XmlConvert.ToDateTime(timeStamp, XmlDateTimeSerializationMode.Unspecified);
|
||||
}
|
||||
|
||||
public InboxItem(string title, string content, DateTime timeStamp)
|
||||
{
|
||||
Type = InboxItemType.Default;
|
||||
Content = content;
|
||||
TimeStamp = timeStamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user