예제 #1
0
파일: AgentBase.cs 프로젝트: angellcq/src
        /// <summary>
        /// Sets the text control agent to the specifed one, null agent
        /// if NULL
        /// </summary>
        /// <param name="textInterface">Text interface to set</param>
        protected void setTextInterface(TextControlAgentBase textInterface = null)
        {
            if (_textInterface != null)
            {
                Log.Debug("Disposing " + _textInterface.GetType().Name);
                _textInterface.Dispose();
            }

            Log.Debug("Setting textinterface to " + ((textInterface != null) ? textInterface.GetType().Name : "null"));

            _textInterface = textInterface ?? _nullTextInterface;
            AgentManager.Instance.TextControlAgent = _textInterface;
        }
예제 #2
0
파일: AgentBase.cs 프로젝트: angellcq/src
        /// <summary>
        /// Dispose object
        /// </summary>
        /// <param name="disposing">dispose if true</param>
        private void dispose(bool disposing)
        {
            if (!_disposed)
            {
                Log.Debug();

                if (disposing)
                {
                    if (_nullTextInterface != null)
                    {
                        _nullTextInterface.Dispose();
                    }

                    OnDispose();
                }
                // Release unmanaged resources.
            }

            _disposed = true;
        }