Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
Beispiel #1
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                containerValidator.Dispose();
                buttonOK.Dispose();
                buttonCancel.Dispose();
                tabControl.Dispose();
            }

            base.Dispose(disposing);
        }
Beispiel #2
0
 protected override void OnMouseUp( MouseEventArgs e )
 {
     base.OnMouseUp( e );
     if ( tppp == null )
         return;
     int iii = mouseon;
     if ( iii == TabPages.IndexOf( tppp ) || iii == -1 ) {
         sTabIndex.Add( TabPages.IndexOf( tppp ) );
         sTabThere.Add( mouse.X - xadd );
         sTabDuration.Add( 25 );
         sTabTo.Add( GetTabRect( TabPages.IndexOf( tppp ) ).Left );
         tppp = null;
         return;
     }
     tppp.AccessibleName = "Dragging";
     TabControl tc = new TabControl( );
     SelectedIndex = 0;
     tc.TabPages.Add( tppp );
     TabPages.Insert( iii, tppp );
     tc.Dispose( );
     SelectedIndex = iii;
     tppp.AccessibleName = "";
     tppp = null;
 }
Beispiel #3
0
		[Test] // bug #81802. should not throw an exception
		public void NoTabPages2 ()
		{
			Form form = new Form ();
			form.Font = new Font ("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte) (0)));
			TabControl tab = new TabControl ();
			form.Controls.Add (tab);
			tab.Dispose ();
			form.Dispose ();
		}