Exemple #1
0
 /// <summary>
 /// 无水印等比率缩放
 /// </summary>
 /// <param name="postedFile"></param>
 /// <param name="targetWidth"></param>
 /// <param name="targetHeight"></param>
 /// <param name="isWaterMark"></param>
 public void ZoomAuto(byte[] postedFile, int targetWidth, int targetHeight, bool isWaterMark = false)
 {
     if (!isWaterMark)
     {
         ZoomAuto(postedFile, targetWidth, targetHeight, "", "");
     }
     else
     {
         string folder        = AppSettingManager.GetSetting("IM", "ProductImage_WatermarkPath");
         var    waterMarkPath = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, folder);
         ZoomAuto(postedFile, targetWidth, targetHeight, "", waterMarkPath);
     }
 }
Exemple #2
0
        private static void FileRenamed(object sender, RenamedEventArgs target)
        {
            string name = Path.GetFileNameWithoutExtension(target.OldFullPath);

            AppSettingManager.ClearAllSettings(name);
        }
Exemple #3
0
 public Dictionary <string, string> GetAllAppSettings(string domain)
 {
     return(AppSettingManager.GetAllSettings(domain));
 }
Exemple #4
0
        private static void FileChanged(object sender, FileSystemEventArgs target)
        {
            string name = Path.GetFileNameWithoutExtension(target.FullPath);

            AppSettingManager.ClearAllSettings(name);
        }
Exemple #5
0
 public string GetAppSetting(AppSettingQueryFilter filter)
 {
     return(AppSettingManager.GetSetting(filter.DomainName, filter.Key));
 }