IWxWorkspace.Redo

Syntax

Redo([Steps: Integer = 1]);

Redo(Steps: integer);

Parameters

Steps. Number of steps. The parameter is equal to 1 by default.

Description

The Redo method repeats the defined number of canceled actions. If the parameter has not been defined, the method repeats the last canceled action.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component and the UiWorkspace component named UiWorkspace1, which is a data source for WorkspaceBox.

Add links to the Andy, Drawing, Ui system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    wsp: IWxWorkspace;
    Arrow: IWxArrow;
    b, b1: Boolean;
Begin
    wsp := UiWorkspace1.WxWorkspace;
    Arrow := wsp.CreateArrow;
    Arrow.FirstPoint := 
New GxPointF.Create(12);
    Arrow.LastPoint := 
New GxPointF.Create(319);
    Arrow.Angle := 
10;
    wsp.Undo(wsp.UndoNumSteps);
    
If wsp.Modified Then
    b := WinApplication.YesNoCancelBox(
"Save changed data?", b1);
        
If b1 Then
        
Else
            wsp.Redo(wsp.RedoNumSteps);
        
End If;
    
End If;
End Sub Button1OnClick;

Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Ui;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    wsp: IWxWorkspace;
    Arrow: IWxArrow;
    WinAppCls: WinApplicationClass = 
New WinApplicationClassClass();
    b, b1: Boolean;
    
Begin
    wsp := uiWorkspaceNet1.WxWorkspace;
    Arrow := wsp.CreateArrow();
    Arrow.FirstPoint.Create(
12);
    Arrow.LastPoint.Create(
319);
    Arrow.Angle := 
10;
    wsp.Undo(wsp.UndoNumSteps);
    
If wsp.Modified Then
    b := WinAppCls.YesNoCancelBox(
"Save changed data?"Var b1, New IWin32WindowForeAdapter(Self));
        
If b1 Then
        
Else
            wsp.Redo(wsp.RedoNumSteps);
        
End If;
    
End If;
End Sub;

After executing the example all available actions are repeated.

See also:

IWxWorkspace | WxWorkspace.UndoEnabled