From f1a7fdf5cd4fabb6ff27d3858d20652a9701341d Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 15 May 2018 14:55:00 -0400 Subject: [PATCH] OrderPropertiesEditorVM - remove unused code --- .../spark/Orders/OrderPropertiesEditorVM.cs | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/client/spark/Orders/OrderPropertiesEditorVM.cs b/src/client/spark/Orders/OrderPropertiesEditorVM.cs index e61b72325..a94a6cef0 100644 --- a/src/client/spark/Orders/OrderPropertiesEditorVM.cs +++ b/src/client/spark/Orders/OrderPropertiesEditorVM.cs @@ -76,7 +76,6 @@ namespace mbts.spark { } else if (selected_order_type == null || !order_types.Contains(selected_order_type)) selected_order_type = order_types.FirstOrDefault(); } - security_changed?.Invoke(s); RaisePropertyChanged(nameof(security)); }), order_properties.ObserveOnDispatcher().Subscribe(p => { @@ -84,21 +83,7 @@ namespace mbts.spark { auto_select_order_type(); }) ); - - #region Auto Select - //void auto_select_account() => - // auto_select_prop(props.account, _selected_account, accounts, () => model.factory.default_account); - - //void auto_select_prop(InlineUserProperty inline_prop, Property prop, IReadOnlyList choices, Func get_default) { - // if (inline_prop.has_value && choices.Contains(inline_prop.value)) { - // if (inline_prop.force_override || has_errors(prop.name)) { - // prop.Value = inline_prop.value; - // } - // } else if (has_errors(prop.name)) { - // prop.Value = get_default(); - // } - //} - + // local methods void auto_select_order_type() { bool invalid = has_errors(nameof(selected_order_type)); if (props.order_type_def.has_value) { @@ -129,10 +114,8 @@ namespace mbts.spark { return false; } } - #endregion } - public event Action security_changed; event Action _selected_order_type_changed; public SecurityImmutable security { get; private set; } = SecurityDataHelper.Defaults.SecurityImmutable; @@ -161,7 +144,6 @@ namespace mbts.spark { _selected_order_type_changed?.Invoke(_selected_order_type); } } - public ICommand set_price_command { get; } public IObservable observe_account(bool start_immediately = false) => _accounts.observe_current(start_immediately);