示例#1
0
 public RotorViewModelFactory(IEventAggregator enigmaAggregator, IComponentFactory componentFactory, IEnigmaSettings enigmaSettings, HelpersViewModelFactory helpersViewModelFactory)
 {
     _enigmaAggregator        = enigmaAggregator;
     _componentFactory        = componentFactory;
     _enigmaSettings          = enigmaSettings;
     _helpersViewModelFactory = helpersViewModelFactory;
 }
示例#2
0
        public ReflectorViewModel(IEventAggregator enigmaAggregator, IComponentFactory componentFactory, IEnigmaSettings enigmaSettings, HelpersViewModelFactory helpersViewModelFactory)
        {
            Types = Enum.GetValues(typeof(ReflectorType)).Cast <ReflectorType>();

            _componentController = new ReflectorController(enigmaSettings, componentFactory, enigmaAggregator);

            var reflectorAggregator = _componentController.GetAggregator();

            ReflectorType = _componentController.GetComponentType();

            _viewController = new ReflectorViewController(reflectorAggregator, helpersViewModelFactory);

            AlphabetViewModel = _viewController.GetAlphabetViewModel();
        }
示例#3
0
 public ReflectorViewController(IEventAggregator reflectorAggregator, HelpersViewModelFactory helpersViewModelFactory)
 {
     _helpersViewModelFactory = helpersViewModelFactory;
     _alphabetViewModel       = _helpersViewModelFactory.CreateAlphabetViewModel <SingleAlphabetViewModel>(reflectorAggregator, 0);
 }
示例#4
0
        public RotorViewModel(IEventAggregator settingsAggregator, IComponentFactory componentFactory, RotorSlot slot, IEnigmaSettings enigmaSettings, HelpersViewModelFactory helpersViewModelFactory)
        {
            RotorTypes           = Enum.GetValues(typeof(RotorType)).Cast <RotorType>();
            _componentController = new RotorSettingsController(settingsAggregator, componentFactory, enigmaSettings, slot);

            var componentAggregator = _componentController.GetAggregator();
            var connections         = _componentController.GetConnections();
            var positionShift       = _componentController.GetPositionShift();

            RotorType = _componentController.GetRotorType();

            _viewController   = new RotorViewController(componentAggregator, helpersViewModelFactory, connections, positionShift);
            AlphabetViewModel = _viewController.GetAlphabetView();
        }
示例#5
0
 public RotorViewController(IEventAggregator componentAggregator, HelpersViewModelFactory helpersViewModelFactory, char[] connections, int positionShift)
 {
     _helpersViewModelFactory = helpersViewModelFactory;
     _connections             = connections;
     _alphabetViewModel       = _helpersViewModelFactory.CreateAlphabetViewModel <DoubleAlphabetViewModel>(componentAggregator, positionShift, connections);
 }