示例#1
0
 void GetValueSuggestor_Disposed(object sender, EventArgs e)
 {
     if (m_AutomationEngine != null)
     {
         m_AutomationEngine.Dispose();
         m_AutomationEngine = null;
     }
 }
示例#2
0
 void ElementSetEditor_Disposed(object sender, EventArgs e)
 {
     if (m_AutomationEngine != null)
     {
         m_AutomationEngine.Dispose();
         m_AutomationEngine = null;
     }
 }
示例#3
0
        /// <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);
        }