private void m_btnSave_Click(object sender, EventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();

            dlg.Filter = "Base de test|*.basetestalrm|Tous fichiers|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                CBaseTypesAlarmes.Save(dlg.FileName);
            }
        }
Exemple #2
0
        //--------------------------------------
        public static CResultAErreur Load(string strFichier)
        {
            CBaseTypesAlarmes baseTemp = new CBaseTypesAlarmes();
            CResultAErreur    result   = CSerializerObjetInFile.ReadFromFile(baseTemp, c_strCleFichier, strFichier);

            if (result)
            {
                m_instance = baseTemp;
                CCurentBaseTypesAlarmes.SetCurrentBase(m_instance);
            }
            return(result);
        }
Exemple #3
0
        private void m_btnLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "Base de test|*.basetestalrm|Tous fichiers|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (CBaseTypesAlarmes.Load(dlg.FileName))
                {
                    InitArbre();
                }
            }
        }
Exemple #4
0
        private void InitArbre()
        {
            CTreeViewNodeKeeper keeper = new CTreeViewNodeKeeper(m_arbreAlarmes);
            CBaseTypesAlarmes   laBase = CBaseTypesAlarmes.Instance;

            m_arbreAlarmes.Nodes.Clear();
            foreach (ITypeAlarme type in from tp in laBase.TypesAlarmes where tp.TypeParent == null select tp)
            {
                TreeNode node = new TreeNode();
                FillNode(node, type);
                m_arbreAlarmes.Nodes.Add(node);
            }
            keeper.Apply(m_arbreAlarmes);
        }
        private void m_btnLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "Base de test|*.basetestalrm|Tous fichiers|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (CBaseTypesAlarmes.Load(dlg.FileName))
                {
                    m_panelSupervision.Init(
                        CSnmpConnexion.DefaultInstance,
                        CProjetMib.Instance.Mib.Tree.Root,
                        CBaseTypesAlarmes.Instance.BaseTraps,
                        CBaseTypesAlarmes.Instance);
                }
            }
        }