public void StartProcess(ClaymorParams _clParams) { try { this.clParams = _clParams; ProcessParams _params = new ProcessParams(_clParams.CalymoreAppPath, _clParams.ClaymorParmsString(false)); _params.ShowWindow = _clParams.ShowWindow; _params.listEnv.AddRange(_clParams.ListEnv()); _processHelper = new ClaymorProcessHelper(_params); _processHelper.Launch(); //NotifyStartProcess(); watcher = new FileSystemWatcher(); watcher.Path = _params.DirectoryName; /* Watch for changes in LastAccess and LastWrite times, and * the renaming of files or directories. */ watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; // Only watch text files. watcher.Filter = _clParams.EthLog; // Add event handlers. watcher.Changed += new FileSystemEventHandler(OnChanged); watcher.Created += new FileSystemEventHandler(OnChanged); // Begin watching. watcher.EnableRaisingEvents = true; } catch (Exception ex) { throw new Exception("Error during starting process " + _processHelper._params.AppName, ex); } }
private void _view_GenerateCommand() { string sCommand = _params_clone.ClaymorParmsString(true); _view.textCustomCommand = sCommand; }