public void OnPhotoMsg(string path)
 {
     if (path.Length > 0)
     {
         HeaderManager.Instance.UploadHeader(RuntimeInfo.GetLocalDirectory() + "/images/" + path);
     }
 }
Exemple #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);
 }
Exemple #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;
    }