public void BorderStyleEventTest()
        {
            TextBox     tb          = new TextBox();
            EventLogger eventLogger = new EventLogger(tb);

            tb.BorderStyle = BorderStyle.None;
            Assert.IsTrue(eventLogger.EventRaised("BorderStyleChanged"));
        }
        public void ModifiedEventTest()
        {
            TextBox     tb          = new TextBox();
            EventLogger eventLogger = new EventLogger(tb);

            tb.Modified = true;
            Assert.AreEqual(1, eventLogger.EventsRaised);
            Assert.IsTrue(eventLogger.EventRaised("ModifiedChanged"));
        }
Exemplo n.º 3
0
		public void BorderStyleEventTest ()
		{
			TextBox tb = new TextBox ();
			EventLogger eventLogger = new EventLogger (tb);
			tb.BorderStyle = BorderStyle.None;
			Assert.IsTrue (eventLogger.EventRaised ("BorderStyleChanged"));
		}
Exemplo n.º 4
0
		public void ModifiedEventTest ()
		{
			TextBox tb = new TextBox ();
			EventLogger eventLogger = new EventLogger (tb);
			tb.Modified = true;
			Assert.AreEqual (1, eventLogger.EventsRaised);
			Assert.IsTrue (eventLogger.EventRaised ("ModifiedChanged"));
		}
Exemplo n.º 5
0
		[Test] // bug #339641
		public void ChildFocused ()
		{
//			if (TestHelper.RunningOnUnix) {
//				Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
//			}
			using (Form f = new TimeBombedForm ()) {
				TreeView tv = new TreeView ();
				EventLogger log = new EventLogger (tv);
				tv.GotFocus += new EventHandler (tv_GotFocus);
				f.Activated += new EventHandler (f_Activated);
				f.Controls.Add (tv);
				f.Show ();
				Assert.IsTrue (log.EventRaised ("GotFocus"), "#01");
			}
		}
Exemplo n.º 6
0
		public void FormParentedTest ()
		{
			using (Form frm = new Form ()) {
				using (Form frm2 = new Form ()) {
					frm2.TopLevel = false;
					frm.ShowInTaskbar = false;
					frm2.ShowInTaskbar = false;
					frm2.Visible = true;
					frm.Visible = true;
					
					EventLogger log = new EventLogger (frm);
					EventLogger log2 = new EventLogger (frm2);
					
					frm.Controls.Add (frm2);

					Assert.IsTrue (log2.EventRaised ("ParentChanged"), "#C1");
					Assert.IsTrue (log.EventRaised ("ControlAdded"), "#P1");
					Assert.AreSame (frm, frm2.Parent, "#02");
				}
			}
		}