private void CreateRichTextExceptionTypesAsHint(Lifetime lifetime, IContextBoundSettingsStoreLive storeOptionsTransactionContext) { IProperty <string> property = new Property <string>(lifetime, "Exceptional::ExceptionTypesAsHint::ExceptionTypes"); property.SetValue(storeOptionsTransactionContext.GetValue((Settings.ExceptionalSettings key) => key.OptionalExceptions2)); property.Change.Advise(lifetime, a => { if (!a.HasNew) { return; } storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.OptionalExceptions2, a.New); }); var textControl = BeControls.GetTextControl(isReadonly: false); textControl.Text.SetValue(property.GetValue()); textControl.Text.Change.Advise(lifetime, str => { storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.OptionalExceptions2, str); }); AddControl(textControl); }
private void BindToNotificationFixAction() { myUnrealHost.PerformModelAction(model => { model.InstallEditorPlugin.Advise(Lifetime, installPluginDescription => HandleManualInstallPlugin(installPluginDescription)); model.EnableAutoupdatePlugin.AdviseNotNull(Lifetime, unit => { myBoundSettingsStore.SetValue <UnrealLinkSettings, bool>(s => s.InstallRiderLinkPlugin, true); }); }); }
private void GetInfo() { if (myClient.UserLogin == null) { return; } myClient.GetAccessTokenAsync( login => { mySettingsStore.SetValue(JetBoxSettingsAccessor.Login, login); InitLoginState(); }, myClient.LogException); }
private void BindToNotificationFixAction() { myUnrealHost.PerformModelAction(model => { model.InstallEditorPlugin.Advise(Lifetime, installPluginDescription => HandleManualInstallPlugin(installPluginDescription)); model.EnableAutoupdatePlugin.AdviseNotNull(Lifetime, unit => { myBoundSettingsStore.SetValue <UnrealLinkSettings, bool>(s => s.InstallRiderLinkPlugin, true); }); model.RefreshProjects.Advise(Lifetime, _ => UnrealProjectsRefresher.RefreshProjects(Lifetime, mySolution, myPluginDetector.InstallInfoProperty.Value)); }); }
private void CreateCheckboxInspectPrivate(Lifetime lifetime, IContextBoundSettingsStoreLive storeOptionsTransactionContext) { IProperty <bool> property = new Property <bool>(lifetime, "Exceptional::InspectionLevel::InspectPrivateMethodsAndProperties"); property.SetValue(storeOptionsTransactionContext.GetValue((Settings.ExceptionalSettings key) => key.InspectPrivateMethods)); property.Change.Advise(lifetime, a => { if (!a.HasNew) { return; } storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.InspectPrivateMethods, a.New); }); AddBoolOption((Settings.ExceptionalSettings key) => key.InspectPrivateMethods, OptionsLabels.InspectionLevel.InspectPrivateMethodsAndProperties); }
private void CreateCheckboxUsePredefined(Lifetime lifetime, IContextBoundSettingsStoreLive storeOptionsTransactionContext) { IProperty <bool> property = new Property <bool>(lifetime, "Exceptional::ExceptionTypesAsHint::UsePredefined"); property.SetValue(storeOptionsTransactionContext.GetValue((Settings.ExceptionalSettings key) => key.UseDefaultOptionalExceptions2)); property.Change.Advise(lifetime, a => { if (!a.HasNew) { return; } storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.UseDefaultOptionalExceptions2, a.New); }); AddBoolOption((Settings.ExceptionalSettings key) => key.UseDefaultOptionalExceptions2, OptionsLabels.ExceptionTypesAsHint.UsePredefined); }
private void CreateCheckboxIsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions(Lifetime lifetime, IContextBoundSettingsStoreLive storeOptionsTransactionContext) { IProperty <bool> property = new Property <bool>(lifetime, "Exceptional::General::IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions"); property.SetValue(storeOptionsTransactionContext.GetValue((Settings.ExceptionalSettings key) => key.IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions)); property.Change.Advise(lifetime, a => { if (!a.HasNew) { return; } storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions, a.New); }); AddBoolOption((Settings.ExceptionalSettings key) => key.IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions, OptionsLabels.General.IsDocumentationOfExceptionSubtypeSufficientForReferenceExpressions); }
private void CreateCheckboxInspectPublic(Lifetime lifetime, IContextBoundSettingsStoreLive storeOptionsTransactionContext) { IProperty <bool> property = new Property <bool>(lifetime, "Exceptional::General::DelegateInvocationsMayThrowSystemException"); property.SetValue(storeOptionsTransactionContext.GetValue((Settings.ExceptionalSettings key) => key.DelegateInvocationsMayThrowExceptions)); property.Change.Advise(lifetime, a => { if (!a.HasNew) { return; } storeOptionsTransactionContext.SetValue((Settings.ExceptionalSettings key) => key.DelegateInvocationsMayThrowExceptions, a.New); }); AddBoolOption((Settings.ExceptionalSettings key) => key.DelegateInvocationsMayThrowExceptions, OptionsLabels.General.DelegateInvocationsMayThrowSystemException); }