Skip to content

Commit

Permalink
Update UserControlLoSetCommandAPI.xaml.cs (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdahlblom authored Nov 25, 2023
1 parent 4ea61f8 commit e2c6a9d
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e2c6a9d

Please sign in to comment.