ListView 内的 C# 图像
我想制作一个具有小图像的 ListView,这些图像是从 ListView 内部的扫描仪中获取的。 (我已经完成了扫描脚本,它将扫描的图像保存在 C:/Temp/*.jpg 下。)
我遇到的问题是,我希望扫描的图像显示在里面ListView 的视图,当您单击 ListView 中的图像时,它会在 PictureBox 中显示完整图像。
我正在谈论的内容的图像。(尝试将图像发布在这篇文章的但代表不够高)
我正在考虑将图像的位置存储在列表数组中,例如
List<string> fileLocationArray = new List<string>();
foreach () {
...
string fileLoc = (@"C:\temp\" + DateTime.Now.ToString("yyyy-MM-dd HHmmss") + ".jpeg");
fileLocationArray.Add(fileLoc);
...
}
然后使用列表数组在 ListView 中显示图像。
请记住,我计划将这些图像上传到 FTP 服务器。这就是为什么我想使用列表数组。
另一件事是,它们将是文档图片,而不是照片,如果这对您有意义的话。
I want to make a ListView that has small images, that was taken from a scanner, inside of the ListView. (I have the scanning script done, and it saves the scanned image under C:/Temp/*.jpg. )
What I'm having trouble with is, I want the scanned images to be displayed inside of the ListView and when you click an image in the ListView it displayed the full Image in the PictureBox.
An Image of what i'm talking about.(tried to post the image inside of this post but rep isn't high enough)
I was thinking about having the images' location stored inside of an List array like
List<string> fileLocationArray = new List<string>();
foreach () {
...
string fileLoc = (@"C:\temp\" + DateTime.Now.ToString("yyyy-MM-dd HHmmss") + ".jpeg");
fileLocationArray.Add(fileLoc);
...
}
Then displaying the images inside the ListView using the List array.
Keep in mind that I plan on uploading these images to an FTP server. That's why I wanted to use a List array.
one more thing, they will be picture of document, not photos, if that means anything to you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)