123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using KdanCommon.Helpers;
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Windows.System;
- using Windows.UI;
- using Windows.UI.Xaml.Media.Animation;
- namespace KdanCommon.CMSCollection.Data
- {
- public partial class WindowsEventbarResponse
- {
- [JsonProperty("data")]
- public WindowsEnentbarSetting[] Data { get; set; }
- }
- public partial class WindowsEnentbarSetting : ISetting
- {
- [JsonConstructor]
- private WindowsEnentbarSetting(string id, string app_type, DateTime start, DateTime end, string event_icon, string close_icon, string text_color, string background_color, EventbarInformation[] event_information)
- {
- if (close_icon != null)
- CloseIcon = new Uri($"{CMSCollection.CMSDomain}/assets/{close_icon}");
- if (event_icon != null)
- EventIcon = new Uri($"{CMSCollection.CMSDomain}/assets/{event_icon}");
- if (text_color != null)
- TextColor = text_color.ToColor();
- if (background_color != null)
- BackgroundColor = background_color.ToColor();
- Id = id;
- Start = start;
- End = end;
- if(event_information!=null)
- {
- EventbarInformation = event_information.FirstOrDefault();
- }
- }
- public string SettingName
- {
- get
- {
- return Id;
- }
- }
- public string Id { get; }
- public DateTime Start { get; }
- public DateTime End { get; }
- public Color TextColor
- {
- get;
- }
- public Color BackgroundColor
- {
- get;
- }
- public EventbarInformation EventbarInformation { get; }
- public Uri EventIcon
- {
- get;
- }
- public Uri CloseIcon
- {
- get;
- }
- }
- public partial class EventbarInformation
- {
- [JsonProperty("event_title")]
- public string EventTitle { get; set; }
- [JsonProperty("event_link")]
- public string EventLink { get; set; }
- }
- }
|