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.Pivot
{
	public partial class UserControlPivot
	{
        //Events pour chaque Boutton du Pivot
        public event EventHandler EH_SurfaceButtonPlayer1_ContactDown;
        public event EventHandler EH_SurfaceButtonPlayer2_ContactDown;
        public event EventHandler EH_SurfaceButtonPlayer3_ContactDown;
        public event EventHandler EH_SurfaceButtonPlayer4_ContactDown;

		public UserControlPivot()
		{
			this.InitializeComponent();
            
			// Insert code required on object creation below this point.
		}

        private void SurfaceButtonPlayer1_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
        {
            if(EH_SurfaceButtonPlayer1_ContactDown!=null)
                EH_SurfaceButtonPlayer1_ContactDown(this, new EventArgs());
        }

        private void SurfaceButtonPlayer2_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
        {
            if (EH_SurfaceButtonPlayer2_ContactDown != null)
                EH_SurfaceButtonPlayer2_ContactDown(this, new EventArgs());
        }

        private void SurfaceButtonPlayer3_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
        {
            if (EH_SurfaceButtonPlayer3_ContactDown != null)
                EH_SurfaceButtonPlayer3_ContactDown(this, new EventArgs());
        }

        private void SurfaceButtonPlayer4_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
        {
            if (EH_SurfaceButtonPlayer4_ContactDown != null)
                EH_SurfaceButtonPlayer4_ContactDown(this, new EventArgs());
        }

        private void SurfaceButtonPlayer1_Click(object sender, RoutedEventArgs e)
        {
            SurfaceButtonPlayer1_ContactDown(this,null);
        }

        private void SurfaceButtonPlayer2_Click(object sender, RoutedEventArgs e)
        {
            SurfaceButtonPlayer2_ContactDown(this, null);
        }

        private void SurfaceButtonPlayer3_Click(object sender, RoutedEventArgs e)
        {
            SurfaceButtonPlayer3_ContactDown(this, null);
        }

        private void SurfaceButtonPlayer4_Click(object sender, RoutedEventArgs e)
        {
            SurfaceButtonPlayer4_ContactDown(this, null);
        }
	}
}