//------------------------------------------------------------------- private void snmpFieldToolStripMenuItem_Click(object sender, EventArgs e) { CChampEntiteFromQuery champ = new CChampEntiteFromQuery(); if (CFormEditChampEntiteFromQuery.EditeChamp(champ, m_typeEntite)) { m_typeEntite.AddChamp(champ); FillListeChamps(); } }
//------------------------------------------------------------------- private void standardField20086ToolStripMenuItem_Click(object sender, EventArgs e) { if (m_wndListeChamps.SelectedItems.Count == 1) { CChampEntiteFromQuery champ = m_wndListeChamps.SelectedItems[0] as CChampEntiteFromQuery; if (champ != null) { m_typeEntite.RemoveChamp(champ); FillListeChamps(); } } }
//------------------------------------------------------------------- private void m_wndListeChamps_DoubleClick(object sender, EventArgs e) { if (m_wndListeChamps.SelectedItems.Count == 1) { CChampEntiteFromQuery champ = m_wndListeChamps.SelectedItems[0] as CChampEntiteFromQuery; if (champ != null) { if (CFormEditChampEntiteFromQuery.EditeChamp(champ, m_typeEntite)) { FillListeChamps(); } } } }
//-------------------------------------- public static bool EditeChamp(CChampEntiteFromQuery champ, CTypeEntiteSnmpPourSupervision typeEntite) { CFormEditChampEntiteFromQuery form = new CFormEditChampEntiteFromQuery(); form.m_champEdite = champ; form.m_typeEntite = CCloner2iSerializable.Clone(typeEntite) as CTypeEntiteSnmpPourSupervision; bool bResult = false; if (form.ShowDialog() == DialogResult.OK) { bResult = true; CCloner2iSerializable.CopieTo(form.m_typeEntite, typeEntite); } form.Dispose(); return(bResult); }