private void buttonDelete_Click(object sender, EventArgs e) { GCConfigRatedMargin sel = SelectedSubevent; if (sel != null) { AskDeleteObject d = new AskDeleteObject(); d.InitialLabel = "Delete rated subevent?"; d.DetailLabel = sel.Title; d.Tag = sel; d.OnButtonYes += new TBButtonPressed(d_OnButtonYes); AskDeleteObjectController dc = new AskDeleteObjectController(d); dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Center); } }
/// <summary> /// Delete Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button3_Click(object sender, EventArgs e) { GCListBoxEntry item = GetSelectedItem(); if (item != null && item.Tag != null && Controller.ViewContainer != null) { AskDeleteObject dlg = new AskDeleteObject(); AskDeleteObjectController dlgCtrl = new AskDeleteObjectController(dlg); dlg.Tag = item.Tag; dlg.InitialLabel = "Are you sure to remove following event?"; dlg.DetailLabel = (item.Tag as GCFestivalBase).Text; dlg.OnButtonYes += new TBButtonPressed(onDeleteEvent); dlgCtrl.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill); } }
private void toolStripButtonDelete_Click(object sender, EventArgs e) { if (GCConfigRatedManager.Configurations.Count < 2) { return; } GCConfigRatedEvents ev = SelectedTemplateConfig; if (ev != null) { // ask for confirmation AskDeleteObject d = new AskDeleteObject(); d.InitialLabel = "Are you sure to delete following configuration?"; d.DetailLabel = ev.Title; d.OnButtonYes += new TBButtonPressed(onDeleteConfigTemplateYes); d.Tag = ev; AskDeleteObjectController dc = new AskDeleteObjectController(d); dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill); } }
/// <summary> /// User interface handler for DELETE related event button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonDelete_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex >= 0 && listBox1.SelectedIndex < listBox1.Items.Count) { GCListBoxEntry lbe = listBox1.Items[listBox1.SelectedIndex] as GCListBoxEntry; if (lbe != null && lbe.Tag != null) { AskDeleteObject d = new AskDeleteObject(); d.Tag = lbe.Tag; d.InitialLabel = "Are you sure to remove following event?"; d.DetailLabel = (lbe.Tag as GCFestivalBase).Text; AskDeleteObjectController dc = new AskDeleteObjectController(d); d.OnButtonYes += new TBButtonPressed(askDeleteEvent1_OnButtonYes); if (ViewContainer != null) { ViewContainer.AddControl(dc, GVControlAlign.Fill); } } } }