예제 #1
0
 public void ShareFiles(IEnumerable <string> p_filePaths)
 {
     if (p_filePaths != null)
     {
         CrossFileProvider.ShareFiles(p_filePaths, m_shareText, m_shareSubject);
     }
 }
예제 #2
0
 public void ShareFile(string p_filePath)
 {
     if (!string.IsNullOrEmpty(p_filePath))
     {
         CrossFileProvider.ShareFile(p_filePath, m_shareText, m_shareSubject);
     }
 }
예제 #3
0
        protected ExternImgFile CreateImageStruct(string p_key)
        {
            ExternImgFile v_wwwImage = null;

            _cachedImages.TryGetValue(p_key, out v_wwwImage);
            if (v_wwwImage == null)
            {
                v_wwwImage = new ExternImgFile();
            }
            v_wwwImage.Error   = null;
            v_wwwImage.Url     = p_key;
            v_wwwImage.Texture = !string.IsNullOrEmpty(p_key) && CrossFileProvider.FileExists(p_key)? NativeGallery.LoadImageAtPath(p_key, MaxImageLoadSize, false, false) : null;
            if (v_wwwImage.Texture != null)
            {
                v_wwwImage.Sprite = Sprite.Create(v_wwwImage.Texture, new Rect(0, 0, v_wwwImage.Texture.width, v_wwwImage.Texture.height), new Vector2(0.5f, 0.5f));
            }
            if (v_wwwImage.Texture == null)
            {
                v_wwwImage.Error = "Unable to get image from path";
            }
            v_wwwImage.Status    = AsyncStatusEnum.Done;
            _cachedImages[p_key] = v_wwwImage;
            return(v_wwwImage);
        }