private void FileEdited(string filePath) { var model = new DiffModel { FilePath = filePath, IsFile = true, Mode = DiffModel.DiffMode.Edit }; OnDiffFind(model); }
private void DirectoryFound(string directoryPath) { var model = new DiffModel { FilePath = directoryPath, IsFile = false, Mode = DiffModel.DiffMode.Add }; OnDiffFind(model); }
protected void OnDiffFind(DiffModel diffModel) { if (control.InvokeRequired) { control.Invoke(new DiffEventHandler(OnDiffFind), diffModel); return; } if (DiffFound != null) { DiffFound.Invoke(diffModel); } }
void df_DiffFound(DiffModel diffModel) { var fileName = Path.GetFileName(diffModel.FilePath); if (diffModel.IsFile) { var ignoreFiles = this.textBox4.Text.Split(':'); if (Array.IndexOf(ignoreFiles, fileName) >= 0) { return; } } dataGridView1.Rows.Add(diffModel, fileName, diffModel.IsFile, diffModel.Mode, diffModel.FilePath); }