OrderPropertiesEditorVM - remove unused code

This commit is contained in:
John Colvin committed 2018-05-16 15:08:49 -04:00
1 parent 23a860f7bb
commit f1a7fdf5cd
1 file changed
+1 -19
@@ -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<T>(InlineUserProperty<T> inline_prop, Property<T> prop, IReadOnlyList<T> choices, Func<T> 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<SecurityImmutable> security_changed;
event Action<IOrderTypeVM> _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<string> observe_account(bool start_immediately = false) =>
_accounts.observe_current(start_immediately);