Example #1
0
        private void FileEdited(string filePath)
        {
            var model = new DiffModel
            {
                FilePath = filePath,
                IsFile   = true,
                Mode     = DiffModel.DiffMode.Edit
            };

            OnDiffFind(model);
        }
Example #2
0
        private void DirectoryFound(string directoryPath)
        {
            var model = new DiffModel
            {
                FilePath = directoryPath,
                IsFile   = false,
                Mode     = DiffModel.DiffMode.Add
            };

            OnDiffFind(model);
        }
Example #3
0
 protected void OnDiffFind(DiffModel diffModel)
 {
     if (control.InvokeRequired)
     {
         control.Invoke(new DiffEventHandler(OnDiffFind), diffModel);
         return;
     }
     if (DiffFound != null)
     {
         DiffFound.Invoke(diffModel);
     }
 }
Example #4
0
        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);
        }