public ICollection <PhotoUI> ConvertToPhotoUI(ICollection <Photo> photo) { List <PhotoUI> photosUI = new List <PhotoUI>(); foreach (var item in photo) { PhotoUI photoUI = new PhotoUI() { ID = item.ID, Path = item.Path }; photosUI.Add(photoUI); } return(photosUI); }
void clickshowPhotoUI() { ClickBtn.Play(); PhotoUI.SetActive(true); btn_photoCollect = new Button[6]; for (int i = 0; i < btn_photoCollect.Length; i++) { btn_photoCollect[i] = PhotoUI.GetComponentsInChildren <Button>()[i + 1]; } btn_Backphoto = PhotoUI.GetComponentsInChildren <Button>()[0]; btn_photoCollect[0].onClick.AddListener(delegate() { choosePhoto(0); }); btn_photoCollect[1].onClick.AddListener(delegate() { choosePhoto(1); }); btn_photoCollect[2].onClick.AddListener(delegate() { choosePhoto(2); }); btn_photoCollect[3].onClick.AddListener(delegate() { choosePhoto(3); }); btn_photoCollect[4].onClick.AddListener(delegate() { choosePhoto(4); }); btn_photoCollect[5].onClick.AddListener(delegate() { choosePhoto(5); }); btn_Backphoto.onClick.AddListener(closePhotoUI); }
void closePhotoUI() { PhotoUI.SetActive(false); }