Example #1
0
        private void butBuildGraphics_Click(object sender, EventArgs e)
        {
            //var graphics = from CheckBox chb
            //			   in groupBox1.Controls
            //			   select chb.Name;

            var graphics = new List <string>();

            foreach (var chb in groupBox1.Controls)
            {
                if (chb is CheckBox && (chb as CheckBox).Checked)
                {
                    graphics.Add((chb as CheckBox).Name.Replace("chb", "S"));
                }
            }

            BuildGraphicsNeeded?.Invoke(sender, new GraphicsEventArgs(graphics.ToArray()));
        }
 private void butBuildGraphics_Click(object sender, EventArgs e)
 {
     BuildGraphicsNeeded?.Invoke(sender, new GraphicsEventArgs(GetCheckedGraphics()));
 }