src/FingersDance.Control.Close/UserControlClose.xaml.cs
author PAMPHILE Jonathan <pamphile@efrei.fr>
Tue, 13 Oct 2009 19:33:13 +0200
changeset 143 9f157d9c725b
parent 103 6eb5b39f8e97
child 140 fc7c12f9da30
permissions -rw-r--r--
MVVM

using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;

namespace FingersDance.Control.Close
{
	public partial class 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());
            }
        }
	}
}