阅读:1984回复:2
mo-undo
<P>我想在mo中实现undo功能大家有什么建议?</P><img src="images/post/smile/dvbbs/em01.gif" />
|
|
1楼#
发布于:2004-08-02 12:23
<b><FONT color=#990000>gis </FONT></b><img src="images/post/smile/dvbbs/em12.gif" />
|
|
2楼#
发布于:2004-08-02 10:24
<P>做过点,要做好,内容还不少,没个类型的实体undo都不太一样,下面给出一个函数,简单了,可能用处不大</P><P>Private Function UUMoveLine(map As MapObjects2.map) 'undo
On Error GoTo exit1 Dim x As Double, y As Double Dim layerNum As Long, m_selLine As Long Dim typea As Long Dim lineNew As New MapObjects2.Line typea = popType m_selLine = popInt layerNum = popInt y = popDouble x = popDouble x = -x y = -y popEnd Dim recs As MapObjects2.Recordset Set recs = map.Layers(layerNum).Records recs.MoveFirst recs.Edit Dim i As Long For i = 0 To m_selLine - 1 recs.MoveNext Next recs.Edit Dim Line As MapObjects2.Line Set Line = recs.Fields("Shape").Value CopyLinePan lineNew, Line, x, y Set recs.Fields("Shape").Value = lineNew Set lineNew = Nothing recs.Update Refresh map exit1: End Function</P> |
|
|