Ejemplo n.º 1
0
        public byte[] GetUserImage(int userID, S2CImagesSize size)
        {
            if (userID <= 0)
            {
                SetLastError(log, ErrorCodes.WRONG_INPUT, string.Format("Input error: userID={0}", userID));
                return(new byte[0]);
            }

            return(WebConnector.Current.SendByteRequest(GET_IMAGE_URL, userID + "&size=" + (int)size, false, false));
        }
Ejemplo n.º 2
0
        /////////////////////////////////////////////////////////////////////////////////////////////////


        #region Navigation Properties
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        //[XmlIgnore]
        //public string PictureRelativePath { get { return System.IO.Path.Combine("Content", "Images", "Users", ID + ".png"); } }

        /// <summary>
        /// Retrieves the name of the picture for this user, related to the given size
        /// </summary>
        /// <param name="size"></param>
        /// <returns></returns>
        public string PictureRelativePath(S2CImagesSize size)
        {
            return(string.Format("{0}_{1}.png", ID, size));
        }
Ejemplo n.º 3
0
        /////////////////////////////////////////////////////////////////////////////////////////////////


        #region Navigation Properties
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        //[XmlIgnore]
        //public string PictureRelativePath { get { return System.IO.Path.Combine("Content", "Images", "Users", ID + ".png"); } }

        /// <summary>
        /// Retrieves the name of the picture for this user, related to the given size
        /// </summary>
        /// <param name="size"></param>
        /// <returns></returns>
        public string PictureRelativePath(S2CImagesSize size) 
        {
            return string.Format("{0}_{1}.png", ID, size); 
        }
Ejemplo n.º 4
0
        public byte[] GetUserImage(int userID, S2CImagesSize size)
        {
            if (userID <= 0)
            {
                SetLastError(log, ErrorCodes.WRONG_INPUT, string.Format("Input error: userID={0}", userID));
                return new byte[0];
            }

            return WebConnector.Current.SendByteRequest(GET_IMAGE_URL, userID + "&size=" + (int)size, false, false);
        }