Esempio n. 1
0
        public void KeyDownTest()
        {
            Form myform = new Form();

            myform.ShowInTaskbar = false;
            myform.Visible       = true;
            MyLabel l = new MyLabel();

            l.Visible = true;
            myform.Controls.Add(l);
            l.KeyDown += new KeyEventHandler(Label_KeyDownEventHandler);
            l.KeyPressA();

            Assert.AreEqual(true, eventhandled, "K1");
            eventhandled = false;
            myform.Dispose();
        }
Esempio n. 2
0
        public void KeyPressEventsOrder()
        {
            string[] EventsWanted =
            {
                "OnHandleCreated",
                "OnBindingContextChanged",
                "OnBindingContextChanged",
                "OnKeyDown,A",
                "OnKeyPress,a",
                "OnKeyUp,A"
            };
            Form myform = new Form();

            myform.ShowInTaskbar = false;
            myform.Visible       = true;
            MyLabel l = new MyLabel();

            myform.Controls.Add(l);
            l.KeyPressA();

            Assert.AreEqual(EventsWanted, ArrayListToString(l.Results));
            myform.Dispose();
        }
Esempio n. 3
0
	   public void KeyPressEventsOrder ()
	     {
		     string[] EventsWanted = {
			     "OnHandleCreated",
			       "OnBindingContextChanged",
			       "OnBindingContextChanged",
			       "OnKeyDown,A",
			       "OnKeyPress,a",
			       "OnKeyUp,A"
		     };
		     Form myform = new Form ();
		     myform.ShowInTaskbar = false;
		     myform.Visible = true;
		     MyLabel l = new MyLabel ();
		     myform.Controls.Add (l);
		     l.KeyPressA ();

		     Assert.AreEqual (EventsWanted, ArrayListToString (l.Results));
		     myform.Dispose();
	     }
Esempio n. 4
0
	   public void KeyDownTest ()
	     {
		     Form myform = new Form ();
		     myform.ShowInTaskbar = false;
		     myform.Visible = true;
		     MyLabel l = new MyLabel ();
		     l.Visible = true;
		     myform.Controls.Add (l);
		     l.KeyDown += new KeyEventHandler (Label_KeyDownEventHandler);
		     l.KeyPressA ();

		     Assert.AreEqual (true, eventhandled, "K1");
		     eventhandled = false;
		     myform.Dispose();
	     }