public override void OnPluginComplete() { if (_currentMap != null) { _nestedVm.SetModel(_currentMap); } }
public override void Initialise(IServiceGetter modServices) { base.Initialise(modServices); _service = modServices.Get <IMapService>(); _nestedVm = modServices.Get <IMapViewModel>(); var mapComboItems = _service.GetMapIds().Select(i => new SelectorComboBoxItem((int)i, i.ToString())).ToList(); _viewModel = new SelectorViewModelWithoutScroll(mapComboItems, _nestedVm, id => { _currentMap = _service.Retrieve((MapId)id); _nestedVm.SetModel(_currentMap); }, id => _service.GetMapIds().Select(i => (int)i).Contains(id)); }