Inheritance: LibraryBase.Wpf.ViewModel.BindableBase
Example #1
0
 public HotItem()
     : this(false)
 {
     BuyContext = new ItemContext(ContextType.Buy, this) { Rules = _buyRules, DisplayName = "Buy" };
     SellContext = new ItemContext(ContextType.Sell, this) { Rules = _sellRules, DisplayName = "Sell" };
     MarginContext = new ItemContext(ContextType.Margin, this) { Rules = _marginRules, DisplayName = "Margin" };
     UnitPriceMoney = new Money(0, 0, 0);
     //SellMoney = new Money();
     //BuyMoney = new Money();
 }
Example #2
0
 public static Money operator -(Money m1, Money m2)
 {
     var ret = m1.TotalCopper - m2.TotalCopper;
     Money m = new Money(0, 0, ret);
     return m;
 }
Example #3
0
 public static Money operator /(Money m1, decimal m2)
 {
     decimal ret = (Decimal)Math.Ceiling((double)m1.TotalCopper / (double)m2);
     Money m = new Money(0, 0, ret);
     return m;
 }
Example #4
0
 public static Money operator *(Money m1, decimal m2)
 {
     var ret = Math.Ceiling(m1.TotalCopper * m2);
     Money m = new Money(0, 0, ret);
     return m;
 }