From d57d6ad623e685be11ca897ebd4b0aa74dc465e0 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 2 Jan 2025 12:56:16 -0500 Subject: [PATCH] Fix format for pricing. --- ViewModels/TradeEntryViewModel..cs | 4 ++-- ViewModels/TradeViewModel.cs | 6 ++++-- Views/BlotterView.xaml | 2 +- Views/CMMomentumView.xaml | 5 +++-- Views/MomentumView.xaml | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ViewModels/TradeEntryViewModel..cs b/ViewModels/TradeEntryViewModel..cs index 82d4625..5f83026 100644 --- a/ViewModels/TradeEntryViewModel..cs +++ b/ViewModels/TradeEntryViewModel..cs @@ -224,7 +224,7 @@ namespace TradeBlotter.ViewModels { get { - return Utility.FormatCurrency(trade.Price,3); + return Utility.FormatPrice(trade.Price); } set { @@ -261,7 +261,7 @@ namespace TradeBlotter.ViewModels { get { - return Utility.FormatCurrency(trade.SellPrice); + return Utility.FormatPrice(trade.SellPrice); } set { diff --git a/ViewModels/TradeViewModel.cs b/ViewModels/TradeViewModel.cs index 5c3ecea..dda1065 100644 --- a/ViewModels/TradeViewModel.cs +++ b/ViewModels/TradeViewModel.cs @@ -98,7 +98,8 @@ namespace TradeBlotter.ViewModels } public String SellPrice { - get { return trade.IsClosed?Utility.FormatCurrency(trade.SellPrice):Constants.CONST_DASHES; } +// get { return trade.IsClosed?Utility.FormatCurrency(trade.SellPrice):Constants.CONST_DASHES; } + get { return trade.IsClosed?Utility.FormatPrice(trade.SellPrice):Constants.CONST_DASHES; } set { trade.SellPrice = double.Parse(value); base.OnPropertyChanged("SellPrice"); } } public String Account @@ -146,7 +147,8 @@ namespace TradeBlotter.ViewModels { get { - return Utility.FormatCurrency(trade.LatestPrice); + return Utility.FormatPrice(trade.LatestPrice); +// return Utility.FormatCurrency(trade.LatestPrice); } set { trade.LatestPrice = double.Parse(value); base.OnPropertyChanged("CurrentPrice"); } } diff --git a/Views/BlotterView.xaml b/Views/BlotterView.xaml index bee2015..bd1886c 100644 --- a/Views/BlotterView.xaml +++ b/Views/BlotterView.xaml @@ -99,7 +99,7 @@ - + diff --git a/Views/CMMomentumView.xaml b/Views/CMMomentumView.xaml index 2b34112..8a2e201 100644 --- a/Views/CMMomentumView.xaml +++ b/Views/CMMomentumView.xaml @@ -188,12 +188,13 @@ - + + - + diff --git a/Views/MomentumView.xaml b/Views/MomentumView.xaml index 1b86a30..b448ddf 100644 --- a/Views/MomentumView.xaml +++ b/Views/MomentumView.xaml @@ -208,12 +208,12 @@ - + - +