From e2c6a9de7fd386f88735c90bae72cfe95a313793 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Sat, 25 Nov 2023 14:36:49 +0200 Subject: [PATCH] Update UserControlLoSetCommandAPI.xaml.cs (#42) --- .../UserControlLoSetCommandAPI.xaml.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/client/DCSInsight/UserControls/UserControlLoSetCommandAPI.xaml.cs b/src/client/DCSInsight/UserControls/UserControlLoSetCommandAPI.xaml.cs index c2d1890..7df4678 100644 --- a/src/client/DCSInsight/UserControls/UserControlLoSetCommandAPI.xaml.cs +++ b/src/client/DCSInsight/UserControls/UserControlLoSetCommandAPI.xaml.cs @@ -99,8 +99,8 @@ protected override void BuildUI() { Name = "ComboBox" + dcsAPIParameterType.Id, Tag = dcsAPIParameterType.Id, - MinWidth = 50, - MaxWidth = 100, + MinWidth = 100, + MaxWidth = 350, Height = 20, IsReadOnly = true, DisplayMemberPath = "Description", @@ -243,6 +243,18 @@ protected override void SendCommand() { try { + foreach (var comboBox in ComboBoxParameterList) + { + var parameterId = (int)comboBox.Tag; + foreach (var parameter in DCSAPI.Parameters) + { + if (parameter.Id == parameterId) + { + var loSetCommand = (LoSetCommand)comboBox.SelectedItem; + parameter.Value = loSetCommand.Code; + } + } + } foreach (var textBox in TextBoxParameterList) { var parameterId = (int)textBox.Tag;