//------------------------------------------------------------------------------ private void m_btnDeleteVariable_LinkClicked(object sender, EventArgs e) { List <ListViewItem> lstItems = new List <ListViewItem>(); foreach (ListViewItem item in m_wndListeVariables.SelectedItems) { lstItems.Add(item); } ; if (lstItems.Count > 0) { StringBuilder bl = new StringBuilder(); foreach (ListViewItem item in lstItems) { bl.Append(item.Text); bl.Append(","); } if (bl.Length > 0) { bl.Remove(bl.Length - 1, 1); } if (CFormAlerte.Afficher( I.T("Delete variable(s) @1|20039", bl.ToString()), EFormAlerteBoutons.OuiNon, EFormAlerteType.Question) == DialogResult.Yes) { foreach (ListViewItem item in lstItems) { m_elementAVariables.RemoveVariable(item.Tag as IVariableDynamique); m_wndListeVariables.Items.Remove(item); } } } }
//--------------------------------------------------------------------------- public void RemoveVariable(IVariableDynamique variable) { if (m_elementAVariablesExternes != null) { m_elementAVariablesExternes.RemoveVariable(variable); return; } m_listeVariables.Remove(variable as CVariableDynamique); }
//----------------------------------------------------------------------------- public void RemoveVariable(IVariableDynamique variable) { m_eltAVariables.RemoveVariable(variable); }