예제 #1
0
        protected virtual void OffsetNodes(bool row, int idx)
        {
            var nodes = VLines.Select(x => x as rMindLine)
                        .Union(HLines.Select(x => x as rMindLine))
                        .Select(x => x.NodesA.Union(x.NodesB));

            nodes = row ?
                    nodes.Select(x => x.Where(y => y.Row > idx)) :
                    nodes.Select(x => x.Where(y => y.Column > idx));

            foreach (var arr in nodes)
            {
                foreach (var n in arr)
                {
                    if (row)
                    {
                        n.Row--;
                    }
                    else
                    {
                        n.Column--;
                    }
                }
            }
        }
예제 #2
0
        protected virtual void RemoveVerticalLine(rMindVerticalLine line)
        {
            var removeNodes = line.TopNodes.Union(line.BottomNodes).ToList();
            var colIdx      = GetLineIndex(line);

            RemoveNodes(removeNodes);
            // Собираем узлы ниже
            OffsetNodes(false, colIdx);
            if (Template.ColumnDefinitions.Count > 1)
            {
                Template.ColumnDefinitions.Remove(
                    Template.ColumnDefinitions.Last()
                    );
            }
            VLines.Remove(line);
        }