Пример #1
0
 /// <summary>
 /// Registers a new handler within the individual options
 /// </summary>
 /// <param name="vm">The view-model to register</param>
 private void _registerHandlerVM(ResultsHandlerViewModel vm)
 {
     foreach (PostProcessingOptions options in AvailableOptions)
     {
         options.AvailableHandlers.Add(vm);
     }
 }
Пример #2
0
 /// <summary>
 /// Updates the collection of available handlers
 /// </summary>
 private void _updateAvailableHandlers()
 {
     AvailableOptions.ForEach(x => x.AvailableHandlers.Clear());
     foreach (LoadedHandler handler in _factory.LoadedHandlers)
     {
         ResultsHandlerViewModel vm = new ResultsHandlerViewModel(handler);
         _registerHandlerVM(vm);
     }
 }
Пример #3
0
        /// <summary>
        /// Invoked when a new handler is registered within the factory
        /// </summary>
        /// <param name="sender">The factory</param>
        /// <param name="e">Event information</param>
        private void _handlerRegistered(object sender, HandlerRegisteredArgs e)
        {
            ResultsHandlerViewModel vm = new ResultsHandlerViewModel(e.Handler);

            _registerHandlerVM(vm);
        }