예제 #1
0
파일: Watcher.cs 프로젝트: mayuki/SassTray
 public Watcher(String path)
 {
     _path = path;
     _logViewForm = new LogViewForm() { Text = "Sass: " + _path, Visible = false };
 }
예제 #2
0
파일: Watcher.cs 프로젝트: mayuki/SassTray
        public void Stop()
        {
            if (_process == null) return;

            if (_logViewForm.InvokeRequired)
                _logViewForm.Invoke((Action)(() => _logViewForm.Close()));
            else
                _logViewForm.Close();

            if (!_process.HasExited)
            {
                _process.Kill();
                _process.WaitForExit(1000);
            }

            _process = null;
            _logViewForm = null;

            if (Stopped != null)
                Stopped(this, new WatcherEventArgs() { Detail = _path });
        }