Exemplo n.º 1
0
 /// <summary>
 /// Event for Gallery Item clicked.
 /// </summary>
 /// <param name="sender">ToolstripGalleryItem</param>
 /// <param name="args">ToolstripGalleryItem event args</param>
 private void ToolStripGallery1_GalleryItemClicked(object sender, Syncfusion.Windows.Forms.Tools.ToolStripGalleryItemEventArgs args)
 {
     galleryItem = args.GalleryItem.Text.Trim();
     GalleryItemSize(args.GalleryItem.Text.Trim());
 }
Exemplo n.º 2
0
        private void toolStripGallery1_GalleryItemClicked(object sender, Syncfusion.Windows.Forms.Tools.ToolStripGalleryItemEventArgs args)
        {
            Color interior = Color.Black;

            switch (args.GalleryItem.ImageIndex)
            {
            case 0:
                interior = Color.DarkBlue;
                break;

            case 1:
                interior = Color.Maroon;
                break;

            case 2:
                interior = Color.DarkGreen;
                break;

            case 3:
                interior = Color.FromArgb(30, 75, 120);
                break;

            case 4:
                interior = Color.FromArgb(49, 134, 156);
                break;

            case 5:
                interior = Color.Brown;
                break;

            case 6:
                interior = Color.FromArgb(57, 93, 140);
                break;

            case 7:
                interior = Color.FromArgb(148, 52, 49);
                break;

            case 8:
                interior = Color.Green;
                break;

            case 9:
                interior = Color.FromArgb(113, 51, 154);
                break;

            case 10:
                interior = Color.FromArgb(77, 171, 200);
                break;

            case 11:
                interior = Color.FromArgb(245, 154, 64);
                break;

            case 12:
                interior = Color.FromArgb(90, 142, 206);
                break;
            }


            for (int i = 0; i < 14; ++i)
            {
                for (int j = 0; j < 3; ++j)
                {
                    sparkline[i, j].LineStyle.LineColor     = interior;
                    sparkline[i, j].ColumnStyle.ColumnColor = new Syncfusion.Drawing.BrushInfo(interior);
                }
            }
            this.gridControl1.Refresh();
        }