예제 #1
0
		[Test] // bug #81424
		public void DoubleBuffered ()
		{
			MockTreeView tv = new MockTreeView ();
			Assert.IsFalse (tv.IsDoubleBuffered, "#A1");
			Assert.IsTrue (tv.GetControlStyle (ControlStyles.AllPaintingInWmPaint), "#A2");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.DoubleBuffer), "#A3");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.OptimizedDoubleBuffer), "#A4");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.UserPaint), "#A5");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.StandardClick), "#A6");

			tv.IsDoubleBuffered = true;
			Assert.IsTrue (tv.IsDoubleBuffered, "#B1");
			Assert.IsTrue (tv.GetControlStyle (ControlStyles.AllPaintingInWmPaint), "#B2");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.DoubleBuffer), "#B3");
			Assert.IsTrue (tv.GetControlStyle (ControlStyles.OptimizedDoubleBuffer), "#B4");
			Assert.IsFalse (tv.GetControlStyle (ControlStyles.UserPaint), "#B5");
		}
예제 #2
0
        [Test]         // bug #81424
        public void DoubleBuffered()
        {
            MockTreeView tv = new MockTreeView();

            Assert.IsFalse(tv.IsDoubleBuffered, "#A1");
            Assert.IsTrue(tv.GetControlStyle(ControlStyles.AllPaintingInWmPaint), "#A2");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.DoubleBuffer), "#A3");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.OptimizedDoubleBuffer), "#A4");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.UserPaint), "#A5");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.StandardClick), "#A6");

            tv.IsDoubleBuffered = true;
            Assert.IsTrue(tv.IsDoubleBuffered, "#B1");
            Assert.IsTrue(tv.GetControlStyle(ControlStyles.AllPaintingInWmPaint), "#B2");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.DoubleBuffer), "#B3");
            Assert.IsTrue(tv.GetControlStyle(ControlStyles.OptimizedDoubleBuffer), "#B4");
            Assert.IsFalse(tv.GetControlStyle(ControlStyles.UserPaint), "#B5");
        }