Exemplo n.º 1
0
 public static IEnumerable <KeyPairVm> ToKeyPairVms(
     this core.Sorting.ISwitch[][] switchblocks,
     int stageIndex,
     StageVmStyle stageVmStyle)
 {
     for (var stageSection = 0; stageSection < switchblocks.Length; stageSection++)
     {
         var swb = switchblocks[stageSection].ToArray();
         for (var i = 0; i < swb.Length; i++)
         {
             yield return(new KeyPairVm(
                              disabledBrush: stageVmStyle.SwitchBrushNotUsed,
                              inUseBrush: stageVmStyle.SwitchBrushInUse,
                              wasUsedBrush: stageVmStyle.SwitchBrushWasUsed,
                              stageSection: stageSection,
                              keyPairUse: KeyPairUse.Enabled,
                              stageIndex: stageIndex,
                              hiKey: swb[i].hi,
                              lowKey: swb[i].low,
                              useCount: 0));
         }
     }
 }
Exemplo n.º 2
0
        public static Pen SwitchLinePen(this StageVmStyle stageVmStyle, KeyPairVm keyPairVm, double stageRenderWidth)
        {
            var brushWidth = stageVmStyle.SortableVmStyle.RenderWidth(stageVmStyle.SwitchLineWidth, stageRenderWidth);

            return(new Pen(keyPairVm.Brush, brushWidth));
        }