コード例 #1
0
        public ColourPicker(ToolStrip toolStrip, ColourPalette palette)
        {
            this.toolStrip = toolStrip;
            this.palette   = palette;

            reloadColourPicker(palette.getColors());
        }
コード例 #2
0
ファイル: Puzzle.cs プロジェクト: JayneGale/MosaicEditor
 /// <summary>
 /// The constructor takes the dimensions of the picture box as parameters, and
 /// fills the picture box with hexagons.
 /// </summary>
 /// <param name="gridSpacing">in pixels</param>
 // public Puzzle(PictureBox pictureBox, int gridSpacing, ColourPalette palette)
 public Puzzle(int gridSpacing, ColourPalette palette)
 {
     this.gridSpacing = gridSpacing;
     this.palette     = palette;
     this.HexagonList = new List <Hexagon>();
 }
コード例 #3
0
ファイル: Puzzle.cs プロジェクト: JayneGale/MosaicEditor
 /// <summary>
 /// After a load, recreate the current palette
 /// </summary>
 private void recreatePalette()
 {
     // this.palette = new ColourPalette(colors);
     this.palette = new ColourPalette(colors.Count);
     this.palette.reload(colors);
 }