mono-examples: Use Del() to dispose of widgets

This commit is contained in:
Xavi Artigas 2019-09-09 22:10:43 +02:00
parent 40801d9285
commit 5a4c817d16
3 changed files with 3 additions and 5 deletions

View File

@ -143,8 +143,7 @@ public class LifeBoard
{
if (lifeTimer != null)
{
lifeTimer.SetParent(null);
lifeTimer.Dispose();
lifeTimer.Del();
lifeTimer = null;
}
else

View File

@ -66,7 +66,7 @@ public class TextEditor : Efl.Csharp.Application
popup.ButtonClickedEvent +=
(object sender, Efl.Ui.AlertPopupButtonClickedEventArgs ea) => {
// Dismiss popup when the button is clicked
((Efl.Ui.AlertPopup)sender).SetParent(null);
((Efl.Ui.AlertPopup)sender).Del();
};
}

View File

@ -24,8 +24,7 @@ public class Example
popup.SetButton(Efl.Ui.Popup_Alert_Button.Positive, "Ok");
popup.SetSize(new Eina.Size2D(150, 30));
popup.ButtonClickedEvent += (object sender, Efl.Ui.Popup_Alert.ButtonClickedEventArgs e) => {
popup.SetParent(null);
popup.Invalidate();
popup.Del()
};
}