Beispiel #1
0
        public void CreatePatch(Point location, Color color)
        {
            if (ColorGrid.GetColorPatchAt(location) != null)
            {
                throw new Exception("There already is a colorpatch there.");
            }

            var list         = ColorGrid.ColorPatches;
            var gridLocation = ColorGrid.GetGridLocationAt(location);

            list.Add(new ColorPatch(color, gridLocation));

            SaveAndRefreshPalette();
        }