示例#1
0
        [Test] public void InvalidateOnSelect()
        {
            JetListViewNode node = _nodeCollection.Add("Item1", null);

            _rowListRenderer.Invalidate += new InvalidateEventHandler(_rowListRenderer_Invalidate);
            _selectionModel.HandleMouseDown(node, Keys.None);
            Assert.IsTrue(_rowInvalidates.Count >= 1);
            InvalidateEventArgs args = (InvalidateEventArgs)_rowInvalidates [0];

            Assert.AreEqual(0, args.StartY);
            Assert.AreEqual(17, args.EndY);
        }
示例#2
0
        [Test] public void MouseSelect()
        {
            JetListViewNode item = _nodeCollection.Add("Item1", null);

            Assert.IsFalse(_model.IsNodeSelected(item));
            _model.HandleMouseDown(item, Keys.None);
            Assert.IsTrue(_model.IsNodeSelected(item));
            Assert.IsTrue(_model.IsNodeFocused(item));
        }