FundsDetails.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //----------------------------------------------------------------
  2. //Module Name: $safeprojectname$
  3. //Purpose:
  4. //CopyRight: Muchinfo
  5. //History:
  6. //----------------------------------------------------------------
  7. //DateTime 2016/4/19 10:29:09
  8. //Author
  9. //Description Create
  10. //----------------------------------------------------------------
  11. using GalaSoft.MvvmLight;
  12. using System.Collections.Generic;
  13. using System.Collections.ObjectModel;
  14. using System.ComponentModel;
  15. using Muchinfo.MTPClient.Data.Helper;
  16. namespace Muchinfo.MTPClient.Data.Model.Account
  17. {
  18. public class FundsDetails : ViewModelBase
  19. {
  20. private eTradeMode _marketType;
  21. /// <summary>
  22. /// 市场类型
  23. /// </summary>
  24. public eTradeMode MarketType
  25. {
  26. get { return _marketType; }
  27. set
  28. {
  29. Set(() => MarketType, ref _marketType, value);
  30. RaisePropertyChanged(() => MarketTypeDisplay);
  31. //if (MarketType == eTradeMode.AmountSum)
  32. //{
  33. //}
  34. }
  35. }
  36. /// <summary>
  37. /// Gets the market type display.
  38. /// </summary>
  39. /// <value>The market type display.</value>
  40. public string MarketTypeDisplay
  41. {
  42. get
  43. {
  44. return _marketType.Discription();
  45. }
  46. }
  47. private ObservableCollection<FundsDetails> items;
  48. public ObservableCollection<FundsDetails> Items
  49. {
  50. get
  51. {
  52. if (this.items == null)
  53. {
  54. this.items = new ObservableCollection<FundsDetails>();
  55. }
  56. return this.items;
  57. }
  58. set
  59. {
  60. if (value != this.items)
  61. {
  62. this.items = value;
  63. this.OnPropertyChanged("Items");
  64. }
  65. }
  66. }
  67. protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
  68. {
  69. PropertyChangedEventHandler handler = this.PropertyChanged;
  70. if (handler != null)
  71. {
  72. handler(this, args);
  73. }
  74. }
  75. private void OnPropertyChanged(string propertyName)
  76. {
  77. this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
  78. }
  79. public event PropertyChangedEventHandler PropertyChanged;
  80. #region 资管重构
  81. /// <summary>
  82. /// The _funds account
  83. /// </summary>
  84. private FundsAccount _fundsAccount;
  85. /// <summary>
  86. /// Gets or sets the funds account.
  87. /// </summary>
  88. /// <value>The funds account.</value>
  89. public FundsAccount FundsAccount
  90. {
  91. get { return _fundsAccount; }
  92. set
  93. {
  94. Set(() => FundsAccount, ref _fundsAccount, value);
  95. }
  96. }
  97. #endregion
  98. }
  99. }