Beispiel #1
0
        /// <summary>
        /// 检查CPS组件图标库中是否与当前上传的图标名称重复,若是返回true,否则返回false
        /// </summary>
        /// <returns>返回值为 true:CPS组件图标库中已存在此图标;false:CPS组件图标库中不存在此图标</returns>
        public string CheckIcon()
        {
            string path     = CPSModuleConfig.GetCPSIconPath();
            string filePath = Path.Combine(path, Request.Form["RealFileName"]);

            return(System.IO.File.Exists(filePath) ? "true" : "false");
        }
Beispiel #2
0
        /// <summary>
        /// 将临时上传的图标转移到CPS组件图标库中
        /// </summary>
        public void MoveIcon()
        {
            string path = CPSModuleConfig.GetCPSIconPath();

            string orgFileName  = Request.Form["FileName"];
            string orgFilePath  = Path.Combine(EnvProvider.Default.DocumentsPath, "Temp", orgFileName);
            string fileName     = Request.Form["RealFileName"];
            string moveFilePath = Path.Combine(path, fileName);

            System.IO.File.Move(orgFilePath, moveFilePath);
        }