Esempio n. 1
0
 private void C2iSelectImage_MouseUp(object sender, MouseEventArgs e)
 {
     if (m_bLockEdition)
     {
         return;
     }
     if (e.Button == MouseButtons.Left)
     {
         string         strFiltre = I.T("Image file|*.bmp;*.gif;*.ico;*.jpg;.tif;*.png|All files|*.*|20000");
         OpenFileDialog dlg       = new OpenFileDialog();
         dlg.Filter = strFiltre;
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             try
             {
                 Image img = Image.FromFile(dlg.FileName);
                 this.Image = img;
             }
             catch (Exception ex)
             {
                 CResultAErreur result = CResultAErreur.True;
                 result.EmpileErreur(new CErreurException(ex));
                 CFormAlerte.Afficher(result.Erreur);
             }
         }
     }
     else
     {
         Image = null;
     }
 }
Esempio n. 2
0
 private void m_btnOk_Click(object sender, System.EventArgs e)
 {
     if (m_cmbOperation.SelectedValue == null)
     {
         CFormAlerte.Afficher(I.T("Select an operation|30019"), EFormAlerteType.Exclamation);
         return;
     }
     m_cumul.PrefixFinal = m_txtPrefix.Text;
     m_cumul.TypeCumul   = (TypeCumulCroise)m_cmbOperation.SelectedValue;
     m_cumul.HorsPivot   = m_chkHorsPivot.Checked;
     DialogResult        = DialogResult.OK;
     Close();
 }
Esempio n. 3
0
 /// //////////////////////////////////////////
 private void m_btnDeleteCumul_Click(object sender, System.EventArgs e)
 {
     if (m_wndListeCumuls.SelectedItems.Count == 1)
     {
         ListViewItem item  = m_wndListeCumuls.SelectedItems[0];
         CCumulCroise cumul = (CCumulCroise)item.Tag;
         if (CFormAlerte.Afficher(I.T("Remove cumulated data on @1 ?|30002", cumul.NomChamp),
                                  EFormAlerteType.Question) == DialogResult.Yes)
         {
             m_tableauCroise.RemoveCumul(cumul);
             InitChamps(m_tableSource, m_tableauCroise);
         }
     }
 }
Esempio n. 4
0
 /// //////////////////////////////////////////
 private void m_btnDeletePivot_Click(object sender, System.EventArgs e)
 {
     if (m_wndListeColonnes.SelectedItems.Count == 1)
     {
         ListViewItem   item    = m_wndListeColonnes.SelectedItems[0];
         CColonneePivot colonne = (CColonneePivot)item.Tag;
         if (CFormAlerte.Afficher(I.T("Do not use the column @1 as a pivot column|30001", colonne.NomChamp),
                                  EFormAlerteType.Question) == DialogResult.Yes)
         {
             m_tableauCroise.RemoveChampColonne(colonne);
             InitChamps(m_tableSource, m_tableauCroise);
         }
     }
 }
Esempio n. 5
0
 //-------------------------------------------------------------------------
 void m_tabControl_SelectionChanged(object sender, EventArgs e)
 {
     if (DesignMode)
     {
         return;
     }
     if (m_tabControl == null)
     {
         return;
     }
     if (!m_pagesInitialisees.ContainsKey(m_tabControl.SelectedTab) ||
         !m_pagesInitialisees[m_tabControl.SelectedTab])
     {
         CResultAErreur result = InitPage(m_tabControl.SelectedTab);
         if (!result)
         {
             CFormAlerte.Afficher(result);
         }
     }
 }