按照添加顺序排序的键值对

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;

        }

  }

}

posted @ 2015-11-28 15:28  Alfred.Xu  阅读(717)  评论(0编辑  收藏  举报