void OnMediaReceived(string error, MediaResult mediaReceived) { if (string.IsNullOrEmpty(error) && mediaReceived != null) { MediaResultObject contactObjectTemp = new MediaResultObject(); contactObjectTemp.Media = mediaReceived; mediaObject.Value = contactObjectTemp; Fsm.Event(eventTarget, isSuccessEvent); } else { errorMsg.Value = error; Fsm.Event(eventTarget, isNotSuccessEvent); } }
void OnMediasReceived(string error, MediaResult[] mediasReceived) { if (string.IsNullOrEmpty(error) && mediasReceived != null) { mediaCount.Value = mediasReceived.Length; medias.Resize(mediaCount.Value); for (int i = 0; i < mediaCount.Value; i++) { MediaResultObject contactObject = new MediaResultObject(); contactObject.Media = mediasReceived[i]; medias.Set(i, contactObject); } Fsm.Event(eventTarget, isSuccessEvent); } else { errorMsg.Value = error; Fsm.Event(eventTarget, isNotSuccessEvent); } }
public override void OnEnter() { MediaResultObject tempObj = (MediaResultObject)mediaObject.Value; Media.Gallery.LoadImage(tempObj.Media, OnImageReceived, maxSize.Value); }