Exemplo n.º 1
0
 public void OnPhotoMsg(string path)
 {
     if (path.Length > 0)
     {
         HeaderManager.Instance.UploadHeader(RuntimeInfo.GetLocalDirectory() + "/images/" + path);
     }
 }
Exemplo n.º 2
0
 bool SaveTex(uint id, uint crc, byte[] data)
 {
     try
     {
         string path = RuntimeInfo.GetLocalDirectory() + "/images/" + id + "_" + crc + ".jpg";
         System.IO.File.WriteAllBytes(path, data);
         return(true);
     }
     catch
     {
     }
     return(false);
 }
Exemplo n.º 3
0
    //获取头像
    System.Collections.IEnumerator GetHeader(object obj)
    {
        DownPlayerHeader dph  = (DownPlayerHeader)obj;
        string           pic  = dph.PlayerID + "_" + dph.Crc + ".jpg";
        string           path = RuntimeInfo.GetLocalDirectory() + "/images/" + pic;

        if (System.IO.File.Exists(path))
        {
            dph.Local = true;
            dph.W     = new WWW("file:///" + path);
        }
        else
        {
            dph.Local    = false;
            dph.DownData = FTPClient.Instance.AddDownload(DownloadType.DOWNLOAD_DEFAULT, ServerSetting.RT_IMAGE_DIR + pic, null);
        }
        yield break;
    }