コード例 #1
0
        private void btCancel_Click(object sender, EventArgs e)
        {
            stopCollectingOfTitles = true;

            if (lc != null)
            {
                lc.FinishThread(m_artist, m_track, "The search has been cancelled by the user.", "none");
                lc.Dispose();
                lc = null;
            }
            else
            {
                m_EventStopThread.Set();
                ThreadFinishedMethod(m_artist, m_track, "The search has been cancelled by the user.", "none");
            }

            bgWorkerSearch.CancelAsync();
            progressBar.ResetText();
            progressBar.Value       = 0;
            m_LyricControllerThread = null;
        }
コード例 #2
0
        private void btCancel_Click(object sender, EventArgs e)
        {
            if (_lyricsController != null)
            {
                _lyricsController.FinishThread(_mSelectedArtist, string.Empty, "The search has been cancelled by the user.", "none");
                _lyricsController.Dispose();
                _lyricsController = null;
            }
            else if (_mEventStopThread != null)
            {
                _mEventStopThread.Set();
                ThreadFinishedMethod(_mSelectedArtist, string.Empty, "The search has been cancelled by the user.", "none");
            }

            bwMusicTagSearch.CancelAsync();
            bwOnlineSearch.CancelAsync();
            ChangeButtonsEnableState();
            _mSearching = false;
            Thread.Sleep(500);
            RefreshSongsListView();
            RefreshArtistStats();
            ChangeStatusOnSubItems(true);
        }
コード例 #3
0
        private void btCancel_Click(object sender, EventArgs e)
        {
            _stopCollectingOfTitles = true;

            if (_lyricsController != null)
            {
                _lyricsController.FinishThread(_mArtist, _mTrack, "The search has been stopped by the user.", "none");
                _lyricsController.Dispose();
                _lyricsController = null;
            }
            else
            {
                _mEventStopThread.Set();
                ThreadFinishedMethod(_mArtist, _mTrack, "The search has been stopped by the user.", "none");
            }

            bgWorkerSearch.CancelAsync();
            progressBar.ResetText();
            progressBar.Value       = 0;
            _mLyricControllerThread = null;

            Update();
        }
コード例 #4
0
        private void stopSearch()
        {
            Monitor.Enter(this);
            try
            {
                if (lc != null)
                {
                    lc.FinishThread(originalArtist, originalTitle, "", "");
                    lc.Dispose();
                    lc = null;
                }
                else
                {
                    m_EventStopThread.Set();
                    ThreadFinishedMethod(originalArtist, originalTitle, "", "");
                }

                m_LyricControllerThread = null;
            }
            finally
            {
                Monitor.Exit(this);
            }
        }
コード例 #5
0
        private void StopSearch()
        {
            Monitor.Enter(this);
            try
            {
                if (_lyricsController != null)
                {
                    _lyricsController.FinishThread(_originalArtist, _originalTitle, "", "");
                    _lyricsController.Dispose();
                    _lyricsController = null;
                }
                else
                {
                    _mEventStopThread.Set();
                    ThreadFinishedMethod(_originalArtist, _originalTitle, "", "");
                }

                _mLyricControllerThread = null;
            }
            finally
            {
                Monitor.Exit(this);
            }
        }