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());
            }
        }
	}
}