aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs
blob: 993eb4e78c6b0b185f0fefadfe57788fe2191c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.MachineStudio.Common.Notifications;

namespace Tango.MachineStudio.DB.ViewModels
{
    public class OrganizationsViewVM : DbTableViewModel<Organization>
    {
        public OrganizationsViewVM(INotificationProvider notification) : base(notification)
        {
        }
    }
}
err"><#@ import Namespace="System.IO" #> <#@ import namespace="System.Collections.Generic" #> <# var document = new XmlDocument(); var file = Host.ResolvePath("ColorSpaces.xml"); document.Load(file); var colorSpaces = document.SelectNodes("colorSpaces/colorSpace"); #> <#@ output extension=".cs" #>// Note: This is a generated file. using ColorMine.ColorSpaces.Conversions; namespace ColorMine.ColorSpaces { <# foreach (XmlNode space in colorSpaces) { var spaceName = space.Attributes["name"].Value; var points = space.SelectNodes("dataPoints/dataPoint");#> public interface I<#=spaceName#> : IColorSpace { <# foreach(XmlNode point in points) { #> double <#=point.Attributes["label"].Value#> { get; set; } <# } #> } public class <#=spaceName#> : ColorSpace, I<#=spaceName#> { <# foreach(XmlNode point in points) { #> public double <#=point.Attributes["label"].Value#> { get; set; } <# } #> public <#=spaceName#>() { } public <#=spaceName#>(<# foreach(XmlNode point in points) { #>double <#=point.Attributes["label"].Value.ToLower()#><# if(point.Attributes != points[points.Count - 1].Attributes) { #>, <# } #><# } #>) { <# foreach(XmlNode point in points) { #> <#=point.Attributes["label"].Value#> = <#=point.Attributes["label"].Value.ToLower()#>; <# } #> } public <#=spaceName#>(IColorSpace color) { Ordinals = color.To<<#=spaceName#>>().Ordinals; } public <#=spaceName#>(double[] ordinals) { Ordinals = ordinals; } public override void Initialize(IRgb color) { <#=spaceName#>Converter.ToColorSpace(color,this); } public override string ToString() { return string.Join(", ", new []{ <# foreach(XmlNode point in points) { #> "<#=point.Attributes["label"].Value#>: " + <#=point.Attributes["label"].Value#>, <# } #> }); } public override IRgb ToRgb() { return <#=spaceName#>Converter.ToColor(this); } public override sealed double[] Ordinals { get { return new[] {<# foreach(XmlNode point in points) { #> <#=point.Attributes["label"].Value#>,<# } #> }; } set { <# var counter = 0; foreach(XmlNode point in points) { #> <#=point.Attributes["label"].Value#> = value[<#=counter++#>]; <# } #> } } } <# } #>}