private void InitColorer()
        {
            var typeList = new List <Type> {
                typeof(Solver.ColorRange)
            };

            collectionEditor1.NewItemTypes = typeList;


            var color00 = new Solver.ColorRange(1001, uint.MaxValue, Colors.DarkRed);
            var color0  = new Solver.ColorRange(400, 1000, Colors.DarkRed);
            var color1  = new Solver.ColorRange(100, 399, Colors.Red);
            var color2  = new Solver.ColorRange(60, 99, Colors.OrangeRed);
            var color3  = new Solver.ColorRange(30, 59, Colors.Yellow);
            var color4  = new Solver.ColorRange(10, 29, Colors.YellowGreen);
            var color5  = new Solver.ColorRange(0, 9, Colors.Black);


            collectionEditor1.Items.Add(color00);
            collectionEditor1.Items.Add(color0);
            collectionEditor1.Items.Add(color1);
            collectionEditor1.Items.Add(color2);
            collectionEditor1.Items.Add(color3);
            collectionEditor1.Items.Add(color4);
            collectionEditor1.Items.Add(color5);
        }
Exemple #2
0
        public static Solver.Colorizer ConvertToColorizer(Solver.ColorRange data)
        {
            var returnItem = new Solver.Colorizer {
                Min = (int)data.Min, Max = (int)data.Max, Color = data.Color
            };

            return(returnItem);
        }