private void m_lnkAddType_LinkClicked(object sender, EventArgs e) { CTestTypeAlarme type = new CTestTypeAlarme(); if (CFormEditeTypeAlarme.EditeTypeAlarme(type)) { CBaseTypesAlarmes.Instance.AddTypeAlarme(type); InitArbre(); } }
private void m_arbreAlarmes_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node != null && e.Node.Tag is ITypeAlarme) { CTestTypeAlarme type = e.Node.Tag as CTestTypeAlarme; if (type != null) { if (CFormEditeTypeAlarme.EditeTypeAlarme(type)) { FillNode(e.Node, type); } } } }
public static bool EditeTypeAlarme(ITypeAlarme type) { CFormEditeTypeAlarme form = new CFormEditeTypeAlarme(); form.m_typeAlarme = type; bool bResult = false; if (form.ShowDialog() == DialogResult.OK) { bResult = true; } form.Dispose(); return(bResult); }