protected void UpdatePortsList()
 {
     _portsList.Clear();
     for (int i = 0; i < _maxPlayers; i++)
     {
         PortMappingItem portItem = new PortMappingItem(LocalizationHelper.Translate("[Emulators.LibRetro.PlayerNumber]", i + 1), _mappingProxy.GetPortMapping(i));
         portItem.Command = new MethodDelegateCommand(() => PortItemSelected(portItem));
         _portsList.Add(portItem);
     }
     _portsList.FireChange();
 }
        public void PortItemSelected(PortMappingItem item)
        {
            _currentPortMapping = item.PortMapping;
            _currentDevice      = _deviceProxy.GetDevice(_currentPortMapping.DeviceId, _currentPortMapping.SubDeviceId);
            CurrentDeviceName   = _currentDevice != null ? _currentDevice.DeviceName : null;
            CurrentPlayerHeader = item.Label(Consts.KEY_NAME, "").Evaluate();
            var wm = ServiceRegistration.Get <IWorkflowManager>();

            wm.NavigatePushAsync(STATE_DEVICE_CONFIGURE, new NavigationContextConfig()
            {
                NavigationContextDisplayLabel = CurrentPlayerHeader
            });
        }