src/FingersDance.Control.Screen/UserControlScreen.xaml.cs
author cavaliet
Wed, 18 Nov 2009 13:06:55 +0100
changeset 208 0699cab5cbb3
parent 192 11083c390ce4
child 211 50e6fe2c2ea2
permissions -rw-r--r--
first step of search mode : add choice panel and integrate the annotation mode.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     1
using System;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     2
using System.IO;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     3
using System.Net;
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
     4
using System.Collections.Generic;
35
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     5
using System.Windows;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     6
using System.Windows.Controls;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     7
using System.Windows.Data;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     8
using System.Windows.Media;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
     9
using System.Windows.Media.Animation;
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    10
using System.Windows.Navigation;
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
    11
using System.Xml.Linq;
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    12
using FingersDance.Control.ListVideo;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    13
using FingersDance.Control.SessionInput;
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    14
using FingersDance.ViewModels;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    15
using FingersDance.Data;
35
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    16
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    17
namespace FingersDance.Control.Screen
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    18
{
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    19
	public partial class UserControlScreen
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    20
	{
82
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    21
        public String contexteGrid;
112
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 104
diff changeset
    22
        public int id = 0;
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: 156
diff changeset
    23
        public event EventHandler UC_Screen_NewCutting;
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    24
        private MainViewModel _mainViewModel;
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    25
        private String AnnotationOrSearchMode;
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    26
        public Cutting Cutting;
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
    27
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
    28
        private String videoName;
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
    29
        private String videoPath;
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
    30
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    31
        User User = new User();
95
07972aa3f2e0 ListVideo
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 82
diff changeset
    32
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    33
        public UserControlScreen(int id, MainViewModel mvmodel)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    34
        {
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    35
            try
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    36
            {
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    37
                this.InitializeComponent();
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    38
                this.id = id;
186
83615722dbab Debug data management for others panels to redisplay.
cavaliet
parents: 182
diff changeset
    39
                User.Name = "User " + id;
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    40
                _mainViewModel = mvmodel;
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    41
                if (_mainViewModel.Project.VideoPath.Equals(""))
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    42
                {
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    43
                    //1-Creation de la ListVideo
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    44
                    UserControlListVideo ListVideo = new UserControlListVideo();
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    45
                    ListVideo.Name = "ListVideo1";
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    46
                    //2-Ajout de la ListVideo au ControlScreen
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    47
                    this.AddToGrid(ListVideo);
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    48
                    //3-Creation des Events pour chaque item de la video
191
8a25a85f2656 First step of data saving in a ldt/xml file. First step of displaying the existing ldt files (not loaded yet)
cavaliet
parents: 190
diff changeset
    49
                    ListVideo.EH_ItemVideo1_ContactDown += new System.EventHandler(ListVideo_EH_ItemVideo_ContactDown);
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    50
                }
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    51
                else
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    52
                    OpenProject();
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    53
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    54
            catch (Exception)
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    55
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    56
                Cutting = null;
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: 156
diff changeset
    57
                if (UC_Screen_NewCutting != 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: 156
diff changeset
    58
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    59
            }
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 112
diff changeset
    60
        }
35
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
    61
82
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    62
        //Rajout un UIElement vers la grid du screen.
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    63
        public void AddToGrid(UIElement uie)
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    64
        {
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    65
            if (uie != null)
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    66
            {
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    67
                try { LayoutRoot.Children.Add(uie); }
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    68
                catch(Exception){}
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    69
            }
82
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    70
        }
c37122b567fa Work ControlScreen
sarias
parents: 80
diff changeset
    71
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    72
        private void ListVideo_EH_ItemVideo_ContactDown(object sender, EventArgs e)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    73
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    74
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    75
            {
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    76
                // 1- renseigner la video choisie au screen et créer un nouveau projet à partir de ce chemin vidéo
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
    77
                videoName = ((UserControlListVideo)sender).VideoName;
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
    78
                videoPath = ((UserControlListVideo)sender).path;
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    79
                // 2-Supression du UC List Video
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    80
                LayoutRoot.Children.Remove((UserControlListVideo)sender);
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    81
                // 3 - Choose between Annotation Or Search Mode
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    82
                GetAnnotationOrSearchMode();
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    83
                //OpenProjectList();
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    84
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    85
            catch (Exception ex)
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    86
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
    87
                Cutting = null;
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: 156
diff changeset
    88
                if (UC_Screen_NewCutting != 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: 156
diff changeset
    89
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
    90
            }
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
    91
        }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    92
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    93
        private void GetAnnotationOrSearchMode()
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    94
        {
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    95
            UserControlAnnotationOrSearch AnnotOrSearch = new UserControlAnnotationOrSearch();
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    96
            AnnotOrSearch.ModeChosen += new EventHandler<AnnotationOrSearchEventArg>(AnnotOrSearch_ModeChosen);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    97
            this.AddToGrid(AnnotOrSearch);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    98
        }
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
    99
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   100
        void AnnotOrSearch_ModeChosen(object sender, AnnotationOrSearchEventArg e)
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   101
        {
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   102
            // We remove the UserControlAnnotationOrSearch
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   103
            LayoutRoot.Children.Remove((UserControlAnnotationOrSearch)sender);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   104
            // We show the project list and send the chosen mode
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   105
            AnnotationOrSearchMode = e.ChosenMode;
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   106
            OpenProjectList();
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   107
        }
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   108
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: 156
diff changeset
   109
        private void OpenProjectList()
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   110
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   111
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   112
            {
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   113
                    // First We create the project if we are in annotation mode
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   114
                    if(AnnotationOrSearchMode=="Annotation")
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   115
                        _mainViewModel.CreateProject(videoName, videoPath);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   116
                    // We get all the ldt/project files from the current directory...
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   117
                    List<String> existingProjects = new List<String>();
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   118
                    foreach (String filename in Directory.GetFiles("./"))
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   119
                    {
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   120
                        if (filename.Substring(filename.Length-4).ToLower()==".ldt")
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   121
                            existingProjects.Add(filename.Substring(2, filename.Length - 6));
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   122
                    }
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   123
                    // ... and display them the the select box UserControlListProject
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   124
                    UserControlListProject listProject = new UserControlListProject(existingProjects, AnnotationOrSearchMode);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   125
                    listProject.Name = "ListProject";
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   126
                    LayoutRoot.Children.Add(listProject);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   127
                    listProject.EH_ListProject_ContactDown += new EventHandler(listProject_EH_ListProject_ContactDown);
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   128
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   129
            catch (Exception)
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   130
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   131
                Cutting = null;
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: 156
diff changeset
   132
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   133
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   134
            }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   135
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   136
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   137
        void listProject_EH_ListProject_ContactDown(object sender, EventArgs e)
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   138
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   139
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   140
            {
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   141
                LayoutRoot.Children.Remove((UserControlListProject)sender);
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   142
                if (((UserControlListProject)sender).SelectedItem.Equals("New Project"))
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   143
                {
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   144
                    UserControlNewProjectForm ProjectInput = new UserControlNewProjectForm();
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: 156
diff changeset
   145
                    ProjectInput.Name = "ProjectInput";
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: 156
diff changeset
   146
                    LayoutRoot.Children.Add(ProjectInput);
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   147
                    ProjectInput.EH_NewProjectForm_ContactDown += new System.EventHandler(this.ProjectInput_EH_NewProjectForm_ContactDown);
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   148
                }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   149
                else
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   150
                {
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
   151
                    // ((UserControlListProject)sender).SelectedItem is the name of the selected project
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
   152
                    // Now we load the xml/ldt file to load all its datas (cuttings, annotations...)
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
   153
                    XDocument loadedLdt = XDocument.Load(((UserControlListProject)sender).SelectedItem + ".ldt");
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
   154
                    Project loadedProject = new Project(videoName, videoPath);
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
   155
                    loadedProject.Name = loadedLdt.Root.Element("project").Attribute("title").Value;
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
   156
                    loadedProject.Description = loadedLdt.Root.Element("project").Attribute("abstract").Value;
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
   157
                    loadedProject.Cuttings = new List<Cutting>();
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
   158
                    XElement cuttingsParentNode = loadedLdt.Root.Element("annotations").Element("content");
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
   159
                    foreach (XElement cuttingNode in cuttingsParentNode.Elements())
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   160
                    {
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
   161
                        List<Annotation> la = new List<Annotation>();
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
   162
                        foreach (XElement annotNode in cuttingNode.Element("elements").Elements())
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   163
                        {
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
   164
                            String aId = annotNode.Attribute("id").Value;
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
   165
                            float begin = (float)annotNode.Attribute("begin");
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
   166
                            float dur = (float)annotNode.Attribute("dur");
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
   167
                            String gt = annotNode.Element("gestureType").Value;
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
   168
                            String colorString = annotNode.Attribute("color").Value; // is type 0xRRGGBB
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
   169
                            Byte r = Convert.ToByte(colorString.Substring(2, 2), 16);
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
   170
                            Byte g = Convert.ToByte(colorString.Substring(4, 2), 16);
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
   171
                            Byte b = Convert.ToByte(colorString.Substring(6, 2), 16);
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
   172
                            Color c = Color.FromRgb(r, g, b);
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
   173
                            la.Add(new Annotation(aId, begin, dur, gt, c));
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   174
                        }
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
   175
                        loadedProject.Cuttings.Add(new Cutting(cuttingNode.Attribute("id").Value,cuttingNode.Element("title").Value,la));
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   176
                    }
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
   177
                    // We define the loaded project as the current session's project.
208
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   178
                    if (AnnotationOrSearchMode == "Annotation")
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   179
                    {
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   180
                        _mainViewModel.Project = new ProjectViewModel(loadedProject);
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   181
                        OpenProject();
0699cab5cbb3 first step of search mode : add choice panel and integrate the annotation mode.
cavaliet
parents: 192
diff changeset
   182
                    }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   183
                }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   184
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   185
            catch (Exception)
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   186
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   187
                Cutting = null;
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: 156
diff changeset
   188
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   189
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   190
            }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   191
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   192
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   193
        private void ProjectInput_EH_NewProjectForm_ContactDown(object sender, EventArgs e)
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   194
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   195
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   196
            {
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   197
                //MainViewModel.Project.Alias = ((UserControlNewProjectForm)sender).Alias;
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   198
                //MainViewModel.Project.Email = ((UserControlNewProjectForm)sender).Email;
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   199
                _mainViewModel.Project.Description = ((UserControlNewProjectForm)sender).Description;
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
   200
                _mainViewModel.Project.Name = ((UserControlNewProjectForm)sender).ProjectName.Trim();
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   201
                
186
83615722dbab Debug data management for others panels to redisplay.
cavaliet
parents: 182
diff changeset
   202
                
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   203
                //2-Suppression UCSession Input
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   204
                LayoutRoot.Children.Remove((UserControlNewProjectForm)sender);
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   205
                OpenProject();
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   206
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   207
            catch (Exception ex) 
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   208
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   209
                Cutting = null;
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: 156
diff changeset
   210
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   211
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   212
            }
104
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 95
diff changeset
   213
        }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   214
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   215
        private void OpenProject()
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   216
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   217
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   218
            {
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
   219
                // We display the list of cuttings available for the current project
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   220
                UserControlListCutting listCuttings = new UserControlListCutting(_mainViewModel.Project.CuttingsDict);
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: 156
diff changeset
   221
                listCuttings.Name = "listCuttings";
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: 156
diff changeset
   222
                LayoutRoot.Children.Add(listCuttings);
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: 156
diff changeset
   223
                listCuttings.EH_Item_ContactDown += new EventHandler(listCuttings_EH_Item_ContactDown);
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   224
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   225
            catch (Exception) 
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   226
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   227
                Cutting = null;
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: 156
diff changeset
   228
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   229
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   230
            }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   231
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   232
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: 156
diff changeset
   233
        void listCuttings_EH_Item_ContactDown(object sender, EventArgs e)
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   234
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   235
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   236
            {
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   237
                LayoutRoot.Children.Remove((UserControlListCutting)sender);
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   238
                if (((UserControlListCutting)sender).SelectedItem.Equals("New Cutting"))
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   239
                {
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
   240
                    // "New Uutting" was was selected -> we display the form
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   241
                    UserControlNewCuttingForm newCutting = new UserControlNewCuttingForm(User);
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: 156
diff changeset
   242
                    newCutting.Name = "newCutting";
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: 156
diff changeset
   243
                    LayoutRoot.Children.Add(newCutting);
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   244
                    newCutting.EH_NewCuttingForm_ContactDown += new EventHandler(newCutting_EH_ContactDown);
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: 156
diff changeset
   245
                }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   246
                else
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   247
                {
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
   248
                    // An already existing project was clicked -> we load the selected project from the dictionnary
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
   249
                    Cutting = _mainViewModel.Project.CuttingsDict[((UserControlListCutting)sender).SelectedItem];
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
   250
                    if (UC_Screen_NewCutting != null)
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
   251
                        UC_Screen_NewCutting(this, new EventArgs());
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
   252
                    return;
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   253
                }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   254
            }
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   255
            catch (Exception)
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   256
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   257
                Cutting = null;
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: 156
diff changeset
   258
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   259
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   260
            }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   261
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   262
186
83615722dbab Debug data management for others panels to redisplay.
cavaliet
parents: 182
diff changeset
   263
        void newCutting_EH_ContactDown(object sender, EventArgs e)
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   264
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   265
            try
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   266
            {
187
b266af50744c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
cavaliet
parents: 186
diff changeset
   267
                LayoutRoot.Children.Remove((UserControlNewCuttingForm)sender);
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
   268
                // The new cutting form sent the cutting instance so we can dispatch the event UC_Screen_NewCutting
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   269
                Cutting = ((UserControlNewCuttingForm)sender).Cutting;
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: 156
diff changeset
   270
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   271
                    UC_Screen_NewCutting(this, new EventArgs());
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   272
            }
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: 156
diff changeset
   273
            catch (Exception)
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   274
            {
190
619ca3ae13c7 MainViewModel is now well linked to all the users'cuttings. At any moment, the MVM has all annotations. This step prepares data saving.
cavaliet
parents: 187
diff changeset
   275
                Cutting = null;
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: 156
diff changeset
   276
                if (UC_Screen_NewCutting != 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: 156
diff changeset
   277
                    UC_Screen_NewCutting(this, new EventArgs());
152
46577fd0a294 PlayerPause en resize
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 148
diff changeset
   278
            }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
   279
        }
35
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
   280
	}
ed77793b767a Control Pivot,
sarias
parents:
diff changeset
   281
}