src/FingersDance.ActionFactory/ColorFactory.cs
author ARIAS Santiago
Sat, 14 Nov 2009 19:07:51 +0100
changeset 201 16287a7d1f1a
parent 160 e940ca798fe3
child 229 05aba5def1fc
permissions -rw-r--r--
Surface ScrollViewer for Control.Menu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     1
using System;
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     2
using System.Collections.Generic;
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     3
using System.Linq;
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     4
using System.Text;
160
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
     5
using System.Windows.Media;
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     6
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     7
namespace FingersDance.Factory
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     8
{
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     9
    public class ColorFactory
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    10
    {
160
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    11
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    12
        static Dictionary<uint, string> _ColorsStringId;
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    13
        static Dictionary<uint, Color> _Colors;
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    14
160
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    15
        public Dictionary<uint, string> ColorsStringId
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    16
        {
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    17
            get { return _ColorsStringId; }
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    18
        }
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    19
        public Dictionary<uint, Color> Colors
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    20
        {
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    21
            get { return _Colors; }
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    22
        }
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    23
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    24
        public ColorFactory()
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    25
        {
160
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    26
            if (_ColorsStringId == null)
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    27
            {
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    28
                _ColorsStringId = new Dictionary<uint, string>();
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    29
                _ColorsStringId.Add(0, "DefaultColor_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    30
                _ColorsStringId.Add(1, "Color_1_#FFFF00_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    31
                _ColorsStringId.Add(2, "Color_2_#FFC800_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    32
                _ColorsStringId.Add(3, "Color_3_#FF7D00__xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    33
                _ColorsStringId.Add(4, "Color_4_#FF0000_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    34
                _ColorsStringId.Add(5, "Color_5_#FF0064_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    35
                _ColorsStringId.Add(6, "Color_6_#C80FA0_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    36
                _ColorsStringId.Add(7, "Color_7_#5A0FC8_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    37
                _ColorsStringId.Add(8, "Color_8_#230FD2_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    38
                _ColorsStringId.Add(9, "Color_9_#0096FF__xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    39
                _ColorsStringId.Add(10, "Color_10_#009664_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    40
                _ColorsStringId.Add(11, "Color_11_#006432_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    41
                _ColorsStringId.Add(12, "Color_12_#00C800_xaml");
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    42
            }
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    43
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    44
            if (_Colors == null)
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    45
            {
160
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    46
                _Colors = new Dictionary<uint, Color>();
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    47
                _Colors.Add(0, Color.FromRgb(0x88, 0x88, 0x88));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    48
                _Colors.Add(1, Color.FromRgb(0xFF, 0xFF, 0x00));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    49
                _Colors.Add(2, Color.FromRgb(0xFF, 0xC8, 0x00));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    50
                _Colors.Add(3, Color.FromRgb(0xFF, 0x7D, 0x00));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    51
                _Colors.Add(4, Color.FromRgb(0xFF, 0x00, 0x00));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    52
                _Colors.Add(5, Color.FromRgb(0xFF, 0x00, 0x64));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    53
                _Colors.Add(6, Color.FromRgb(0xC8, 0x0F, 0xA0));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    54
                _Colors.Add(7, Color.FromRgb(0x5A, 0x0F, 0xC8));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    55
                _Colors.Add(8, Color.FromRgb(0x23, 0x0F, 0xD2));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    56
                _Colors.Add(9, Color.FromRgb(0x00, 0x96, 0xFF));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    57
                _Colors.Add(10, Color.FromRgb(0x00, 0x96, 0x64));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    58
                _Colors.Add(11, Color.FromRgb(0x00, 0x64, 0x32));
e940ca798fe3 Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents: 156
diff changeset
    59
                _Colors.Add(12, Color.FromRgb(0x00, 0xC8, 0x00));
156
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    60
            }
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    61
        }
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    62
    }
e16c8c913c65 Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    63
}