public void Init() { Gallery.SetActive(true); SwitchCallButtons(UnityVideo.success); nameText.text = HomePageControll.MODEL.name; carnumberText.text = VideoCallPhotoManager.FolderDate; orderNumber.text = VideoCallPhotoManager.FolderName; Transform element; Dictionary <string, Sprite> dict = VideoCallPhotoManager.GetPhotoSprites(); foreach (var link in dict) { element = Instantiate(galleryElement.transform, new Vector3(0, 0, 0), Quaternion.identity); element.SetParent(container.transform); element.localScale = new Vector3(1, 1, 1); //element.gameObject.GetComponent<GalleryElement>().SetSprite = link.Value; element.gameObject.GetComponent <GalleryElement>().SetMiniSprite = SpriteLoader.GetSpriteFromFile(link.Key + "mini"); element.gameObject.GetComponent <GalleryElement>().Link = link.Key; element.gameObject.SetActive(true); elements.Add(element); } element = Instantiate(galleryElement.transform, new Vector3(0, 0, 0), Quaternion.identity); element.SetParent(container.transform); element.localScale = new Vector3(1, 1, 1); element.gameObject.SetActive(true); nullObject = element.gameObject; elements.Add(element); }
private void CaptureWebCamHandle(string pathToPhoto) { if (string.IsNullOrEmpty(pathToPhoto)) { Debug.Log("agora_: CaptureWebCamHandle has empty path!"); return; } Debug.Log("agora_:CaptureWebCamHandle on path: " + pathToPhoto); Sprite photoSprite = SpriteLoader.GetSpriteFromFile(pathToPhoto); if (photoSprite == null) { Debug.LogError("agora_: CaptureWebCam complete, but sprite is null in path:\n" + pathToPhoto); return; } photoImage.sprite = photoSprite; rephotoButtonObj.SetActive(true); photoImageObj.SetActive(true); webCamImageObj.SetActive(false); //CardAdditionalScreen.WebCamCaptureHandle(pathToPhoto, photoSprite); }
public void OnButtonClick() { if (string.IsNullOrEmpty(link)) { if (!GalleryController.isNullInstance) { GalleryController.GetInstance.ExitFromGallery(); } else if (!GallryViewCotroller.isNullInstance) { GallryViewCotroller.GetInstance.ExitFromGallery(); } Destroy(this.gameObject); } else { FullViewImageScreen.SetElement(this); FullViewImageScreen.ShowFullViewImageScreen(SpriteLoader.GetSpriteFromFile(Link), link); } }
private IEnumerator WaitForFile(string pathToPhoto) { //Debug.Log("agora_: WaitForFile"); yield return(null); Sprite photoSprite = SpriteLoader.GetSpriteFromFile(pathToPhoto); photoNames.Add(pathToPhoto); CheckingTextType checkingTextType = CheckingTextType.CarNumber; photo = photoSprite; if (string.IsNullOrEmpty(VideoCallPhotoManager.FolderName)) { PhotoChecking.OpenPhotoCheck(photoSprite, FolderName, checkingTextType, true); PhotoChecking.AddManualCloseEventListiner(RemoveLastPhoto); } else { StartCoroutine(PhotoMakeAnim()); SaveInFolder(); } }
public void Init() { nameText.text = folder.garageName; carnumberText.text = folder.folderName; orderNumber.text = folder.data; Transform element; for (int i = 0; i < folder.files.Count; i++) { element = Instantiate(galleryElement.transform, new Vector3(0, 0, 0), Quaternion.identity); element.SetParent(container.transform); element.localScale = new Vector3(1, 1, 1); string p = Path.Combine(Application.persistentDataPath, folder.folderName + "_" + folder.data + "_" + folder.modelid + "_" + folder.userid); string path = Path.Combine(p, folder.files[i].name); //Debug.Log(path); //element.gameObject.GetComponent<GalleryElement>().SetSprite = SpriteLoader.GetSpriteFromFile(path+"mini"); element.gameObject.GetComponent <GalleryElement>().SetMiniSprite = SpriteLoader.GetSpriteFromFile(path + "mini"); element.gameObject.GetComponent <GalleryElement>().Link = path; element.gameObject.SetActive(true); elements.Add(element); } }