Example #1
0
        protected string GetFileName(string path, int len)
        {
            string filename = CStringUtil.GetOrgFileName(path);

            if (CStringUtil.IsNullOrEmpty(filename) == false && Encoding.Default.GetByteCount(filename) > len)
            {
                byte[] buf = Encoding.Default.GetBytes(filename);
                filename = Encoding.Default.GetString(buf, 0, len) + "...";
                buf      = null;
            }

            return(filename);
        }
Example #2
0
 protected string GetFileName(string path)
 {
     return(CStringUtil.GetOrgFileName(path));
 }