void GetValueSuggestor_Disposed(object sender, EventArgs e) { if (m_AutomationEngine != null) { m_AutomationEngine.Dispose(); m_AutomationEngine = null; } }
void ElementSetEditor_Disposed(object sender, EventArgs e) { if (m_AutomationEngine != null) { m_AutomationEngine.Dispose(); m_AutomationEngine = null; } }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { zDisableRecording(); if (m_AutomationEngine != null) { m_AutomationEngine.StepBegin -= m_AutomationEngine_StepBegin; m_AutomationEngine.StepComplete -= m_AutomationEngine_StepComplete; m_AutomationEngine.ExecutionBegin -= m_AutomationEngine_ExecutionBegin; m_AutomationEngine.ExecutionComplete -= m_AutomationEngine_ExecutionComplete; m_AutomationEngine.Dispose(); m_AutomationEngine = null; } components.Dispose(); } base.Dispose(disposing); }