Esempio n. 1
0
        /// <summary>
        /// 合并项构造函数
        /// </summary>
        /// <param name="nCells">即将合并的单元格集合</param>
        /// <param name="data">表格数据上下文</param>
        public NCellMergeItem(NCellCollection nCells, NTableData data)
        {
            if (nCells.Count == 0)
            {
                throw new ArgumentNullException("合并单元格不能为空");
            }

            RootNCell = nCells.GetLeftTopNCell();
            Id = Guid.NewGuid();
            _nCells = nCells;
            _data = data;
        }
Esempio n. 2
0
 public MainWindow()
 {
     _selectedNCells = new NCellCollection();
     InitializeComponent();
     _nTableData = new NTableData();
     _dragThumbManager=new DragThumbManager(_nTableData);
     _nTableData.Rows.CollectionChanged += RowsOnCollectionChanged;
     _nTableData.Columns.CollectionChanged += ColumnsOnCollectionChanged;
     MouseUp += OnMouseUp;
     EffectContainer.MouseLeftButtonDown+=EffectContainerOnMouseLeftButtonDown;
     AddHandler(NCell.NCellMouseMoveEvent, new NCellMouseEventHandler(NCellMouseMove));
     AddHandler(NCell.NCellMouseLeftDownEvent, new NCellMouseEventHandler(NCellMouseLeftDown));
     AddHandler(NCell.NCellGotKeyboardFocusEvent, new RoutedEventHandler(NCellGotKeyboardFocus));
     AddHandler(NCell.NCellLostKeyboardFocusEvent, new RoutedEventHandler(NCellLostKeyboardFocus));
 }
Esempio n. 3
0
 public DragThumbManager(NTableData nTableData)
 {
     _nTableData = nTableData;
 }