protected override void Dispose(bool disposing) { if (disposing) { _popup?.Dispose(); _popup = null; _textView?.Dispose(); _textView = null; } base.Dispose(disposing); }
/// <summary> /// Releases the unmanaged resources used by the <see cref="Control"></see> and its child controls and optionally releases the managed resources. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (disposing) { if (!_disposed) { _disposed = true; if (_caret != null) { _caret.PositionChanged -= SearchMatchingBracket; _caret.Dispose(); } Document.TextContentChanged -= TextContentChanged; Document.FoldingManager.FoldingChanged -= DocumentFoldingsChanged; _motherTextAreaControl = null; _motherTextEditorControl = null; foreach (AbstractMargin margin in _leftMargins) { if (margin is IDisposable) { (margin as IDisposable).Dispose(); } } _textView.Dispose(); } } base.Dispose(disposing); }
public override void OnDestroyView() { base.OnDestroyView(); battery.Dispose(); Application.Context.UnregisterReceiver(batteryReceiver); BatteryReceiver.BatteryInfoChanged -= BatteryReceiver_BatteryInfoChanged; }
private void CreateDialog() { if (_Dialog != null) { return; } _Dialog = new TimePickerDialog(AndroidContext, TimeSelected, _TimePickerCell.Time.Hours, _TimePickerCell.Time.Minutes, DateFormat.Is24HourFormat(AndroidContext) ); var title = new TextView(AndroidContext) { Gravity = Android.Views.GravityFlags.Center, Text = string.IsNullOrEmpty(_PopupTitle) ? "Select Time" : _PopupTitle, }; title.SetBackgroundColor(_TimePickerCell.Prompt.BackgroundColor.ToAndroid()); title.SetTextColor(_TimePickerCell.Prompt.TitleColor.ToAndroid()); title.SetPadding(10, 10, 10, 10); _Dialog.SetCustomTitle(title); _Dialog.SetCanceledOnTouchOutside(true); _Dialog.DismissEvent += (sender, e) => { title.Dispose(); _Dialog.Dispose(); _Dialog = null; }; _Dialog.Show(); }
void ReleaseDesignerOutlets() { if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (LogoutButton != null) { LogoutButton.Dispose(); LogoutButton = null; } if (TextView != null) { TextView.Dispose(); TextView = null; } if (UserInfoButton != null) { UserInfoButton.Dispose(); UserInfoButton = null; } }
protected override void OnDestroy() { base.OnDestroy(); _cloudService.Disconnect(); _joystickInputDriver?.Dispose(); _joystickInputDriver = null; foreach (var pair in _paints) { pair.Value.Dispose(); } _paints.Clear(); _handler.RemoveCallbacks(_advanceAction); _handler.Dispose(); _handler = null; _handlerThread.Looper.Quit(); _handlerThread.Dispose(); _handlerThread = null; _advanceAction = null; _snakeView.Dispose(); _snakeView = null; _scoreView.Dispose(); _scoreView = null; }
public static SizeF MeasureString(string Text, string FontString, int Width, float ps = 1) { SizeF Result; TextView view = new TextView(global::Android.App.Application.Context); view.SetWidth(Width); string[] Font = FontString.Split(','); float fontSize = float.Parse(Font[1].Replace("pt", "").Trim()); fontSize *= ps; view.SetTextSize(Android.Util.ComplexUnitType.Sp, fontSize); view.Text = Text; int widthMeasureSpec = Android.Views.View.MeasureSpec.MakeMeasureSpec( Width, MeasureSpecMode.AtMost); int heightMeasureSpec = Android.Views.View.MeasureSpec.MakeMeasureSpec( 0, MeasureSpecMode.Unspecified); view.Measure(widthMeasureSpec, heightMeasureSpec); Result = new SizeF(view.MeasuredWidth, view.MeasuredHeight); view.Dispose(); return(Result); }
void CreateDialog() { if (_dialog == null) { bool is24HourFormat = DateFormat.Is24HourFormat(_context); _dialog = new TimePickerDialog(_context, TimeSelected, _TimePickerCell.Time.Hours, _TimePickerCell.Time.Minutes, is24HourFormat); var title = new TextView(_context); if (!string.IsNullOrEmpty(_title)) { title.Gravity = Android.Views.GravityFlags.Center; title.SetPadding(10, 10, 10, 10); title.Text = _title; _dialog.SetCustomTitle(title); } _dialog.SetCanceledOnTouchOutside(true); _dialog.DismissEvent += (ss, ee) => { title.Dispose(); _dialog.Dispose(); _dialog = null; }; _dialog.Show(); } }
private void DisposeItems() { _content?.Dispose(); _content = null; _close?.Dispose(); _close = null; _resultsView?.Dispose(); _resultsView = null; _resultsTxv?.Dispose(); _resultsTxv = null; _orderId?.Dispose(); _orderId = null; _checkBtn?.Dispose(); _checkBtn = null; _presenter = null; _servicePoints = null; _spRecyclerView?.Dispose(); _spRecyclerView = null; _mapFragment?.Dispose(); _mapFragment = null; _viewIcon?.SetImageDrawable(null); _viewIcon.Dispose(); _animationView?.Dispose(); _receiver?.Dispose(); _receiver = null; _connection?.Dispose(); _connection = null; }
public override void Dispose() { _messageLabel?.Dispose(); _messageLabel = null; base.Dispose(); }
void ReleaseDesignerOutlets() { if (AcceptButton != null) { AcceptButton.Dispose(); AcceptButton = null; } if (CloseButton != null) { CloseButton.Dispose(); CloseButton = null; } if (TextView != null) { TextView.Dispose(); TextView = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (!disposed) { disposed = true; if (caret != null) { caret.PositionChanged -= new EventHandler(SearchMatchingBracket); caret.Dispose(); } if (selectionManager != null) { selectionManager.Dispose(); } Document.TextContentChanged -= new EventHandler(TextContentChanged); Document.FoldingManager.FoldingsChanged -= new EventHandler(DocumentFoldingsChanged); motherTextAreaControl = null; motherTextEditorControl = null; foreach (AbstractMargin margin in leftMargins) { if (margin is IDisposable) { (margin as IDisposable).Dispose(); } } textView.Dispose(); } } }
protected override void OnDestroy() { enableNotificationAccess.Click -= EnableNotificationAccess_Click; enableDeviceAdmin.Click -= EnableDeviceAdmin_Click; enableNotificationAccess.Dispose(); enableDeviceAdmin.Dispose(); base.OnDestroy(); }
public void Close() { if (codeView != null) { codeView.Dispose(); } codeView = null; }
protected override void OnDestroy() { enableNotificationAccess.Click -= EnableNotificationAccess_Click; enableDeviceAdmin.Click -= EnableDeviceAdmin_Click; WallpaperPublisher.NewWallpaperIssued -= WallpaperPublisher_NewWallpaperIssued; enableNotificationAccess.Dispose(); enableDeviceAdmin.Dispose(); base.OnDestroy(); }
protected override void Dispose(bool disposing) { if (disposing) { _valueLabel?.Dispose(); _valueLabel = null; } base.Dispose(disposing); }
public void Dispose() { windowManager?.Dispose(); layoutParams?.Dispose(); floatingView?.Dispose(); bloodSugarEvolution?.Dispose(); unit?.Dispose(); bloodSugarLevel?.Dispose(); }
public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } if (culturetxt != null) { culturetxt.Dispose(); culturetxt = null; } if (cultureSpinner != null) { cultureSpinner.Dispose(); cultureSpinner = null; } if (layoutParams1 != null) { layoutParams1.Dispose(); layoutParams1 = null; } if (separate != null) { separate.Dispose(); separate = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (localinfo != null) { localinfo.Dispose(); localinfo = null; } }
protected override void OnDestroy() { base.OnDestroy(); button.Dispose(); button = null; texto.Dispose(); texto = null; texto.Dispose(); GC.Collect(); }
protected override void Dispose(bool disposing) { if (disposing) { sw.Dispose(); sw = null; tv.Dispose(); tv = null; } }
protected override void Dispose(bool disposing) { if (disposing) { _caption.Dispose(); _caption = null; _text.Dispose(); _text = null; } }
protected override void Dispose(bool disposing) { if (disposing) { TextView?.Dispose(); TextView = null; Border?.Dispose(); Border = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { _titleLabel.Dispose(); _titleLabel = null; Cell = null; CustomCell.PropertyChanged -= CellPropertyChanged; } base.Dispose(disposing); }
protected override void OnDestroyed() { Host.Terminal = null; SSH.Dispose(); if (DebuggerThread != null && DebuggerThread.IsAlive) { DebuggerThread.Abort(); } textview1.Dispose(); base.OnDestroyed(); }
/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { _textLabel?.Dispose(); _textLabel = null; _checkBox?.Dispose(); _checkBox = null; } base.Dispose(disposing); }
public void Dispose() { if (FatherToolbar != null) { if (initTextView != null) { FatherToolbar.RemoveView(initTextView); FatherToolbar = null; initTextView.Dispose(); initTextView = null; } } }
/// <summary> /// Get the raw text in a cell. /// </summary> /// <param name="cell">The cell.</param> private string GetCellRawText(TableCell cell) { TextView tmpView = new TextView(); CreateStyles(tmpView); TextIter iter = tmpView.Buffer.StartIter; ProcessMarkdownBlocks(cell, ref iter, tmpView, 0, false); string result = tmpView.Buffer.Text; tmpView.Dispose(); return(result); }
private void UnbindViews() { tvTitle.Dispose(); tvAlbum.Dispose(); tvArtist.Dispose(); btnSkipPrevious.Dispose(); btnPlayPause.Dispose(); btnSkipNext.Dispose(); skbSeekSongTime.Dispose(); maincontainer.Dispose(); }
public void Dispose() { if (calendar != null) { calendar.Dispose(); calendar = null; } if (dataAdapter != null) { dataAdapter.Dispose(); dataAdapter = null; } if (modeSpinner != null) { modeSpinner.Dispose(); modeSpinner = null; } if (mainView != null) { mainView.Dispose(); mainView = null; } if (separatorLayoutParams != null) { separatorLayoutParams.Dispose(); separatorLayoutParams = null; } if (separate != null) { separate.Dispose(); separate = null; } if (propertylayout != null) { propertylayout.Dispose(); propertylayout = null; } if (viewModetxt != null) { viewModetxt.Dispose(); viewModetxt = null; } }
protected override void OnDestroy() { using (var button = FindViewById <Button>(Resource.Id.AddPage)) { button.Click -= click; } using (var button = FindViewById <Button>(Resource.Id.RemovePage)) { button.Click -= click; } using (var button = FindViewById <Button>(Resource.Id.ClearPage)) { button.Click -= click; } pageLayout.FirstVisiblePageFloatChanged -= currentFirstVisiblePageFloatChanged; pageLayout.Dispose(); pageCount.Dispose(); base.OnDestroy(); }