public void Dismiss() { if (_firstButton != null) { _firstButton.Unrealize(); _firstButton = null; _popUp.SetPartContent("button1", null); } if (_secondButton != null) { _secondButton.Unrealize(); _secondButton = null; _popUp.SetPartContent("button2", null); } if (_nativeContent != null) { _nativeContent.Unrealize(); _nativeContent = null; } if (_popUp != null) { _layout.Unrealize(); _layout = null; _popUp.Unrealize(); _popUp = null; } }
/// <summary> /// ToastRenderer class constructor. /// Creates an instance of EPopup class. /// Executes UpdateText and UpdateDuration methods. /// </summary> public ToastRenderer() { _control = new EPopup(Forms.NativeParent) { Style = DefaultStyle, AllowEvents = true, }; UpdateText(); UpdateDuration(); }
public DialogImplementation() { _control = new EPopup(TForms.NativeParent); _control.ShowAnimationFinished += ShowAnimationFinishedHandler; _control.Dismissed += DismissedHandler; _control.OutsideClicked += OutsideClickedHandler; _control.BackButtonPressed += BackButtonPressedHandler; _contentView = new StackLayout(); }
public ToastImplementation() { _control = new EPopup(TForms.Context.MainWindow) { Style = DefaultStyle, AllowEvents = true, }; UpdateText(); UpdateDuration(); }
public InformationPopupImplementation() { _popUp = new ElmSharp.Popup(TForms.NativeParent); _popUp.Style = "circle"; _layout = new ElmSharp.Layout(_popUp); _layout.SetTheme("layout", "popup", "content/circle"); _popUp.SetContent(_layout); _popUp.BackButtonPressed += BackButtonPressedHandler; }
public TwoButtonPopupImplementation() { _popUp = new ElmSharp.Popup(XForms.NativeParent); _popUp.Style = "circle"; _layout = new ElmSharp.Layout(_popUp); _layout.SetTheme("layout", "popup", "content/circle/buttons2"); _popUp.SetContent(_layout); _popUp.BackButtonPressed += BackButtonPressedHandler; _popUp.Dismissed += OnDismissed; _contentView = new StackLayout(); }
public ToastImplementation() { _control = new ElmSharp.Popup(TForms.NativeParent) { Style = DefaultStyle, AllowEvents = true, }; _control.BackButtonPressed += (s, e) => _control.Dismiss(); _control.TimedOut += (s, e) => _control.Dismiss(); _control.OutsideClicked += (s, e) => _control.Dismiss(); UpdateIcon(); UpdateText(); UpdateDuration(); }
protected virtual void Dispose(bool disposing) { if (_isDisposed) { return; } if (disposing) { if (_nativePositive != null) { _nativePositive.Unrealize(); _nativePositive = null; } if (_nativeNeutral != null) { _nativeNeutral.Unrealize(); _nativeNeutral = null; } if (_nativeNegative != null) { _nativeNegative.Unrealize(); _nativeNegative = null; } if (_nativeContent != null) { _nativeContent.Unrealize(); _nativeContent = null; } if (_control != null) { _control.ShowAnimationFinished -= ShowAnimationFinishedHandler; _control.Dismissed -= DismissedHandler; _control.OutsideClicked -= OutsideClickedHandler; _control.BackButtonPressed -= BackButtonPressedHandler; _control.Unrealize(); _control = null; } } _isDisposed = true; }
protected virtual void Dispose(bool disposing) { if (_isDisposed) { return; } if (disposing) { if (_bottomButton != null) { _bottomButton.Unrealize(); _bottomButton = null; } if (_box != null) { _box.Unrealize(); _box = null; } if (_progress != null) { _progress.Unrealize(); _progress = null; } if (_progressLabel != null) { _progressLabel.Unrealize(); _progressLabel = null; } if (_popUp != null) { _layout.Unrealize(); _layout = null; _popUp.BackButtonPressed -= BackButtonPressedHandler; _popUp.Unrealize(); _popUp = null; } } _isDisposed = true; }
/// <summary> /// Disposes the toast. /// </summary> /// <param name="isDisposing">Flag indicating if the toast is already in progress of disposing.</param> protected virtual void Dispose(bool isDisposing) { if (_isDisposed) { return; } if (isDisposing) { if (_control != null) { _control.Unrealize(); _control = null; } } _isDisposed = true; }
protected virtual void Dispose(bool disposing) { if (_isDisposed) { return; } if (disposing) { if (_firstButton != null) { _firstButton.Unrealize(); _firstButton = null; } if (_secondButton != null) { _secondButton.Unrealize(); _secondButton = null; } if (_nativeContent != null) { _nativeContent.Unrealize(); _nativeContent = null; } if (_popUp != null) { _layout.Unrealize(); _layout = null; _popUp.Unrealize(); _popUp = null; } } _isDisposed = true; }
public void Dismiss() { _popUp.Hide(); if (_bottomButton != null) { _bottomButton.Unrealize(); _bottomButton = null; _popUp.SetPartContent("button1", null); } if (_box != null) { _box.Unrealize(); _box = null; } if (_progress != null) { _progress.Unrealize(); _progress = null; } if (_progressLabel != null) { _progressLabel.Unrealize(); _progressLabel = null; } if (_popUp != null) { _layout.Unrealize(); _layout = null; _popUp.BackButtonPressed -= BackButtonPressedHandler; _popUp.Unrealize(); _popUp = null; } }