コード例 #1
0
        private ToolConflictRow BuildToolConflictRow(ConflictRowList list, ConflictTreeNode current, ConflictTreeNode diff)
        {
            var currentConnectorConflictTreeNode = currentToolConflictItem is ToolConflictItem.Empty ? null : current;
            var diffConnectorConflictTreeNode    = diffToolConflictItem is ToolConflictItem.Empty ? null : diff;
            var connectors = GetConnectorConflictRows(list, currentToolConflictItem, diffToolConflictItem, currentConnectorConflictTreeNode, diffConnectorConflictTreeNode);

            var diffToolConflictItem_override = diffToolConflictItem;

            if (currentToolConflictItem.Activity != null && diffToolConflictItem.Activity != null && currentToolConflictItem.Activity.Equals(diffToolConflictItem.Activity))
            {
                diffToolConflictItem_override = currentToolConflictItem.Clone();
            }

            var toolConflictRow = ToolConflictRow.CreateConflictRow(currentToolConflictItem, diffToolConflictItem_override, connectors);

            return(toolConflictRow);
        }
コード例 #2
0
        private void CreateStartRow(ConflictTreeNode current, ConflictTreeNode diff)
        {
            if (_cacheStartToolRow != null)
            {
                return;
            }

            ImageSource mergeIcon = null;

            if (Application.Current != null)
            {
                // TODO: replace Application.Current.TryFindResource with a mockable resource loader
                mergeIcon = Application.Current.TryFindResource("System-StartNode") as ImageSource;
            }

            var currentConflictItem   = ToolConflictItem.NewStartConflictItem(this, Column.Current, mergeIcon);
            var differentConflictItem = ToolConflictItem.NewStartConflictItem(this, Column.Current, mergeIcon);

            var startRow = ToolConflictRow.CreateStartRow(currentConflictItem, differentConflictItem);

            startRow.Connectors = CreateStartNodeConnectors(currentConflictItem, differentConflictItem, current, diff);

            _cacheStartToolRow = startRow;
        }