using GalaSoft.MvvmLight; using Muchinfo.MTPClient.Data.Model; namespace Muchinfo.MTPClient.Account.ViewModels { public class NoticeViewModel : ViewModelBase { private Announcement _notice; public NoticeViewModel(Announcement notice) { _notice = notice; } public Announcement Notice { get { return _notice; } set { Set(() => Notice, ref _notice, value); } } private string _noticeTitle; public string NoticeTitle { get { return Notice.Title; } set { Set(() => NoticeTitle, ref _noticeTitle, value); } } private string _noticePubExchName; public string NoticePubExchName { get { return Notice.PubExchName; } set { Set(() => NoticePubExchName, ref _noticePubExchName, value); } } private string _noticePublishDateString; public string NoticePublishDateString { get { return Notice.PublishDateString; } set { Set(() => NoticePublishDateString, ref _noticePublishDateString, value); } } private string _noticeValidDateString; public string NoticeValidDateString { get { return Notice.ValidDateString; } set { Set(() => NoticeValidDateString, ref _noticeValidDateString, value); } } private int _noticeRiskLevel; public int NoticeRiskLevel { get { return Notice.RiskLevel; } set { Set(() => NoticeRiskLevel, ref _noticeRiskLevel, value); } } } }