예제 #1
0
 void RefreshAdvisor()
 {
     try
     {
         CurrentAdvisor = new BreedingAdvisor(this,
                                              comboBoxAdvisor.Text ?? string.Empty,
                                              context,
                                              logger,
                                              defaultBreedingEvaluatorOptions);
     }
     catch (Exception exception)
     {
         CurrentAdvisor = new BreedingAdvisor(this,
                                              BreedingAdvisor.DefaultId,
                                              context,
                                              logger,
                                              defaultBreedingEvaluatorOptions);
         logger.Error(exception,
                      "BreedingAdvisor creation failed for advisorid: " + comboBoxAdvisor.Text + "; reverting to defaults");
     }
     settings.AdvisorId = CurrentAdvisor.AdvisorId;
     GrangerAdvisorChanged?.Invoke(this, new EventArgs());
 }