DictionaryEntry是单个键值对的类型

利用list的特性,完成按添加顺序排好的键值对

      

public List<DictionaryEntry> UrlList { get { return urlList; } }

 

DictionaryEntry de = new DictionaryEntry();

                de.Key = dph.FilePath; de.Value = dph.ImgUrl;

                urlList.Add(de);

 

foreach (DictionaryEntry de in urllist)

 {

    System.Drawing.Image tempimage = System.Drawing.Image.FromFile(de.Key.ToString());//图片路径

    int imagewidth = tempimage.Width;//宽

    int imageheight = tempimage.Height;//高

    if (imagewidth > 320 && imageheight > 320)

    {

        dph.GetPicThumbnail(320, 320, 50, de.Key.ToString());

                        break;

        }

  }

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-01-20
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-01-09
相关资源
相似解决方案