Пример #1
0
        /// <summary>
        /// Releases all resources used by this <see cref="ConsoleForm">ConsoleForm</see>
        /// object.
        /// </summary>
        void IDisposable.Dispose()
        {
            ((IDisposable)_labels).Dispose();
            ((IDisposable)_textboxes).Dispose();
            ((IDisposable)_lines).Dispose();

            // Unwire any listening events.
            _keyPressEvent     = null;
            _formCompleteEvent = null;
            FormCancelled      = null;

            // Terminate the keypress loop.
            _keyThread.Abort();
            _keyThread = null;

            GC.SuppressFinalize(this);
        }
Пример #2
0
        /// <summary>
        /// Releases all resources used by this <see cref="ConsoleForm">ConsoleForm</see>
        /// object.
        /// </summary>
        void IDisposable.Dispose() {
            ((IDisposable)_labels).Dispose();
            ((IDisposable)_textboxes).Dispose();
            ((IDisposable)_lines).Dispose();

            // Unwire any listening events.
            _keyPressEvent = null;
            _formCompleteEvent = null;
            FormCancelled = null;

            // Terminate the keypress loop.
            _keyThread.Abort();
            _keyThread = null;

            GC.SuppressFinalize(this);
        }