Exemplo n.º 1
0
        // -----------------------------------------------------------------------------
        public void Stop()
        {
            try
            {
                if (Disposed)
                {
                    throw new ObjectDisposedException("UpdateLib.Runner.Stop()", "Object is disposed");
                }

                DisposePollTimer();

                lock (_stoppedLock)
                {
                    if (_stopped == false)
                    {
                        if (_worker != null)
                        {
                            _worker.Kill();
                        }

                        _stopped = true;

                        LogHelper.LogToFile("INFO: ---");
                        LogHelper.LogToFile("INFO: " + _UpdateDetectionVariables.ServiceName + " was stopped!");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 void OnKillThread(object sender, EventArgs e)
 {
     m_WorkerThread.Kill();
     m_CreateThreadButton.Enabled = true;
     m_KillThreadButton.Enabled   = false;
 }