src/FingersDance.Control.SessionInput/UserControlNewProject.xaml.cs
author cavaliet
Wed, 28 Oct 2009 17:07:27 +0100
changeset 182 25b49d4f1635
parent 147 1a5da89daee9
permissions -rw-r--r--
First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
147
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     1
using System;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     2
using System.Collections.Generic;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     3
using System.Linq;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     4
using System.Text;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     5
using System.Windows;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     6
using System.Windows.Controls;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     7
using System.Windows.Data;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     8
using System.Windows.Documents;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     9
using System.Windows.Input;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    10
using System.Windows.Media;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    11
using System.Windows.Media.Imaging;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    12
using System.Windows.Navigation;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    13
using System.Windows.Shapes;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    14
using FingersDance.Data;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    15
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    16
namespace FingersDance.Control.SessionInput
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    17
{
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    18
    /// <summary>
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    19
    /// Interaction logic for UserControlNewProject.xaml
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    20
    /// </summary>
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    21
    public partial class UserControlNewProject : UserControl
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    22
    {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    23
        public event EventHandler EH_NewCutting_ContactDown;
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    24
        public Cutting Cutting = new Cutting();
147
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    25
        User _User = new User();
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    26
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    27
        public UserControlNewProject(User u)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    28
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    29
            InitializeComponent();
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    30
            ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    31
            _User = u;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    32
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    33
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    34
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    35
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    36
        #region Actions
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    37
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    38
        private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    39
        {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    40
            Cutting = new Cutting(_User.Name, new List<Annotation>());   
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    41
            if (EH_NewCutting_ContactDown != null)
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    42
                EH_NewCutting_ContactDown(this, new EventArgs());
147
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    43
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    44
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    45
        private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    46
        {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    47
            //Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting());
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    48
            Cutting = new Cutting(_User.Name, new List<Annotation>());
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    49
            if (EH_NewCutting_ContactDown != null)
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 147
diff changeset
    50
                EH_NewCutting_ContactDown(this, new EventArgs());   
147
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    51
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    52
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    53
        #endregion
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    54
    }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    55
}