Skip to content

Commit

Permalink
Update comboboxes source on models list change
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrsuder committed Sep 7, 2019
1 parent c35e178 commit dfc6ab6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@ private void ReportProgressThreadSafe(double value)
public List<ModelInfo> ModelsItems
{
get => null;
set => CreateModelTree(value);
set
{
CreateModelTree(value);
modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);
previewModels_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);
interpolationModelOne_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);
interpolationModelTwo_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);
}
}

[DllImport("user32.dll")] //textbox hint
Expand Down Expand Up @@ -347,7 +354,7 @@ public MainForm()

modelForAlpha_comboBox.DisplayMember = "Name";
modelForAlpha_comboBox.ValueMember = "FullName";
modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);
modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null);

previewModels_comboBox.DisplayMember = "Name";
previewModels_comboBox.ValueMember = "FullName";
Expand Down

0 comments on commit dfc6ab6

Please sign in to comment.