RiskViewModel.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using GalaSoft.MvvmLight;
  2. using Muchinfo.MTPClient.Data.Model;
  3. namespace Muchinfo.MTPClient.Account.ViewModels
  4. {
  5. public class RiskViewModel : ViewModelBase
  6. {
  7. private Announcement _riskMessage;
  8. public RiskViewModel(Announcement riskMessage)
  9. {
  10. _riskMessage = riskMessage;
  11. }
  12. public Announcement RiskMessage
  13. {
  14. get
  15. {
  16. return _riskMessage;
  17. }
  18. set
  19. {
  20. Set(() => RiskMessage, ref _riskMessage, value);
  21. }
  22. }
  23. private int _riskLevel;
  24. public int RiskLevel
  25. {
  26. get
  27. {
  28. return RiskMessage.RiskLevel;
  29. }
  30. set
  31. {
  32. Set(() => RiskLevel, ref _riskLevel, value);
  33. }
  34. }
  35. private string _riskContent;
  36. public string RiskContent
  37. {
  38. get
  39. {
  40. return RiskMessage.Content; ;
  41. }
  42. set
  43. {
  44. Set(() => RiskContent, ref _riskContent, value);
  45. }
  46. }
  47. }
  48. }