using NvAPIWrapper.Display; using System; using System.Collections.Generic; using System.Web.Script.Serialization; namespace ColorControl { public class ColorDataConverter : JavaScriptConverter { public override IEnumerable SupportedTypes { get { return new List() { typeof(ColorData) }; } } public override IDictionary Serialize(object obj, JavaScriptSerializer serializer) { Dictionary result = new Dictionary(); if (obj == null) return result; return result; } public override object Deserialize(IDictionary dictionary, Type type, JavaScriptSerializer serializer) { return NvPreset.GenerateColorData(dictionary); } } }