public void OnSelectedCellChanged(DiffViewEventArgs <FastGridControl> e)
        {
            var dataGrid = e.Container.Resolve <FastGridControl>(Key);

            if (e.Sender == dataGrid)
            {
                return;
            }

            var targetCell = new FastGridCellAddress(e.Sender.CurrentCell.Row, e.Sender.CurrentCell.Column);

            if (!targetCell.Equals(dataGrid.CurrentCell))
            {
                if (dataGrid.Model == null)
                {
                    return;
                }

                if (dataGrid.Model.RowCount < targetCell.Row || dataGrid.Model.ColumnCount < targetCell.Column)
                {
                    return;
                }

                dataGrid.CurrentCell = targetCell;

                if (e.Sender.GetSelectedModelCells().Aggregate(false, (r, c) => r |= dataGrid.AddSelectedCell(c)))
                {
                    dataGrid.InvalidateAll();
                }
            }

            var valuteTextBox = e.Container.ResolveAll <RichTextBox>();
        }
Beispiel #2
0
        public void OnSelectedCellChanged(FastGridControl target, IUnityContainer container)
        {
            var dataGrid = container.Resolve <FastGridControl>(Key);

            if (target == dataGrid)
            {
                return;
            }

            var targetCell = new FastGridCellAddress(target.CurrentCell.Row, target.CurrentCell.Column);

            if (!targetCell.Equals(dataGrid.CurrentCell))
            {
                if (dataGrid.Model == null)
                {
                    return;
                }

                if (dataGrid.Model.RowCount < targetCell.Row || dataGrid.Model.ColumnCount < targetCell.Column)
                {
                    return;
                }

                dataGrid.CurrentCell = targetCell;

                if (target.GetSelectedModelCells().Aggregate(false, (r, c) => r |= dataGrid.AddSelectedCell(c)))
                {
                    dataGrid.InvalidateAll();
                }
            }

            var valuteTextBox = container.ResolveAll <RichTextBox>();
        }