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