[longomatch/newui: 68/157] Add a ValueChanged signal for the DatePicker widget.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/newui: 68/157] Add a ValueChanged signal for the DatePicker widget.
- Date: Mon, 1 Sep 2014 09:47:04 +0000 (UTC)
commit 1b69f78c8e0a5f207cf27a3e87f2e994faa24f40
Author: Julien Moutte <julien fluendo com>
Date: Fri Aug 22 17:07:10 2014 +0200
Add a ValueChanged signal for the DatePicker widget.
LongoMatch.GUI/Gui/Component/DatePicker.cs | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/DatePicker.cs b/LongoMatch.GUI/Gui/Component/DatePicker.cs
index f9d7183..99d5406 100644
--- a/LongoMatch.GUI/Gui/Component/DatePicker.cs
+++ b/LongoMatch.GUI/Gui/Component/DatePicker.cs
@@ -22,11 +22,15 @@ namespace LongoMatch.Gui.Component
[System.ComponentModel.ToolboxItem(true)]
public partial class DatePicker : Gtk.Bin
{
+ public event EventHandler ValueChanged;
+
DateTime date;
+
public DatePicker ()
{
this.Build ();
datebutton.Clicked += HandleClicked;
+ dateentry.Changed += HandleChanged;
Date = DateTime.Now;
}
@@ -40,6 +44,14 @@ namespace LongoMatch.Gui.Component
}
}
+ void HandleChanged (object sender, EventArgs e)
+ {
+ // Proxy event to potential listeners
+ if (this.ValueChanged != null) {
+ this.ValueChanged (this, EventArgs.Empty);
+ }
+ }
+
void HandleClicked (object sender, EventArgs e)
{
Date = Config.GUIToolkit.SelectDate (Date, this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]