Dispose() public method

public Dispose ( ) : void
return void
示例#1
0
        public void Dispose()
        {
            // Remove the on mouse over event
            mAntennaFragment.onMouseOverListEntry -= showTargetInfo;

            GameEvents.onPlanetariumTargetChanged.Remove(OnChangeTarget);
            GameEvents.onHideUI.Remove(OnHideUI);
            GameEvents.onShowUI.Remove(OnShowUI);
            MapView.OnEnterMapView -= OnEnterMapView;
            MapView.OnExitMapView  -= OnExitMapView;
            mSatelliteFragment.Dispose();
            mAntennaFragment.Dispose();
        }
示例#2
0
        public override void Hide()
        {
            // also hide the target info popup
            hideTargetInfo();

            if (mAntennaFragment != null)
            {
                /// Remove callbacks from the onPositionChanged on the AbstractWindow
                onPositionChanged -= mTargetInfos.CalculatePosition;

                /// Remove the showTargetInfo callback from the on mouse over/out event
                mAntennaFragment.onMouseOverListEntry -= showTargetInfo;
                mAntennaFragment.onMouseOutListEntry  -= hideTargetInfo;

                mAntennaFragment.Dispose(); mAntennaFragment = null;
            }

            GameEvents.onVesselChange.Remove(OnVesselChange);
            base.Hide();
        }