Ejemplo n.º 1
0
//		[Test]
        public void Validation()
        {
            Queue events = new Queue();

            FormCustom             form       = new FormCustom("form1", true, events);
            ContainerControlCustom container1 = new ContainerControlCustom("container1", true, events);
            ContainerControlCustom container2 = new ContainerControlCustom("container2", true, events);
            ContainerControlCustom container3 = new ContainerControlCustom("container3", true, events);
            UserControlCustom      userctl1   = new UserControlCustom("userctl1", true, events);
            UserControlCustom      userctl2   = new UserControlCustom("userctl2", true, events);
            UserControlCustom      userctl3   = new UserControlCustom("userctl3", true, events);

            container2.Controls.Add(userctl2);
            container2.Controls.Add(userctl3);
            container1.Controls.Add(userctl1);
            form.Controls.Add(container1);
            form.Controls.Add(container2);
            form.Controls.Add(container3);

            form.Show();

            object s;

            events.Enqueue("START");
            container3.Select();
            events.Enqueue("END");
            events.Enqueue("START");
            container1.Select();
            events.Enqueue("END");
            events.Enqueue("START");
            container2.Select();
            events.Enqueue("END");
            events.Enqueue("START");
            userctl1.Select();
            events.Enqueue("END");
            events.Enqueue("START");
            userctl2.Select();
            events.Enqueue("END");
            events.Enqueue("START");
            userctl2.Select();
            events.Enqueue("END");


            while (events.Count > 0)
            {
                s = events.Dequeue();
                Console.WriteLine(s.ToString());
            }

            events.Clear();

            form.Close();
            userctl1.Dispose();
            userctl2.Dispose();
            userctl3.Dispose();
            container1.Dispose();
            container1.Dispose();
            form.Dispose();
        }
Ejemplo n.º 2
0
//		[Test]
		public void Validation() {
			Queue events = new Queue();

			FormCustom form = new FormCustom("form1", true, events);
			ContainerControlCustom container1 = new ContainerControlCustom("container1", true, events);
			ContainerControlCustom container2 = new ContainerControlCustom("container2", true, events);
			ContainerControlCustom container3 = new ContainerControlCustom("container3", true, events);
			UserControlCustom userctl1 = new UserControlCustom("userctl1", true, events);
			UserControlCustom userctl2 = new UserControlCustom("userctl2", true, events);
			UserControlCustom userctl3 = new UserControlCustom("userctl3", true, events);

			container2.Controls.Add(userctl2);
			container2.Controls.Add(userctl3);
			container1.Controls.Add(userctl1);
			form.Controls.Add(container1);
			form.Controls.Add(container2);
			form.Controls.Add(container3);

			form.Show();

			object s;

			events.Enqueue("START");
			container3.Select();
			events.Enqueue("END");
			events.Enqueue("START");
			container1.Select();
			events.Enqueue("END");
			events.Enqueue("START");
			container2.Select();
			events.Enqueue("END");
			events.Enqueue("START");
			userctl1.Select();
			events.Enqueue("END");
			events.Enqueue("START");
			userctl2.Select();
			events.Enqueue("END");
			events.Enqueue("START");
			userctl2.Select();
			events.Enqueue("END");


			while (events.Count > 0) {
				s = events.Dequeue();
				Console.WriteLine(s.ToString());
			}

			events.Clear();

			form.Close();
			userctl1.Dispose();
			userctl2.Dispose();
			userctl3.Dispose();
			container1.Dispose();
			container1.Dispose();
			form.Dispose();

		}