コード例 #1
0
        /// <summary>
        /// Остановить выполнение скрипта
        /// </summary>
        public void ConvertStop()
        {
            if (!_isRunning)
            {
                return;
            }

            if ((_thread != null) && (_thread.ThreadState != ThreadState.Stopped))
            {
                try
                {
                    _thread.Abort();
                    _thread.Join();
                }
                catch (Exception e)
                {
                    var ex = new ThreadConvertStopException(e);
                    _view.ViewException(ex);
                }

                _thread = null;
            }
            ConvertStopInternal();
        }
コード例 #2
0
ファイル: MainPresenter.cs プロジェクト: iEmiya/pyExcel
        /// <summary>
        /// Остановить выполнение скрипта 
        /// </summary>
        public void ConvertStop()
        {
            if (!_isRunning) return;

            if ((_thread != null) && (_thread.ThreadState != ThreadState.Stopped))
            {
                try
                {
                    _thread.Abort();
                    _thread.Join();
                }
                catch (Exception e)
                {
                    var ex = new ThreadConvertStopException(e);
                    _view.ViewException(ex);
                }

                _thread = null;
            }
            ConvertStopInternal();
        }