Пример #1
0
 public static ISorterVm ToStagedSorterVm(
     this ISorterEval sorterEval,
     Brush lineBrush,
     Brush backgroundBrush
     )
 {
     return(new SorterVmImpl(
                keyCount: sorterEval.KeyCount,
                stageVms: sorterEval.ToStagedSorter().SorterStages.Select
                (
                    ss => ss.ToStageVm
                    (
                        switchWidth: StandardSwitchWidth,
                        useMax: sorterEval.SwitchableGroupCount,
                        lineThickness: StandardineThickness,
                        lineBrush: lineBrush,
                        backgroundBrush: backgroundBrush,
                        switchBrushes: sorterEval.Success ?
                        BrushFactory.GrayThenBlueToBlackBrushes()
                                             :
                        BrushFactory.GrayThenBlueToRedBrushes()
                    )
                ).ToList()
                ));
 }