private void CompareFiles(object parameter = null)
        {
            _compareResults = EditableModelChangeHistoryEntry.CompareEditableModel(
                em1: FileA, em2: FileB, includeNonChanged: true);

            ObservableCollection <BlockModel> blocks       = new ObservableCollection <BlockModel>();
            EditableModelChangeHistoryEntry   blockResults = _compareResults.ChangedItems
                                                             .FirstOrDefault(r => r.Property == "Blocks");

            if (blockResults != null)
            {
                for (int b = 0; b < blockResults.ChangedItems.Count; b++)
                {
                    var blockResult   = blockResults.ChangedItems[b];
                    var originalBlock = blockResult.OldValue as BlockModel;
                    var modifiedBlock = blockResult.NewValue as BlockModel;
                    EditableModelChangeHistoryEntry chunkResults = blockResult.ChangedItems
                                                                   .FirstOrDefault(r => r.Property == "Chunks");

                    if (originalBlock != null)
                    {
                        EditableModel.SetChangeHistory(originalBlock, blockResult);
                    }

                    if (modifiedBlock != null)
                    {
                        EditableModel.SetChangeHistory(modifiedBlock, blockResult);
                    }

                    blocks.Add(modifiedBlock == null ? originalBlock : modifiedBlock);

                    if (chunkResults != null)
                    {
                        for (int c = 0; c < chunkResults.ChangedItems.Count; c++)
                        {
                            var chunkResult   = chunkResults.ChangedItems[c];
                            var originalChunk = chunkResult.OldValue as ChunkModel;
                            var modifiedChunk = chunkResult.NewValue as ChunkModel;

                            if (originalChunk != null)
                            {
                                EditableModel.SetChangeHistory(originalChunk, chunkResult);
                            }

                            if (modifiedChunk != null)
                            {
                                EditableModel.SetChangeHistory(modifiedChunk, chunkResult);
                            }
                        }
                    }
                }
            }

            Blocks = blocks;
        }
        private void UpdateChunks()
        {
            if (SelectedBlock == null)
            {
                OriginalChunks = null;
                ModifiedChunks = null;
            }

            else
            {
                EditableModelChangeHistoryEntry chunkResults = EditableModel.GetChangeHistory(SelectedBlock)
                                                               .ChangedItems.FirstOrDefault(r => r.Property == "Chunks");

                if (chunkResults != null)
                {
                    OriginalChunks = (IList)chunkResults.OldValue;
                    ModifiedChunks = (IList)chunkResults.NewValue;
                }
            }
        }