--- a/src/FingersDance.Control.Close/UserControlClose.xaml.cs Mon Oct 05 18:23:10 2009 +0200
+++ b/src/FingersDance.Control.Close/UserControlClose.xaml.cs Mon Oct 05 18:29:32 2009 +0200
@@ -12,11 +12,52 @@
{
public partial class UserControlClose
{
- public UserControlClose()
+ public event EventHandler EH_SurfaceButtonClose_ContactDown;
+ public bool close;
+ public int Id = 0;
+
+ public UserControlClose(int closeid)
{
+ Id = closeid;
this.InitializeComponent();
// Insert code required on object creation below this point.
}
+
+ private void SurfaceButtonOK_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (EH_SurfaceButtonClose_ContactDown != null)
+ {
+ close = true;
+ EH_SurfaceButtonClose_ContactDown(this, new EventArgs());
+ }
+ }
+
+ private void SurfaceButtonNO_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (EH_SurfaceButtonClose_ContactDown != null)
+ {
+ close = false;
+ EH_SurfaceButtonClose_ContactDown(this, new EventArgs());
+ }
+ }
+
+ private void SurfaceButtonNO_Click(object sender, RoutedEventArgs e)
+ {
+ if (EH_SurfaceButtonClose_ContactDown != null)
+ {
+ close = false;
+ EH_SurfaceButtonClose_ContactDown(this, new EventArgs());
+ }
+ }
+
+ private void SurfaceButtonOK_Click(object sender, RoutedEventArgs e)
+ {
+ if (EH_SurfaceButtonClose_ContactDown != null)
+ {
+ close = true;
+ EH_SurfaceButtonClose_ContactDown(this, new EventArgs());
+ }
+ }
}
}
\ No newline at end of file