private void dgvDocs_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Document document; string path; document = (Document)dgvDocs.CurrentRow.DataBoundItem; path = document.Documentpath; System.Diagnostics.Process.Start(path); }
protected virtual bool IsFileinUse(FileInfo file) { FileStream stream = null; try { stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); } catch (IOException) { //the file is unavailable because it is: //still being written to //or being processed by another thread //or does not exist (has already been processed) return true; } finally { if (stream != null) stream.Close(); } return false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)