private void buttonAdvisorOptions_Click(object sender, EventArgs e) { if (CurrentAdvisor == null) { return; } if (CurrentAdvisor.ShowOptions(this)) { GrangerAdvisorChanged?.Invoke(this, new EventArgs()); } }
private void buttonAdvisorOptions_Click(object sender, EventArgs e) { telemetry.TrackEvent("Granger: advisor options"); if (CurrentAdvisor == null) { return; } if (CurrentAdvisor.ShowOptions(this)) { GrangerAdvisorChanged?.Invoke(this, new EventArgs()); } }
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()); }