Beispiel #1
0
        private void m_btnAficherMasque_Click(object sender, EventArgs e)
        {
            CListeEntitesDeMemoryDb <CLocalCategorieMasquageAlarme> listeCategoriesMask = new CListeEntitesDeMemoryDb <CLocalCategorieMasquageAlarme>(m_dataBase);

            listeCategoriesMask.Sort = CLocalCategorieMasquageAlarme.c_champPriorite;
            CFiltreMemoryDb filtre = GetFiltreMasquage(null);

            CFormSelectNiveauMasquagePopup form = new CFormSelectNiveauMasquagePopup();

            form.Init(listeCategoriesMask.ToArray(), m_lastCategorieMasquage);
            form.Left = MousePosition.X;
            form.Top  = MousePosition.Y;
            DialogResult reponse = form.ShowDialog();

            switch (reponse)
            {
            case DialogResult.OK:
                m_lastCategorieMasquage = form.ElementSelectionne;
                filtre = GetFiltreMasquage(m_lastCategorieMasquage);
                m_btnAficherMasque.Text = m_lastCategorieMasquage.Libelle;
                break;

            case DialogResult.No:
                m_lastCategorieMasquage = null;
                filtre = GetFiltreMasquage(null);
                m_btnAficherMasque.Text = I.T("Masked Alarms|10312");
                break;

            case DialogResult.Cancel:
                return;

            default:
                return;
            }
            m_tableauAlarmesEnCours.FiltreAlarmes   = filtre;
            m_tableauAlarmesRetombees.FiltreAlarmes = filtre;
        }
        private void m_btnAficherMasque_Click(object sender, EventArgs e)
        {
            CListeEntitesDeMemoryDb <CLocalCategorieMasquageAlarme> listeCategoriesMask = new CListeEntitesDeMemoryDb <CLocalCategorieMasquageAlarme>(m_basePourVue.DataBase);

            listeCategoriesMask.Sort = CLocalCategorieMasquageAlarme.c_champPriorite;

            CFormSelectNiveauMasquagePopup form = new CFormSelectNiveauMasquagePopup();

            form.Init(listeCategoriesMask.ToArray(), m_lastCategorieSelectionnee);
            form.Left = MousePosition.X;
            form.Top  = MousePosition.Y;
            DialogResult reponse = form.ShowDialog();

            switch (reponse)
            {
            case DialogResult.OK:
                // Masquer jusqu'au niveau demandé
                m_lastCategorieSelectionnee = form.ElementSelectionne;
                m_btnAficherMasque.Text     = m_lastCategorieSelectionnee.Libelle;
                m_controleSchema.NiveauMasquageMaxAffiche = m_lastCategorieSelectionnee.Priorite;
                break;

            case DialogResult.No:
                // Masquer tout
                m_lastCategorieSelectionnee = null;
                m_btnAficherMasque.Text     = I.T("Masked Alarms|10312");
                m_controleSchema.NiveauMasquageMaxAffiche = 0;
                break;

            case DialogResult.Cancel:
                return;

            default:
                return;
            }
        }