public ConnectingAlphabetViewModel(ConnectingViewModelFactory factory) { _factory = factory; foreach (var letter in CommonHelper.GetAlphabet()) { var rectangleViewModel = _factory.CreateRectangleViewModel(letter); ConnectingRectangles.Add(rectangleViewModel); } }
public PlugboardViewModel(ConnectingAlphabetViewModel topAlphabet, ConnectingAlphabetViewModel bottomAlphabet, ConnectingViewModelFactory factory, IEventAggregator viewEventAggregator, IEnigmaSettings enigmaSettings) { TopAlphabet = topAlphabet; BottomAlphabet = bottomAlphabet; _factory = factory; _enigmaSettings = enigmaSettings; _plugboardController = new PlugboardController(enigmaSettings); viewEventAggregator.Subscribe(this); }