Пример #1
0
        private void button_AddBadgeBox_Click(object sender, EventArgs e)
        {
            BadgeBox newBadgeBox = new BadgeBox();

            using (BadgeBoxEditForm dialog = new BadgeBoxEditForm())
            {
                dialog.Initialize(newBadgeBox, _context);
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    _badgeBoxes.Add(newBadgeBox);
                    badgeListControl.Refresh();
                }
            }
        }
Пример #2
0
        private void button_EditBadgeBox_Click(object sender, EventArgs e)
        {
            BadgeBox selected = SelectedBadgeBox;

            if (selected != null)
            {
                using (BadgeBoxEditForm dialog = new BadgeBoxEditForm())
                {
                    dialog.Initialize(selected, _context);
                    if (dialog.ShowDialog(this) == DialogResult.OK)
                    {
                        badgeListControl.Refresh();
                    }
                }
            }
        }