src/FingersDance.Data/Cutting.cs
author cavaliet
Tue, 24 Nov 2009 22:08:57 +0100
changeset 229 05aba5def1fc
parent 192 11083c390ce4
permissions -rw-r--r--
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     1
using System;
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     2
using System.Collections.Generic;
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     3
using System.Linq;
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     4
using System.Text;
229
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
     5
using System.Windows.Media;
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     6
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     7
namespace FingersDance.Data
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     8
{
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
     9
    public class Cutting
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    10
    {
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: 143
diff changeset
    11
        private String _id;
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    12
        private List<Annotation> _annotList;
229
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    13
        private String _title;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    14
        private Color _color;
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    15
229
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    16
        public Cutting(String idPar, String titlePar, List<Annotation> annotListPar, Color col)
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    17
        {
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    18
            this._id = idPar;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    19
            this._title = titlePar;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    20
            this._annotList = annotListPar;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    21
            this._color = col;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    22
        }
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: 143
diff changeset
    23
        public Cutting(String idPar, String titlePar, List<Annotation> annotListPar)
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    24
        {
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: 143
diff changeset
    25
            this._id = idPar;
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    26
            this._title = titlePar;
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    27
            this._annotList = annotListPar;
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    28
        }
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 69
diff changeset
    29
        public Cutting()
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 69
diff changeset
    30
        {}
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    31
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: 143
diff changeset
    32
        public String Id
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: 143
diff changeset
    33
        {
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: 143
diff changeset
    34
            get { return _id; }
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: 143
diff changeset
    35
            set
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: 143
diff changeset
    36
            {
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: 143
diff changeset
    37
                if (value == _id || String.IsNullOrEmpty(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: 143
diff changeset
    38
                    return;
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: 143
diff changeset
    39
                _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: 143
diff changeset
    40
            }
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: 143
diff changeset
    41
        }
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    42
        public String Title
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    43
        {
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    44
            get { return _title; }
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    45
            set
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    46
            {
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    47
                if (value == _title || String.IsNullOrEmpty(value))
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    48
                    return;
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    49
                _title = value;
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    50
            }
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    51
        }
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    52
        public List<Annotation> AnnotList
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    53
        {
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    54
            get { return _annotList; }
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    55
            set
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    56
            {
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    57
                _annotList = value;
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    58
            }
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    59
        }
229
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    60
        public Color Color
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    61
        {
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    62
            get { return _color; }
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    63
            set
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    64
            {
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    65
                if (value == _color)
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    66
                    return;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    67
                _color = value;
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    68
            }
05aba5def1fc add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents: 192
diff changeset
    69
        }
69
a4c44555f205 First Data binding for annotations and timeline
cavaliet
parents: 55
diff changeset
    70
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    71
    }
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    72
}