Axiom.Samples.Widget.Cleanup C# (CSharp) Метод

Cleanup() публичный Метод

public Cleanup ( ) : void
Результат void
		public void Cleanup()
		{
			if ( this.element != null )
				NukeOverlayElement( this.element );
			this.element = null;
		}

Usage Example

Пример #1
0
		/// <summary>
		/// Destroys a widget.
		/// </summary>
		/// <param name="widget"></param>
		public void DestroyWidget( Widget widget )
		{
			if ( widget == null )
			{
				new AxiomException( "Widget does not exist,TrayManager.DestroyWidget" );
			}

			// in case special widgets are destroyed manually, set them to 0
			if ( widget == this.Logo )
			{
				this.Logo = null;
			}
			else if ( widget == this.StatsPanel )
			{
				this.StatsPanel = null;
			}
			else if ( widget == this.mFpsLabel )
			{
				this.mFpsLabel = null;
			}

			this.mTrays[ (int)widget.TrayLocation ].RemoveChild( widget.Name );

			WidgetList wList = this.mWidgets[ (int)widget.TrayLocation ];
			wList.Remove( widget );
			if ( widget == ExpandedMenu )
			{
				ExpandedMenu = null;
			}

			widget.Cleanup();

			this.mWidgetDeathRow.Add( widget );

			AdjustTrays();
		}