public void Confirm() { _isEnd = true; _pokemonRegisterAction.Invoke(_pokemonName[_currentIndex]); gameObject.SetActive(false); }
private static void DoEvent(object state) { var evt = state as Event; if (null == evt) { return; } log.Info(string.Format("EventType:{0},CallHandle:{1}", evt.EventType, evt.CallHandle)); switch (evt.EventType) { #region Device case EventType.DEVICE_VIDEOINPUTCHANGED: { string deviceName = evt.PlugDeviceName; string deviceHandle = evt.DeviceHandle; if (string.IsNullOrWhiteSpace(deviceName) || string.IsNullOrWhiteSpace(deviceHandle)) { return; } if (true == evt.PlugDeviceStatus) { /*plug in a device*/ var device = new Device(DeviceType.VIDEOINPUT, deviceHandle, deviceName); deviceManager.AddDevice(device); } else { deviceManager.RemoveDevice(deviceHandle); } } break; /* from MP */ case EventType.DEVICE_AUDIOINPUTCHANGED: { string deviceName = evt.PlugDeviceName; string deviceHandle = evt.DeviceHandle; if (string.IsNullOrWhiteSpace(deviceName) || string.IsNullOrWhiteSpace(deviceHandle)) { return; } if (true == evt.PlugDeviceStatus) { /*plug in a device*/ var device = new Device(DeviceType.AUDIOINPUT, deviceHandle, deviceName); deviceManager.AddDevice(device); } else { deviceManager.RemoveDevice(deviceHandle); } } break; /* from MP */ case EventType.DEVICE_AUDIOOUTPUTCHANGED: { string deviceName = evt.PlugDeviceName; string deviceHandle = evt.DeviceHandle; if (string.IsNullOrWhiteSpace(deviceName) || string.IsNullOrWhiteSpace(deviceHandle)) { return; } if (true == evt.PlugDeviceStatus) { /*plug in a device*/ var device = new Device(DeviceType.AUDIOOUTPUT, deviceHandle, deviceName); deviceManager.AddDevice(device); } else { deviceManager.RemoveDevice(deviceHandle); } } break; /* from MP */ case EventType.DEVICE_VOLUMECHANGED: break; /* from MP */ case EventType.DEVICE_MONITORINPUTSCHANGED: { string deviceName = evt.PlugDeviceName; string deviceHandle = evt.DeviceHandle; if (string.IsNullOrWhiteSpace(deviceName) || string.IsNullOrWhiteSpace(deviceHandle)) { return; } if (true == evt.PlugDeviceStatus) { /*plug in a device*/ var device = new Device(DeviceType.MONITOR, deviceHandle, deviceName); deviceManager.AddDevice(device); } else { deviceManager.RemoveDevice(deviceHandle); } } break; /* from MP */ #endregion #region 处理 #region Register case EventType.UNKNOWN: break; case EventType.SIP_REGISTER_SUCCESS: { RegisterAction?.Invoke(); } break; case EventType.SIP_REGISTER_FAILURE: { UnregisterAction?.Invoke(); } break; case EventType.SIP_REGISTER_UNREGISTERED: break; #endregion /* #region Call * case EventType.SIP_CALL_INCOMING: break; * case EventType.SIP_CALL_TRYING:break; * case EventType.SIP_CALL_RINGING:break; * case EventType.SIP_CALL_FAILURE:break; * case EventType.SIP_CALL_CLOSED:break; * case EventType.SIP_CALL_HOLD:break; * case EventType.SIP_CALL_HELD:break; * case EventType.SIP_CALL_DOUBLE_HOLD:break; * case EventType.SIP_CALL_UAS_CONNECTED:break; * case EventType.SIP_CALL_UAC_CONNECTED:break; #endregion #region Content * case EventType.SIP_CONTENT_INCOMING:break; * case EventType.SIP_CONTENT_CLOSED:break; * case EventType.SIP_CONTENT_SENDING:break; * case EventType.SIP_CONTENT_IDLE:break; * case EventType.SIP_CONTENT_UNSUPPORTED:break; #endregion * * * #region Stream * case EventType.STREAM_VIDEO_LOCAL_RESOLUTIONCHANGED:break; * case EventType.STREAM_VIDEO_REMOTE_RESOLUTIONCHANGED:break; #endregion * * case EventType.NETWORK_CHANGED: break; * case EventType.MFW_INTERNAL_TIME_OUT: break; * * case EventType.REFRESH_ACTIVE_SPEAKER:break; * case EventType.REMOTE_VIDEO_REFRESH:break; * case EventType.REMOTE_VIDEO_CHANNELSTATUS_CHANGED:break; * case EventType.REMOTE_VIDEO_DISPLAYNAME_UPDATE:break; * case EventType.SIP_CALL_MODE_CHANGED:break; * * case EventType.SIP_CALL_MODE_UPGRADE_REQ:break; * case EventType.IS_TALKING_STATUS_CHANGED:break; * case EventType.CERTIFICATE_VERIFY:break; * case EventType.TRANSCODER_FINISH:break; * case EventType.ICE_STATUS_CHANGED:break; * case EventType.SUTLITE_INCOMING_CALL:break; * case EventType.SUTLITE_TERMINATE_CALL:break; * case EventType.NOT_SUPPORT_VIDEOCODEC:break; * * case EventType.BANDWIDTH_LIMITATION:break; * case EventType.MEDIA_ADDRESS_UPDATED:break; * case EventType.AUTODISCOVERY_STATUS_CHANGED:break; */ #endregion } InternalMFWEvent?.Invoke(evt); MFWEvent?.Invoke(evt); }