/// <summary> /// Metoda inicjalizująca generująca pędzle i OxyColory /// </summary> /// <param name="count">Ilość kolorów do wygenerowania</param> public static void CreateBrushes(int count = MAX) { _brushArray = new Brush[count]; _oxyArray = new OxyColor[count]; var cp = ColorPicking.RegularPickingFactory(count); for (var p = 0; p < count; p++) { _brushArray[p] = cp.GenerateBrush(p); _oxyArray[p] = cp.GenerateOxyColor(p); } }
public ColorPicker(int index, int stateCount) { InitializeComponent(); _stateCount = stateCount; Box.Items.Add(ColorPicking.RegularPickingFactory(stateCount)); Box.Items.Add(ColorPicking.ReverseRegularPickingFactory(stateCount)); Box.Items.Add(ColorPicking.GrayScaleFactory(stateCount)); Box.Items.Add(ColorPicking.RainbowFactory(stateCount)); Box.Items.Add(ColorPicking.CitrusFactory(stateCount)); Box.SelectedIndex = index; Id = index; _id = index; }
public MainWindow() { SPDAssets.CreateBrushes(); SPDAssets.ChangeFont("Arial"); SPDAssets.InitialiseDescriptions(); _colorPicking = ColorPicking.RegularPickingFactory(10); InitializeComponent(); InitialConditions.Initialise(); ShapeBox.ItemsSource = Enum.GetValues(typeof(Shape)); NeighbourBox.ItemsSource = Enum.GetValues(typeof(Neighbourhoods)); ShapeBox.SelectedItem = Shape.Płaski; NeighbourBox.SelectedItem = Neighbourhoods.Moore; DataContext = this; Error = ValidationErrors.None; _canvalidate = true; }