public Watcher(String path) { _path = path; _logViewForm = new LogViewForm() { Text = "Sass: " + _path, Visible = false }; }
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 }); }