public void InvalidateEventsOrder() { Rectangle rect = new Rectangle(new Point(0, 0), new Size(2, 2)); Form myform = new Form(); myform.ShowInTaskbar = false; myform.Visible = true; MyLabelInvalidate l = new MyLabelInvalidate(); myform.Controls.Add(l); l.TextAlign = ContentAlignment.TopRight; string [] EventsWanted = { "OnHandleCreated", "OnBindingContextChanged", "OnBindingContextChanged", "OnInvalidated,{X=0,Y=0,Width=" + l.Size.Width + ",Height=" + l.Size.Height + "}", "OnInvalidated," + rect.ToString() }; l.Invalidate(rect); Assert.AreEqual(EventsWanted, ArrayListToString(l.Results)); myform.Dispose(); }
public void InvalidateEventsOrder () { Rectangle rect = new Rectangle (new Point (0,0), new Size (2, 2)); Form myform = new Form (); myform.ShowInTaskbar = false; myform.Visible = true; MyLabelInvalidate l = new MyLabelInvalidate (); myform.Controls.Add (l); l.TextAlign = ContentAlignment.TopRight; string [] EventsWanted = { "OnHandleCreated", "OnBindingContextChanged", "OnBindingContextChanged", "OnInvalidated,{X=0,Y=0,Width="+l.Size.Width+",Height="+l.Size.Height+"}", "OnInvalidated," + rect.ToString () }; l.Invalidate (rect); Assert.AreEqual (EventsWanted, ArrayListToString (l.Results)); myform.Dispose(); }