/// <summary> /// Выбрана другая миграция - необходимо обновить контролы для ввода параметров /// </summary> private void MigrationsComboBox_SelectedIndexChanged(object sender, EventArgs e) { var selectedMigration = MigrationsComboBox.Text; dynamic migration = null; var process = new StatusProcess(); process.StartOperation(() => { migration = ViewModelExtension.BuildMigrationDetails(Version, Value.Name.ToString(), selectedMigration); }); process.EndOperation(); if (migration == null) { return; } MigrationDescriptionLabelControl.Text = migration.Description; DownButton.Visible = migration.IsUndoable; if (migration.Parameters.Length == 0) { ParametersPanelControl.Visible = false; MigrationParametersControl.Visible = false; } else { ParametersPanelControl.Visible = true; MigrationParametersControl.Visible = true; ParametersPanelControl.Controls.Clear(); } var counter = 0; foreach (var parameter in migration.Parameters) { if (parameter.PossibleValues != null && parameter.PossibleValues.Count > 0) { AddComboBoxForParameter(parameter.Caption.ToString(), parameter.PossibleValues, counter++); continue; } if (parameter.InitialValue is bool) { AddCheckBoxForParameter(parameter.Caption.ToString(), parameter.InitialValue, counter++); } else { AddTextEditForParameter(parameter.Caption.ToString(), counter++); } } }