将DevExpress.Utils.ImageCollection变量的image导出
private void tspBtnExportExcel_Click(object sender, EventArgs e)
{
//暫時(shí)用來(lái)導(dǎo)出圖片
string filePath = System.Environment.CurrentDirectory + @"\Photo\";
DevExpress.Utils.Images images = ribbonImageCollectionLarge.Images;
InnerImagesList inner = images.InnerImages;
foreach (DevExpress.Utils.ImageInfo imageInfo in inner)
{
//導(dǎo)出之前必須保證filePath路徑是存在的
try
{
imageInfo.Image.Save(filePath + imageInfo.Name, System.Drawing.Imaging.ImageFormat.Png);
}
catch (Exception ex)
{
MessageBox.Show("錯(cuò)誤", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
轉(zhuǎn)載于:https://www.cnblogs.com/chucklu/p/3804118.html
總結(jié)
以上是生活随笔為你收集整理的将DevExpress.Utils.ImageCollection变量的image导出的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: [再寄小读者之数学篇](2014-06-
- 下一篇: select 与c:forEach结合小