src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml.cs
author cavaliet
Thu, 05 Nov 2009 13:13:52 +0100
changeset 187 b266af50744c
child 191 8a25a85f2656
permissions -rw-r--r--
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     1
using System;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     2
using System.Collections.Generic;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     3
using System.Linq;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     4
using System.Text;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     5
using System.Windows;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     6
using System.Windows.Controls;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     7
using System.Windows.Data;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     8
using System.Windows.Documents;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
     9
using System.Windows.Input;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    10
using System.Windows.Media;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    11
using System.Windows.Media.Imaging;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    12
using System.Windows.Navigation;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    13
using System.Windows.Shapes;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    14
using FingersDance.Data;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    15
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    16
namespace FingersDance.Control.SessionInput
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    17
{
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    18
    /// <summary>
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    19
    /// Interaction logic for UserControlNewCuttingForm.xaml
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    20
    /// </summary>
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    21
    public partial class UserControlNewCuttingForm : UserControl
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    22
    {
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    23
        public event EventHandler EH_NewCuttingForm_ContactDown;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    24
        public Cutting Cutting = new Cutting();
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    25
        User _User = new User();
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    26
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    27
        public UserControlNewCuttingForm(User u)
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    28
        {
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    29
            InitializeComponent();
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    30
            ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    31
            _User = u;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    32
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    33
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    34
        }
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    35
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    36
        #region Actions
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    37
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    38
        private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    39
        {
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    40
            Cutting = new Cutting(_User.Name, new List<Annotation>());   
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    41
            if (EH_NewCuttingForm_ContactDown != null)
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    42
                EH_NewCuttingForm_ContactDown(this, new EventArgs());
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    43
        }
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    44
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    45
        private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e)
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    46
        {
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    47
            //Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting());
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    48
            Cutting = new Cutting(_User.Name, new List<Annotation>());
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    49
            if (EH_NewCuttingForm_ContactDown != null)
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    50
                EH_NewCuttingForm_ContactDown(this, new EventArgs());   
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    51
        }
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    52
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    53
        #endregion
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    54
    }
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents:
diff changeset
    55
}