ladder log viewer uses colors in BTSColors.Orders, added filled_dark and sent

This commit is contained in:
John Colvin committed 2018-02-24 13:31:06 -05:00
1 parent b71ae5477b
commit d525c33c2d
2 files changed
+20 -7

No files matched your search

@@ -142,12 +142,24 @@ namespace mbts.ui
public static BTSColor pnl_profit_text { get { return text_default; } }
}
public static class Orders
{
public static class Orders {
// 'sent' and 'filled_dark' are used in the ladder log viewer to indicate sent/filled orders (both buys and sells)
// 'default_background' and 'filled' seemed too pale against the log viewer's current style
// as we restyle the ladder, and perhaps the log viewer, maybe this will change, in the meantime, here they are.
static readonly BTSColor _sent = new BTSColor(0x92, 0x5B, 0xBE);
static readonly Brush _sent_brush = new SolidColorBrush(_sent), _filled_dark_brush = new SolidColorBrush(filled_dark);
static Orders() {
_sent_brush.Freeze();
_filled_dark_brush.Freeze();
}
// Base Colors
[DisplayInfo(name = "Orders")]
public static BTSColor default_background { get { return BTSCoreColors.blue_light_lighter; } }
public static BTSColor default_text { get { return BTSCoreColors.black; } }
public static BTSColor sent => _sent;
public static Brush sent_brush => _sent_brush;
[DisplayInfo(name = "Price")]
public static BTSColor price_background { get { return BTSCoreColors.blue_light_dark; } }
@@ -160,6 +172,8 @@ namespace mbts.ui
public static BTSColor working_cancel_text { get { return BTSCoreColors.white; } }
public static BTSColor filled { get { return BTSCoreColors.green_light_light_saturated; } }
public static BTSColor filled_dark => BTSCoreColors.green; // used in ladder log viewer
public static BTSColor modified => orange; // used in the ladder log viewer
[DisplayInfo(name = "Order Buy Text")]
public static BTSColor order_buy_text { get { return BTSCoreColors.black; } }
@@ -11,17 +11,16 @@ using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Windows.Media;
namespace mbts.spark {
static class OrderLogCategories {
//Order Color (darker purple) 0x77, 0x33, 0xAA, loud
//Order Color (lighter purple) 0x92, 0x7B, 0xBE, soft
//Order Color (medium purple) 0x92, 0x5B, 0xBE
public static ILogViewerCategory order => new LogViewerCategory("Order", new SolidColorBrush(Color.FromRgb(0x92, 0x5B, 0xBE)));
public static ILogViewerCategory fill = new LogViewerCategory("Fill", Brushes.Green);
public static ILogViewerCategory cancel = new LogViewerCategory("Cancel", Brushes.Red);
public static ILogViewerCategory modify = new LogViewerCategory("Modify", Brushes.Orange);
public static ILogViewerCategory order => new LogViewerCategory("Order", BTSColors.Orders.sent_brush);
public static ILogViewerCategory fill = new LogViewerCategory("Fill", BTSColors.Orders.filled_dark);
public static ILogViewerCategory cancel = new LogViewerCategory("Cancel", BTSColors.Orders.working_cancel);
public static ILogViewerCategory modify = new LogViewerCategory("Modify", BTSColors.Orders.modified);
}
class LadderVM : DisposableViewModelBase, IKeyListener {