src/FingersDance.GestureControl/DoubleHalfConverter.cs
author cavaliet
Tue, 24 Nov 2009 22:08:57 +0100
changeset 229 05aba5def1fc
parent 174 45c9e55fcf23
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:
174
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     1
using System;
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     2
using System.Collections.Generic;
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     3
using System.Linq;
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     4
using System.Text;
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     5
using System.Windows.Data;
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     6
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     7
namespace GestureControl
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     8
{
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     9
    class DoubleHalfConverter : IValueConverter
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    10
    {
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    11
        #region IValueConverter Members
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    12
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    13
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    14
        {
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    15
            return (double)((double)value / 1.5);
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    16
        }
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    17
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    18
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    19
        {
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    20
            throw new NotImplementedException();
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    21
        }
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    22
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    23
        #endregion
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    24
    }
45c9e55fcf23 Gesture Control
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    25
}