src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml.cs
author ARIAS Santiago
Sat, 14 Nov 2009 19:07:51 +0100
changeset 201 16287a7d1f1a
parent 192 11083c390ce4
permissions -rw-r--r--
Surface ScrollViewer for Control.Menu
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
        {
192
11083c390ce4 Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents: 191
diff changeset
    40
            Cutting = new Cutting("c_" + System.Guid.NewGuid(), ST_CuttingName.Text.Trim(), new List<Annotation>());   
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
    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
        {
192
11083c390ce4 Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents: 191
diff changeset
    47
            Cutting = new Cutting("c _" + System.Guid.NewGuid(), ST_CuttingName.Text.Trim(), new List<Annotation>());
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
    48
            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
    49
                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
    50
        }
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
        #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
    53
    }
192
11083c390ce4 Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents: 191
diff changeset
    54
}