static void DragRows(RowLocation dragLocation)
        {
            var rows = Document.Current.TopLevelSelectedRows().ToList();

            foreach (var elem in rows)
            {
                Probers.Any(p => p.Probe(elem, dragLocation));
                dragLocation.Index++;
            }
        }
示例#2
0
        static void DragRows(RowLocation dragLocation)
        {
            List <Row> parentRowRows = dragLocation.ParentRow.Rows;

            IEnumerable <KeyValuePair <Row, int> > enumeratedSelectedRows = Document.Current.TopLevelSelectedRows()
                                                                            .Select(row => new KeyValuePair <Row, int>(row, parentRowRows.IndexOf(row)));

            var rows = enumeratedSelectedRows.ToList();

            Document.Current.History.DoTransaction(() => {
                foreach (var elem in rows)
                {
                    Probers.Any(p => p.Probe(elem.Key, dragLocation));
                    if (elem.Value == -1 || elem.Value >= dragLocation.Index)
                    {
                        ++dragLocation.Index;
                    }
                }
            });
        }
 public SelectAndDragRowsProcessor()
 {
     Probers.Add(new BoneRowProber());
     Probers.Add(new FolderRowProber());
     Probers.Add(new NodeRowProber());
 }