C# Class Smrf.AppLib.ExcelCalculationRestorer

Restores the Calculation property of an Excel Application object after a specified period.
This class can be used by callers that modify the Calculation property of an Excel Application object but want the original property value automatically restored after a specified time.

Create a ExcelCalculationRestorer object before the Application.Calculation property is changed. When the property is changed, call StartRestoreTimer. After milliseconds, the original property value will be automatically restored.

StartRestoreTimer can be called repeatedly to restart the restore timer.

Optionally, call Restore to immediately restore the original property value.

Inheritance: Object
Mostra file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_oTimer System.Windows.Forms.Timer

Public Methods

Method Description
ExcelCalculationRestorer ( Microsoft application ) : System

Initializes a new instance of the class.

Restore ( ) : void
StartRestoreTimer ( ) : void

Protected Methods

Method Description
m_oTimer_Tick ( object sender, EventArgs e ) : void

Private Methods

Method Description
AssertValid ( ) : void

Method Details

ExcelCalculationRestorer() public method

Initializes a new instance of the class.
public ExcelCalculationRestorer ( Microsoft application ) : System
application Microsoft /// Application object whose Calculation property needs to be recorded and /// later restored. ///
return System

Restore() public method

public Restore ( ) : void
return void

StartRestoreTimer() public method

public StartRestoreTimer ( ) : void
return void

m_oTimer_Tick() protected method

protected m_oTimer_Tick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Property Details

m_oTimer protected_oe property

protected System.Windows.Forms.Timer m_oTimer
return System.Windows.Forms.Timer