Exemplo n.º 1
0
 public FixParColor(Dictionary <short, Color> mapping, FixPar.ValueType type = FixPar.ValueType.ABS,
                    Enums.FixParDst reg = Enums.FixParDst.Current)
 {
     infos = mapping.SelectMany(x => new SkInfo[]
     {
         new SkInfo
         {
             SkNum = x.Key,
             Par   = FixParMap.Active.Red,
             Val   = x.Value.R
         },
         new SkInfo
         {
             SkNum = x.Key,
             Par   = FixParMap.Active.Green,
             Val   = x.Value.G
         },
         new SkInfo
         {
             SkNum = x.Key,
             Par   = FixParMap.Active.Blue,
             Val   = x.Value.B
         }
     });
     count     = mapping.Count * 3;
     valueType = type;
     dstReg    = reg;
 }
Exemplo n.º 2
0
 public CustomFixPar(Dictionary <int, Dictionary <short, byte> > mapping, FixPar.ValueType type = FixPar.ValueType.ABS, Enums.FixParDst reg = Enums.FixParDst.Current)
 {
     infos = new List <SkInfo>(mapping.Count);
     foreach ((int key, Dictionary <short, byte> value) in mapping)
     {
         infos.Add(new SkInfo
         {
             Num        = key,
             Parameters = value
         });
     }
     valueType = type;
     dstReg    = reg;
 }