Healthcare Prototype

Prototype of next generation healthcare application using WPF. A large codebase provided here with many interesting data visualization techniques.

C# (15.7 MB)
 
 
 
 
 
4.3 Star
(3)
14,057 times
Add to favorites
3/1/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.ComponentModel;

namespace IdentityMine.Avalon.Controls
{
    public class ChartVisualConverter : IValueConverter
    {
        public ChartVisualConverter()
        {
            System.Diagnostics.Debug.WriteLine("ChartVisualConverter Initialized");
        }

        public object Convert(
            object value,
            Type targetType,
            object parameter,
            CultureInfo cultureInfo)
        {
            if (targetType == typeof(Brush) && value is String)
            {
                String chartKey = value as String;
                Dictionary<string, VisualBrush> chartVisuals = parameter as Dictionary<string, VisualBrush>;
                if (chartVisuals.Count == 0)
                    return null;

                return (chartVisuals[chartKey]);
            }
            else
            {
                return DependencyProperty.UnsetValue;
            }
        }

        public object ConvertBack(
            object value,
            Type targetType,
            object parameter,
            CultureInfo cultureInfo)
        {
            //if (targetType == typeof(Double) && value is Nullable<Double>)
            //{
            //    Nullable<Double> nullableValue = (Nullable<Double>)value;

            //    if (nullableValue.HasValue)
            //    {
            //        return nullableValue.Value;
            //    }
            //}

            return DependencyProperty.UnsetValue;
        }
    }
}