public void SerializeUserInterfaceOptions() { UserInterfaceOptions s = new UserInterfaceOptions(); s.Title = TestContext.CurrentContext.Random.GetString(); s.UserSuppliedReason = AuditReasonFieldState.Required; s.PhoneticSettings.GroupSize = 5; s.PhoneticSettings.LowerPrefix = TestContext.CurrentContext.Random.GetString(); s.PhoneticSettings.UpperPrefix = TestContext.CurrentContext.Random.GetString(); s.PhoneticSettings.PhoneticNameColon = TestContext.CurrentContext.Random.GetString(); s.PhoneticSettings.CharacterMappings = new Dictionary <string, string>(); s.PhoneticSettings.CharacterMappings.Add(TestContext.CurrentContext.Random.GetString(), TestContext.CurrentContext.Random.GetString()); UserInterfaceOptions n = JsonConvert.DeserializeObject <UserInterfaceOptions>(JsonConvert.SerializeObject(s)); Assert.AreEqual(s.Title, n.Title); Assert.AreEqual(s.UserSuppliedReason, n.UserSuppliedReason); Assert.AreEqual(s.PhoneticSettings.GroupSize, n.PhoneticSettings.GroupSize); Assert.AreEqual(s.PhoneticSettings.LowerPrefix, n.PhoneticSettings.LowerPrefix); Assert.AreEqual(s.PhoneticSettings.UpperPrefix, n.PhoneticSettings.UpperPrefix); Assert.AreEqual(s.PhoneticSettings.PhoneticNameColon, n.PhoneticSettings.PhoneticNameColon); Assert.AreEqual(s.PhoneticSettings.CharacterMappings.First().Key, n.PhoneticSettings.CharacterMappings.First().Key); Assert.AreEqual(s.PhoneticSettings.CharacterMappings.First().Value, n.PhoneticSettings.CharacterMappings.First().Value); }
public UserInterfaceViewModel(UserInterfaceOptions model, IDialogCoordinator dialogCoordinator, IAppPathProvider appPathProvider, INotifiableEventPublisher eventPublisher, ILogger <UserInterfaceViewModel> logger) { this.appPathProvider = appPathProvider; this.dialogCoordinator = dialogCoordinator; this.logger = logger; this.model = model; this.LoadImage(); eventPublisher.Register(this); }
public UserInterfaceViewModel(UserInterfaceOptions model, IDialogCoordinator dialogCoordinator, IAppPathProvider appPathProvider, INotifiableEventPublisher eventPublisher, ILogger <UserInterfaceViewModel> logger) { this.appPathProvider = appPathProvider; this.dialogCoordinator = dialogCoordinator; this.logger = logger; this.model = model; this.DisplayName = "User interface"; model.PhoneticSettings ??= new PhoneticSettings(); eventPublisher.Register(this); }
public ComputerController(IAuthorizationService authorizationService, ILogger <ComputerController> logger, IDirectory directory, IAuditEventProcessor reporting, IRateLimiter rateLimiter, IOptionsSnapshot <UserInterfaceOptions> userInterfaceSettings, IAuthenticationProvider authenticationProvider, IPasswordProvider passwordProvider, IJitAccessProvider jitAccessProvider) { this.authorizationService = authorizationService; this.logger = logger; this.directory = directory; this.reporting = reporting; this.rateLimiter = rateLimiter; this.userInterfaceSettings = userInterfaceSettings.Value; this.authenticationProvider = authenticationProvider; this.passwordProvider = passwordProvider; this.jitAccessProvider = jitAccessProvider; }
public void CreateDefaultOptions() { BehaviorOptions = new BehaviorOptions(); DatabaseSchemaViewOptions = new DatabaseSchemaViewOptions(); DesignPaneOptions = new DesignPaneOptions(); VisualOptions = new VisualOptions(); AddObjectDialogOptions = new AddObjectDialogOptions(); DataSourceOptions = new DataSourceOptions(); QueryNavBarOptions = new QueryNavBarOptions(); UserInterfaceOptions = new UserInterfaceOptions(); SqlFormattingOptions = new SQLFormattingOptions(); SqlGenerationOptions = new SQLGenerationOptions(); }
public ComputerController(IAuthorizationService authorizationService, ILogger <ComputerController> logger, IDirectory directory, IAuditEventProcessor reporting, IOptionsSnapshot <UserInterfaceOptions> userInterfaceSettings, IAuthenticationProvider authenticationProvider, IPasswordProvider passwordProvider, IJitAccessProvider jitAccessProvider, IBitLockerRecoveryPasswordProvider bitLockerProvider, IAmsLicenseManager licenseManager) { this.authorizationService = authorizationService; this.logger = logger; this.directory = directory; this.reporting = reporting; this.userInterfaceSettings = userInterfaceSettings.Value; this.authenticationProvider = authenticationProvider; this.passwordProvider = passwordProvider; this.jitAccessProvider = jitAccessProvider; this.bitLockerProvider = bitLockerProvider; this.licenseManager = licenseManager; }
public void SetOptions(Options options) { AddObjectDialogOptions.Assign(options.AddObjectDialogOptions); BehaviorOptions.Assign(options.BehaviorOptions); MainForm.DBView.Options.Assign(options.DatabaseSchemaViewOptions); DataSourceOptions.Assign(options.DataSourceOptions); DesignPaneOptions.Assign(options.DesignPaneOptions); ExpressionEditorOptions.Assign(options.ExpressionEditorOptions); QueryColumnListOptions.Assign(options.QueryColumnListOptions); QueryNavBarOptions.Assign(options.QueryNavBarOptions); SqlFormattingOptions.Assign(options.SqlFormattingOptions); SqlGenerationOptions.Assign(options.SqlGenerationOptions); TextEditorOptions.Assign(options.TextEditorOptions); TextEditorSqlOptions.Assign(options.TextEditorSqlOptions); UserInterfaceOptions.Assign(options.UserInterfaceOptions); VisualOptions.Assign(options.VisualOptions); }
public void CreateDefaultOptions() { BehaviorOptions = new BehaviorOptions(); DatabaseSchemaViewOptions = new DatabaseSchemaViewOptions(); DesignPaneOptions = new DesignPaneOptions(); VisualOptions = new VisualOptions(); AddObjectDialogOptions = new AddObjectDialogOptions(); DataSourceOptions = new DataSourceOptions(); QueryNavBarOptions = new QueryNavBarOptions(); UserInterfaceOptions = new UserInterfaceOptions(); SqlFormattingOptions = new SQLFormattingOptions(); SqlGenerationOptions = new SQLGenerationOptions(); ExpressionEditorOptions = new ExpressionEditorOptions(); TextEditorOptions = new TextEditorOptions { Padding = DefaultTextEditorPadding, LineHeight = new LengthUnit(90, SizeUnitType.Percent) }; TextEditorSqlOptions = new SqlTextEditorOptions(); }