Пример #1
0
        public void AddSetupRow(string setupId, string buttonName, Form form, Bitmap buttonImage = null)
        {
            var button = new SetupButton(setupId, buttonName, buttonImage);

            button.Click += delegate
            {
                form.ShowDialog();
            };
            flowSetup.Controls.Add(button);
        }
Пример #2
0
        public void AddSetupRow(string setupId, string buttonName, Type formType, Bitmap buttonImage = null)
        {
            var button = new SetupButton(setupId, buttonName, buttonImage);
            var form   = (Form)Activator.CreateInstance(formType);

            button.Click += delegate
            {
                form.ShowDialog();
            };
            flowSetup.Controls.Add(button);
        }