diff --git a/src/client/spark/view/Spark/ContractPicker/ContractPickerModel.cs b/src/client/spark/view/Spark/ContractPicker/ContractPickerModel.cs index c96c19d94..fb5eadaac 100644 --- a/src/client/spark/view/Spark/ContractPicker/ContractPickerModel.cs +++ b/src/client/spark/view/Spark/ContractPicker/ContractPickerModel.cs @@ -81,23 +81,24 @@ namespace mbts.spark private void _compose_criteria_clause_name() { string proposed_name = string.Empty; + string fs = "{0} {1} {2}"; if (selected_securities.Count > 0) { - proposed_name = all_securities.Where(s => selected_securities.Contains(s.Key)).Select(sec => sec.Value.security.ToString()).Aggregate((i, j) => $"{i} {dot} {j}"); + proposed_name = all_securities.Where(s => selected_securities.Contains(s.Key)).Select(sec => sec.Value.security.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j)); } else if (selected_symbols.Count > 0) { - proposed_name = $"{selected_symbols.Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name = selected_symbols.Aggregate((i, j) => String.Format(fs, i, dot, j)); if (selected_security_types.Count > 0) { - proposed_name += $" {selected_security_types.Select(sec_type => sec_type.ToString()).Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name += $", {selected_security_types.Select(sec_type => sec_type.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j))}"; } if (selected_exchanges.Count > 0) { - proposed_name += $" at {selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name += $" at {selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j))}"; } } else if (selected_security_types.Count > 0) { - proposed_name = $"{selected_security_types.Select(sec_type => sec_type.ToString()).Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name = $", {selected_security_types.Select(sec_type => sec_type.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j))}"; if (selected_exchanges.Count > 0) { - proposed_name += $" at {selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name += $" at {selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j))}"; } } else if (selected_exchanges.Count > 0) { - proposed_name = $"{selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => $"{i} {dot} {j}")}"; + proposed_name = $"{selected_exchanges.Select(exch => exch.ToString()).Aggregate((i, j) => String.Format(fs, i, dot, j))}"; } criteria_input_name = proposed_name; } diff --git a/src/client/spark/view/Spark/ContractPicker/ContractPickerView.xaml b/src/client/spark/view/Spark/ContractPicker/ContractPickerView.xaml index 948a9c3de..c0eb3f328 100644 --- a/src/client/spark/view/Spark/ContractPicker/ContractPickerView.xaml +++ b/src/client/spark/view/Spark/ContractPicker/ContractPickerView.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:converters="clr-namespace:mbts.ui.converters" xmlns:c="clr-namespace:mbts.ui.controls" + xmlns:ui="clr-namespace:mbts.ui" x:ClassModifier="internal" mc:Ignorable="d" d:DesignWidth="550" Height="500" Width="550"> @@ -48,6 +49,15 @@ ItemsSource="{Binding securities}" ScrollViewer.VerticalScrollBarVisibility="Visible" HorizontalAlignment="Stretch"> + + +