public void glossaryControls_ValueChanged() { formMT.groupBoxOptional.Enabled = options.UseCustomModel || currentGlossary != null; if (!internalControlChange) { GlossaryState.FillOptions(this, options); } EnableDisable(); }
public static void FillOptions(AuthState state, IntentoMTFormOptions options) { if (state == null) { options.UseCustomAuth = false; options.CustomAuth = null; ModelState.FillOptions(null, options); GlossaryState.FillOptions(null, options); } else { options.IsAuthDelegated = state.IsDelegatedCredentials; options.AuthMode = state.mode; string id; if (state.IsDelegatedCredentials && state.providerDataAuthDict.TryGetValue("credential_id", out id)) { options.AuthDelegatedCredentialId = id; } else { options.AuthDelegatedCredentialId = null; } options.UseCustomAuth = state.UseCustomAuth; if (options.UseCustomAuth) { options.SetAuthDict(state.providerDataAuthDict); } else { options.CustomAuth = null; } ModelState.FillOptions(state.GetModelState(), options); GlossaryState.FillOptions(state.GetGlossaryState(), options); } }