src/FingersDance.Control.SessionInput/UserControlNewProject.xaml.cs
changeset 147 1a5da89daee9
child 182 25b49d4f1635
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.SessionInput/UserControlNewProject.xaml.cs	Wed Oct 14 13:45:55 2009 +0200
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using FingersDance.Data;
+
+namespace FingersDance.Control.SessionInput
+{
+    /// <summary>
+    /// Interaction logic for UserControlNewProject.xaml
+    /// </summary>
+    public partial class UserControlNewProject : UserControl
+    {
+        public event EventHandler EH_NewProject_ContactDown;
+        public Project Project = new Project();
+        User _User = new User();
+
+        public UserControlNewProject(User u)
+        {
+            InitializeComponent();
+            ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
+            _User = u;
+
+
+        }
+
+        #region Actions
+
+        private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+        {
+            Project = new Project(_User, new Cutting());   
+            if (EH_NewProject_ContactDown != null)
+                EH_NewProject_ContactDown(this, new EventArgs());
+        }
+
+        private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e)
+        {
+            Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting());
+            if (EH_NewProject_ContactDown != null)
+                EH_NewProject_ContactDown(this, new EventArgs());   
+        }
+
+        #endregion
+    }
+}