PowerTools ActiveReports for .NET 11.0J
UndoManager クラス
メンバ  使用例 

UndoManagerクラスを使用すると、変更を元に戻したり、繰り返したりできます。
オブジェクト モデル
UndoManager クラス
構文
'宣言
 
Public NotInheritable Class UndoManager 
public sealed class UndoManager 
使用例
// tbStandard_ButtonClick - クリックされたボタンによって、ExecuteDesignerAction、
// または関連付きの機能を呼び出す。

private void tbStandard_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
    if((string)e.Button.Tag == "NewReport")  //[新規作成]がクリックされました。
    {
        this.ardMain.NewReport();
        this.FillCombo();
    }
    if((string)e.Button.Tag == "Open")  //[開く]がクリックされました。
    {
        this.OpenReportFile();
    }
    if((string)e.Button.Tag == "Save")  //[上書き保存]がクリックされました。
    {
        this.SaveReportFile();
    }
    if((string)e.Button.Tag == "SaveAs")  //[名前を付けて保存]がクリックされました。
    {
        this.SaveAsReportFile();
    }
    if((string)e.Button.Tag == "ReportSettings")  //[レポートの設定]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.ReportSettings);
    }
    if((string)e.Button.Tag == "Undo")  //[元に戻す]がクリックされました。
    {
        this.ardMain.UndoManager.Undo();
    }
    if((string)e.Button.Tag == "Cut")  //[切り取り]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.EditCut);
    }
    if((string)e.Button.Tag == "Copy")  //[コピー]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.EditCopy);
    }
    if((string)e.Button.Tag == "Paste")  //[貼り付け]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.EditPaste);
    }
    if((string)e.Button.Tag == "Delete")  //[削除]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.EditDelete);
    }
    if((string)e.Button.Tag == "ReorderGroups")  //[グループ順]がクリックされました。
    {
        this.ardMain.ExecuteAction(DesignerAction.ReorderGroups);
    }    
}
'tbStandard_ButtonClick - クリックされたボタンによって、ExecuteDesignerAction、
'または関連付きの機能を呼び出す。
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 '[新規作成]がクリックされました。
        Me.ardMain.NewReport()
        Me.FillCombo()
    End If
    If CStr(e.Button.Tag) = "Open" Then '[開く]がクリックされました。
        Me.OpenReportFile()
    End If
    If CStr(e.Button.Tag) = "Save" Then '[上書き保存]がクリックされました。
        Me.SaveReportFile()
    End If
    If CStr(e.Button.Tag) = "SaveAs" Then '[名前を付けて保存]がクリックされました。
        Me.SaveAsReportFile()
    End If
    If CStr(e.Button.Tag) = "ReportSettings" Then '[レポートの設定]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.ReportSettings)
    End If
    If CStr(e.Button.Tag) = "Undo" Then '[元に戻す]がクリックされました。
        Me.ardMain.UndoManager.Undo()
    End If
    If CStr(e.Button.Tag) = "Cut" Then '[切り取り]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.EditCut)
    End If
    If CStr(e.Button.Tag) = "Copy" Then '[コピー]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.EditCopy)
    End If
    If CStr(e.Button.Tag) = "Paste" Then '[貼り付け]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.EditPaste)
    End If
    If CStr(e.Button.Tag) = "Delete" Then '[削除]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.EditDelete)
    End If
    If CStr(e.Button.Tag) = "ReorderGroups" Then '[グループ順]がクリックされました。
        Me.ardMain.ExecuteAction(DesignerAction.ReorderGroups)
    End If
End Sub 'tbStandard_ButtonClick
継承階層

System.Object
   GrapeCity.ActiveReports.Design.UndoManager

参照

関連項目

UndoManager メンバ
GrapeCity.ActiveReports.Design 名前空間

 

 


©2003-2017 GrapeCity inc. All rights reserved.