Esempio n. 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposeTypeface)
     {
         Typeface?.Dispose();
     }
 }
 public void Dispose()
 {
     if (Typeface != null)
     {
         Typeface.Dispose();
         Typeface = null;
     }
 }
Esempio n. 3
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (nativeTypeface != null)
         {
             nativeTypeface.Dispose();
         }
     }
 }
Esempio n. 4
0
 public void Dispose()
 {
     Typeface?.Dispose();
     Typeface = null;
 }
        protected override void OnDestroy()
        {
            base.OnDestroy();


            //Анимация и вибрация нажатия на кнопки
            if (_fadeAnimation != null)
            {
                _fadeAnimation.Dispose();
            }
            if (_vibe != null)
            {
                _vibe.Dispose();
            }

            //Диалоговые окна оповещения
            if (_messageDialogBuilder != null)
            {
                _messageDialogBuilder.Dispose();
            }
            if (_messageDialog != null)
            {
                _messageDialog.Dispose();
            }
            if (_baseLayoutInflater != null)
            {
                _baseLayoutInflater.Dispose();
            }

            //Объекты создания прогрессДиалога
            if (_progressDialog != null)
            {
                _progressDialog.Dispose();
            }
            if (_progressDialogRelativeLayout != null)
            {
                _progressDialogRelativeLayout.Dispose();
            }
            if (_progressDialogView != null)
            {
                _progressDialogView.Dispose();
            }
            if (_progressDialogMessage != null)
            {
                _progressDialogMessage.Dispose();
            }

            //Сторонний шрифт
            if (_robotoLightFont != null)
            {
                _robotoLightFont.Dispose();
            }

            //Второстепенный поток
            if (_asyncInitThread.ThreadState == ThreadState.Running)
            {
                _asyncInitThread.Abort();
            }

            //Объекты листа Бейджа
            if (_badgeSheetBadgeImageView != null)
            {
                _badgeSheetBadgeImageView.Dispose();
            }
            if (_badgeSheetCloseImageButton != null)
            {
                _badgeSheetCloseImageButton.Dispose();
            }
            if (_badgeSheetCloseFakeImageButton != null)
            {
                _badgeSheetCloseFakeImageButton.Dispose();
            }
            if (_badgeSheetUserNameTextView != null)
            {
                _badgeSheetUserNameTextView.Dispose();
            }
            if (_badgeSheetDescrTextView != null)
            {
                _badgeSheetDescrTextView.Dispose();
            }
            if (_badgeSheetAnounceTextView != null)
            {
                _badgeSheetAnounceTextView.Dispose();
            }
            if (_badgeSheetBonusListLinearLayout != null)
            {
                _badgeSheetBonusListLinearLayout.Dispose();
            }
            if (_badgeSheetBonusView != null)
            {
                _badgeSheetBonusView.Dispose();
            }
            if (_badgeSheetBonusLineImageView != null)
            {
                _badgeSheetBonusLineImageView.Dispose();
            }
            if (_badgeSheetDiscountLineImageView != null)
            {
                _badgeSheetDiscountLineImageView.Dispose();
            }
            if (_badgeSheetPresentLineImageView != null)
            {
                _badgeSheetPresentLineImageView.Dispose();
            }
            if (_badgeSheetBonusDescrBackgroundImageView != null)
            {
                _badgeSheetBonusDescrBackgroundImageView.Dispose();
            }
            if (_badgeSheetDiscountDescrBackgroundImageView != null)
            {
                _badgeSheetDiscountDescrBackgroundImageView.Dispose();
            }
            if (_badgeSheetPresentDescrBackgroundImageView != null)
            {
                _badgeSheetPresentDescrBackgroundImageView.Dispose();
            }
            if (_badgeSheetBonusNameTextView != null)
            {
                _badgeSheetBonusNameTextView.Dispose();
            }
            if (_badgeSheetBonusDescrTextView != null)
            {
                _badgeSheetBonusDescrTextView.Dispose();
            }
        }