void properties_Click(object sender, EventArgs e) { UserControl button = (UserControl)((ToolStripMenuItem)sender).Tag; ControlMap map = (ControlMap)button.Tag; ButtonProperties props = new ButtonProperties(); props.ButtonMap = map; if (props.ShowDialog() == System.Windows.Forms.DialogResult.OK) { CleanupButton(button); AddButton(map); buttonGroup.Dirty = true; } }
private void Plus_Click(object sender, EventArgs e) { ControlMap map = new ControlMap(); ButtonProperties props = new ButtonProperties(); props.ButtonMap = map; if (props.ShowDialog() == System.Windows.Forms.DialogResult.OK) { buttonGroup.Add(map); Point pnt = FindFirstFreeSpot(new Size(140, 33)); map.X = pnt.X; map.Y = pnt.Y; AddButton(map); buttonGroup.Dirty = true; } }
private void Plus_Click(object sender, EventArgs e) { ControlMap map = new ControlMap(); ButtonProperties props = new ButtonProperties(); props.ButtonMap = map; if (props.ShowDialog() == System.Windows.Forms.DialogResult.OK) { buttonGroup.Add(map); Point pnt = FindFirstFreeSpot(new Size(140,33)); map.X = pnt.X; map.Y = pnt.Y; AddButton(map); buttonGroup.Dirty = true; } }