C# Class WinFormsSample.Form1

Mostrar archivo Open project: KirillOsenkov/Undo

Public Methods

Method Description
Form1 ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

MultilevelTextboxRedoButton_Click ( object sender, EventArgs e ) : void
MultilevelTextboxUndoButton_Click ( object sender, EventArgs e ) : void
MultilevelTextbox_TextChanged ( object sender, EventArgs e ) : void
SetProperty ( string propertyName, object propertyValue ) : void

API to update the object model from the UI Creates an action and registers it with the action manager This is the interesting part of the demo

UpdateMultilevelUndoRedoButtons ( ) : void
UpdateUndoRedoButtons ( ) : void
btnRedo_Click ( object sender, EventArgs e ) : void
btnSetMany_Click ( object sender, EventArgs e ) : void

Demonstrates transactions - whatever happens inside the using statement is considered a single action

btnUndo_Click ( object sender, EventArgs e ) : void
joe_AgeChanged ( ) : void

Update the UI when the object model changes, but disable the textbox textchanged event to prevent recursion

joe_NameChanged ( ) : void

Update the UI when the object model changes, but disable the textbox textchanged event to prevent recursion

txtAge_TextChanged ( object sender, EventArgs e ) : void
txtName_TextChanged ( object sender, EventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

Form1() public method

public Form1 ( ) : System
return System