ActiveReports 10
UndoManager Class
Members  Example 

GrapeCity.ActiveReports.Design.Win.v10 Assembly > GrapeCity.ActiveReports.Design Namespace : UndoManager Class
The UndoManager class allows users to undo and redo changes.
Object Model
UndoManager Class
Syntax
'Declaration
 
Public NotInheritable Class UndoManager 
public sealed class UndoManager 
Example
// tbStandard_ButtonClick - calls ExecuteDesignerAction, or the associated function
// based on the button clicked.

private void tbStandard_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
    if((string)e.Button.Tag == "NewReport")  //New Report was Clicked
    {
        this.ardMain.NewReport();
        this.FillCombo();
    }
    if((string)e.Button.Tag == "Open")  //Open Report was Clicked
    {
        this.OpenReportFile();
    }
    if((string)e.Button.Tag == "Save")  //Save Report was Clicked
    {
        this.SaveReportFile();
    }
    if((string)e.Button.Tag == "SaveAs")  //SaveAs was Clicked
    {
        this.SaveAsReportFile();
    }
    if((string)e.Button.Tag == "ReportSettings")  //ReportSettings was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.ReportSettings);
    }
    if((string)e.Button.Tag == "Undo")  //Undo was Clicked
    {
        this.ardMain.UndoManager.Undo();
    }
    if((string)e.Button.Tag == "Cut")  //Cut was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.EditCut);
    }
    if((string)e.Button.Tag == "Copy")  //Copy was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.EditCopy);
    }
    if((string)e.Button.Tag == "Paste")  //Paste was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.EditPaste);
    }
    if((string)e.Button.Tag == "Delete")  //Delete was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.EditDelete);
    }
    if((string)e.Button.Tag == "ReorderGroups")  //ReorderGroups was Clicked
    {
        this.ardMain.ExecuteAction(DesignerAction.ReorderGroups);
    }    
}
'tbStandard_ButtonClick - calls ExecuteDesignerAction, or the associated function
'based on the button clicked.
Private Sub tbStandard_ButtonClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbStandard.ButtonClick
    If CStr(e.Button.Tag) = "NewReport" Then 'New Report was Clicked
        Me.ardMain.NewReport()
        Me.FillCombo()
    End If
    If CStr(e.Button.Tag) = "Open" Then 'Open Report was Clicked
        Me.OpenReportFile()
    End If
    If CStr(e.Button.Tag) = "Save" Then 'Save Report was Clicked
        Me.SaveReportFile()
    End If
    If CStr(e.Button.Tag) = "SaveAs" Then 'SaveAs was Clicked
        Me.SaveAsReportFile()
    End If
    If CStr(e.Button.Tag) = "ReportSettings" Then 'ReportSettings was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.ReportSettings)
    End If
    If CStr(e.Button.Tag) = "Undo" Then 'Undo was Clicked
        Me.ardMain.UndoManager.Undo()
    End If
    If CStr(e.Button.Tag) = "Cut" Then 'Cut was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.EditCut)
    End If
    If CStr(e.Button.Tag) = "Copy" Then 'Copy was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.EditCopy)
    End If
    If CStr(e.Button.Tag) = "Paste" Then 'Paste was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.EditPaste)
    End If
    If CStr(e.Button.Tag) = "Delete" Then 'Delete was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.EditDelete)
    End If
    If CStr(e.Button.Tag) = "ReorderGroups" Then 'ReorderGroups was Clicked
        Me.ardMain.ExecuteAction(DesignerAction.ReorderGroups)
    End If
End Sub 'tbStandard_ButtonClick
Inheritance Hierarchy

System.Object
   GrapeCity.ActiveReports.Design.UndoManager

See Also

Reference

UndoManager Members
GrapeCity.ActiveReports.Design Namespace