public UsageModelOptionsControl(Lifetime lifetime, OptionsSettingsSmartContext ctx, KaVEISettingsStore settingsStore, IActionExecutor actionExecutor, DataContexts dataContexts, IMessageBoxCreator messageBoxCreator) { _messageBoxCreator = messageBoxCreator; _lifetime = lifetime; _settingsStore = settingsStore; _actionExecutor = actionExecutor; _dataContexts = dataContexts; InitializeComponent(); _modelStoreSettings = settingsStore.GetSettings <ModelStoreSettings>(); DataContext = new UsageModelOptionsViewModel { ModelStoreSettings = _modelStoreSettings }; if (ctx != null) { // Binding to ModelStorePath ctx.SetBinding( lifetime, (ModelStoreSettings s) => s.ModelStorePath, ModelStorePathTextBox, TextBox.TextProperty); } }
public GeneralOptionsControl(Lifetime lifetime, OptionsSettingsSmartContext ctx, IActionExecutor actionExecutor, KaVEISettingsStore settingsStore, DataContexts dataContexts, IMessageBoxCreator messageBoxCreator) { _messageBoxCreator = messageBoxCreator; _lifetime = lifetime; _ctx = ctx; _actionExecutor = actionExecutor; _settingsStore = settingsStore; _dataContexts = dataContexts; InitializeComponent(); _exportSettings = settingsStore.GetSettings <ExportSettings>(); DataContext = new GeneralOptionsViewModel { ExportSettings = _exportSettings }; if (_ctx != null) { BindToGeneralChanges(); } }
public AnonymizationOptionsControl(Lifetime lifetime, OptionsSettingsSmartContext ctx, KaVEISettingsStore settingsStore, IActionExecutor actionExecutor, DataContexts dataContexts, IMessageBoxCreator messageBoxCreator) { _lifetime = lifetime; _ctx = ctx; _settingsStore = settingsStore; _actionExecutor = actionExecutor; _dataContexts = dataContexts; InitializeComponent(); _anonymizationSettings = settingsStore.GetSettings <AnonymizationSettings>(); var anonymizationContext = new AnonymizationContext(_anonymizationSettings); DataContext = anonymizationContext; if (_ctx != null) { BindChangesToAnonymization(); } _messageBoxCreator = messageBoxCreator; }
public UserProfileOptionsControl(Lifetime lifetime, OptionsSettingsSmartContext ctx, KaVEISettingsStore settingsStore, IActionExecutor actionExecutor, DataContexts dataContexts, IMessageBoxCreator messageBoxCreator, IUserProfileSettingsUtils userProfileUtils) { _messageBoxCreator = messageBoxCreator; _userProfileUtils = userProfileUtils; _lifetime = lifetime; _ctx = ctx; _settingsStore = settingsStore; _actionExecutor = actionExecutor; _dataContexts = dataContexts; InitializeComponent(); userProfileUtils.EnsureProfileId(); _userProfileSettings = userProfileUtils.GetSettings(); _userProfileContext = new UserProfileContext(_userProfileSettings, userProfileUtils); _userProfileContext.PropertyChanged += UserProfileContextOnPropertyChanged; DataContext = _userProfileContext; if (_ctx != null) { BindToUserProfileChanges(); } }
public void SetUp() { var basicHttpBinding = new BasicHttpBinding(); basicHttpBinding.SendTimeout = TimeSpan.FromMinutes(5); var endpointAddress = new EndpointAddress("http://localhost:8089/HandlingReportServiceFacade/"); this.handlingReportServiceClient = new HandlingReportServiceClient(basicHttpBinding, endpointAddress); this.messageBoxCreator = new MessageBoxCreator(); this.handlingReportViewModel = new HandlingReportViewModel( this.handlingReportServiceClient, this.messageBoxCreator); }
/// <summary> /// Initializes a new instance of the <see cref="HandlingReportViewModel"/> class. /// </summary> /// <param name="handlingReportServiceClient"> /// The handling Report Service Client. /// </param> /// <param name="messageBoxCreator"> /// The message Box Creator. /// </param> public HandlingReportViewModel( IHandlingReportService handlingReportServiceClient, IMessageBoxCreator messageBoxCreator) { this.handlingReportServiceClient = handlingReportServiceClient; this.messageBoxCreator = messageBoxCreator; // initialise validator for this view model this.handlingReportViewModelValidator = new HandlingReportViewModelValidator(this); this.RegisterReportCommand = new DelegateCommand <object>(this.Register, this.CanRegister); HandlingReportCommands.RegisterHandlingReportCommand.RegisterCommand(this.RegisterReportCommand); }
/// <summary> /// Initializes a new instance of the <see cref="HandlingReportViewModel"/> class. /// </summary> /// <param name="handlingReportServiceClient"> /// The handling Report Service Client. /// </param> /// <param name="messageBoxCreator"> /// The message Box Creator. /// </param> public HandlingReportViewModel( IHandlingReportService handlingReportServiceClient, IMessageBoxCreator messageBoxCreator) { this.handlingReportServiceClient = handlingReportServiceClient; this.messageBoxCreator = messageBoxCreator; // initialise validator for this view model this.handlingReportViewModelValidator = new HandlingReportViewModelValidator(this); this.RegisterReportCommand = new DelegateCommand<object>(this.Register, this.CanRegister); HandlingReportCommands.RegisterHandlingReportCommand.RegisterCommand(this.RegisterReportCommand); }