Exemplo n.º 1
0
        public void ShowDialogMessageBox()
        {
            EFormAlerteBoutons boutons    = EFormAlerteBoutons.Ok;
            EFormAlerteType    typeAlerte = EFormAlerteType.Exclamation;

            switch (m_action.TypeBox)
            {
            case CActionMessageBox.TypeMessageBox.OK:
                boutons = EFormAlerteBoutons.Ok;
                break;

            case CActionMessageBox.TypeMessageBox.OuiNon:
                typeAlerte = EFormAlerteType.Question;
                boutons    = EFormAlerteBoutons.OuiNon;
                break;

            case CActionMessageBox.TypeMessageBox.OKAnnuler:
                boutons = EFormAlerteBoutons.OkAbandonner;
                break;
            }
            DialogResult dResult = DialogResult.OK;

            CTimosApp.Navigateur.Invoke((MethodInvoker) delegate
            {
                dResult = CFormAlerte.Afficher(m_action.MessageToDisplay, boutons, typeAlerte, m_action.SecondesMaxiAffichage, CTimosApp.Navigateur);
            });
            m_result.Data = C2iDialogResult.Get2iDialogResultFromDialogResult(dResult);
        }
Exemplo n.º 2
0
 private void Initialiser(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone)
 {
     m_icone       = icone;
     m_bitmap      = null;
     m_btns        = boutons;
     Message       = strMess;
     m_bIsErrorBox = false;
     ActualForme();
 }
Exemplo n.º 3
0
 private void Initialiser(List <IErreur> erreurs, EFormAlerteBoutons boutons, EFormAlerteType icone)
 {
     m_btns  = boutons;
     m_icone = icone;
     m_ctrlErreurs.Initialiser(erreurs);
     m_tt.SetToolTip(m_ctrlErreurs, m_ctrlErreurs.Erreurs.Count + I.T("Errors...|126"));
     m_bIsErrorBox = true;
     ActualForme();
 }
Exemplo n.º 4
0
        private void Initialiser(IErreur[] erreurs, EFormAlerteBoutons boutons, EFormAlerteType icone)
        {
            List <IErreur> lst = new List <IErreur>();

            foreach (IErreur err in erreurs)
            {
                lst.Add(err);
            }
            Initialiser(lst, boutons, icone);
        }
Exemplo n.º 5
0
        private void Initialiser(string strMess, EFormAlerteType typeAlerte)
        {
            switch (typeAlerte)
            {
            case EFormAlerteType.Question:
                Initialiser(strMess, EFormAlerteBoutons.OuiNon, EFormAlerteType.Question);
                break;

            case EFormAlerteType.Erreur:
                Initialiser(strMess, EFormAlerteBoutons.Ok, EFormAlerteType.Erreur);
                break;

            case EFormAlerteType.Exclamation:
                Initialiser(strMess, EFormAlerteBoutons.Ok, EFormAlerteType.Exclamation);
                break;

            case EFormAlerteType.Info:
            default:
                Initialiser(strMess, EFormAlerteBoutons.Ok, EFormAlerteType.Info);
                break;
            }
        }
Exemplo n.º 6
0
 public CFormAlerte(List <IErreur> erreurs, EFormAlerteBoutons boutons, EFormAlerteType icone)
 {
     InitializeComponent();
     Initialiser(erreurs, boutons, icone);
 }
Exemplo n.º 7
0
 public CFormAlerte(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone, int nSecondesMaxiAffichage)
 {
     InitializeComponent();
     Initialiser(strMess, boutons, icone);
     m_nSecondesMaxiAffichage = nSecondesMaxiAffichage;
 }
Exemplo n.º 8
0
 public CFormAlerte(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone)
 {
     InitializeComponent();
     Initialiser(strMess, boutons, icone);
 }
Exemplo n.º 9
0
 public CFormAlerte(string strMess, EFormAlerteType typeAlerte)
 {
     InitializeComponent();
     Initialiser(strMess, typeAlerte);
 }
Exemplo n.º 10
0
        public static DialogResult Afficher(List <IErreur> erreurs, EFormAlerteBoutons boutons, EFormAlerteType icone)
        {
            CFormAlerte frm = new CFormAlerte(erreurs, boutons, icone);

            return(frm.ShowDialog());
        }
Exemplo n.º 11
0
        public static DialogResult Afficher(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone, int nSecondesMaxAffichage, Form owner)
        {
            CFormAlerte frm = new CFormAlerte(strMess, boutons, icone, nSecondesMaxAffichage);

            //frm.Owner = owner;
            return(frm.ShowDialog(owner));
        }
Exemplo n.º 12
0
 public static DialogResult Afficher(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone, int nSecondesMaxAffichage)
 {
     return(Afficher(strMess, boutons, icone, nSecondesMaxAffichage, null));
 }
Exemplo n.º 13
0
        public static DialogResult Afficher(string strMess, EFormAlerteBoutons boutons, EFormAlerteType icone)
        {
            CFormAlerte frm = new CFormAlerte(strMess, boutons, icone);

            return(frm.ShowDialog());
        }
Exemplo n.º 14
0
        public static DialogResult Afficher(string strMess, EFormAlerteType typeAlerte)
        {
            CFormAlerte frm = new CFormAlerte(strMess, typeAlerte);

            return(frm.ShowDialog());
        }