예제 #1
0
        public void TestKeyPress_GridButNoColumns()
        {
            TextBoxPoker tb = new TextBoxPoker();
            DataGrid     dg = new DataGrid();

            tb.SetDataGrid(dg);
            tb.DoOnKeyPress(new KeyPressEventArgs('a'));
        }
예제 #2
0
        public void TestKeyPress()
        {
            TextBoxPoker tb = new TextBoxPoker();
            DataGridMock dg = new DataGridMock();

            tb.SetDataGrid(dg);
            Assert.IsTrue(tb.IsInEditOrNavigateMode, "1");

            tb.DoOnKeyPress(new KeyPressEventArgs('a'));
            Assert.IsFalse(tb.IsInEditOrNavigateMode, "2");
            Assert.AreEqual("", tb.Text, "3");

            tb.ReadOnly = true;
            tb.IsInEditOrNavigateMode = true;
            tb.DoOnKeyPress(new KeyPressEventArgs('a'));
            Assert.IsTrue(tb.IsInEditOrNavigateMode, "4");
            Assert.AreEqual("", tb.Text, "5");
        }
예제 #3
0
		public void TestKeyPress_NoGrid ()
		{
			TextBoxPoker tb = new TextBoxPoker ();
			tb.DoOnKeyPress (new KeyPressEventArgs ('a'));
		}
예제 #4
0
		public void TestKeyPress ()
		{
			TextBoxPoker tb = new TextBoxPoker ();
			DataGridMock dg = new DataGridMock ();

			tb.SetDataGrid (dg);
			Assert.IsTrue (tb.IsInEditOrNavigateMode, "1");

			tb.DoOnKeyPress (new KeyPressEventArgs ('a'));
			Assert.IsFalse (tb.IsInEditOrNavigateMode, "2");
			Assert.AreEqual ("", tb.Text, "3");

			tb.ReadOnly = true;
			tb.IsInEditOrNavigateMode = true;
			tb.DoOnKeyPress (new KeyPressEventArgs ('a'));
			Assert.IsTrue (tb.IsInEditOrNavigateMode, "4");
			Assert.AreEqual ("", tb.Text, "5");
		}
예제 #5
0
		public void TestKeyPress_GridButNoColumns ()
		{
			TextBoxPoker tb = new TextBoxPoker ();
			DataGrid dg = new DataGrid ();
			tb.SetDataGrid (dg);
			tb.DoOnKeyPress (new KeyPressEventArgs ('a'));
		}
예제 #6
0
        public void TestKeyPress_NoGrid()
        {
            TextBoxPoker tb = new TextBoxPoker();

            tb.DoOnKeyPress(new KeyPressEventArgs('a'));
        }