如何在C#中的picturebox中实现撤消和重做操作 [英] How implement undo and redo operation in picturebox in C#

查看:394
本文介绍了如何在C#中的picturebox中实现撤消和重做操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题   如何在C#中的图片框中实现撤消和重做操作

我有一个图像 图片框 in 我的项目。我执行一些过程,如 zoom,添加文本,画画,旋转......。现在我想为 这个实现撤消和重做操作。当我单击一个按钮时,应撤消上一个操作。

我在
microsoft visual studio,Windows Form Application中工作

谢谢:)。





我的尝试:


$ b $很多尝试,但只是找到了如何撤消和重做文本框。

解决方案

当然你找不到那样的东西,因为没有人在清醒的心灵赢得不这样做。请查看我过去的答案:

在其中附加图片图片框 [ ^ ],

画一个矩形C# [ ^ ],

如何从旧图纸中清除面板 [ ^ ]。



如果你想做的话还有更多图形并使其动态化:

什么样的俏皮方法是Paint? (DataGridViewImageCell.Paint(...)) [ ^ ],

在面板上捕获绘图 [ ^ ],

mdi子表单之间的绘制线 [ ^ ],

C#.net鼠标滚轮中的缩放图像 [ ^ ],

如何避免DatagridView C#中的红十字[ [ ^ ]。



-SA

My question is " How implement Undo AND Redo operation in picturebox in C# " .

I have a image " picture box " in my project . i perform some of processes such as " zoom , add text , draw , rotate ... " . now I want to implement the undo and redo operation for this . When i click a button the last operation should be undone.

I work in microsoft visual studio ,Windows Form Application .

Thank You :) . 



What I have tried:

lot of Trying but just a found how to undo and redo Text Box .

解决方案

Of course you could not find anything like that, because no one in sober mind won't do it. Please see my past answers:
Append a picture within picturebox[^],
draw a rectangle in C#[^],
How do I clear a panel from old drawing[^].

Some more, if you want to do graphics and make it dynamic:
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
capture the drawing on a panel[^],
Drawing Lines between mdi child forms[^],
Zoom image in C# .net mouse wheel[^],
How to avoid Red Cross in DatagridView C#[^].

—SA


这篇关于如何在C#中的picturebox中实现撤消和重做操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆