Exemple #1
0
        private void drawLinkLabel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            DlgPhotoDraw dlgPhotoDraw = new DlgPhotoDraw(m_wpt, m_photoDescr);

            if (DlgPhotoDraw.m_dlgSizeX < 100)
            {
                dlgPhotoDraw.Top  = drawLinkLabel.PointToScreen(new Point(0, 0)).Y - dlgPhotoDraw.Height;
                dlgPhotoDraw.Left = drawLinkLabel.PointToScreen(new Point(0, 0)).X + drawLinkLabel.Width;
            }

            dlgPhotoDraw.ShowDialog();
        }
        private void m_lnkelement_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            if (ListeRelations.Count == 0)
            {
                return;
            }
            CObjetDonneeAIdNumeriqueAuto objet = null;

            if (ListeRelations.Count > 1)
            {
                ArrayList lst = new ArrayList();
                foreach (CRelationEntreeAgenda_ElementAAgenda rel in ListeRelations)
                {
                    lst.Add(rel.ElementLie);
                }
                Point pt = m_lnkelement.PointToScreen(new Point(0, m_lnkelement.Height));
                objet = CFormLinksToElements.SelectObjet((CObjetDonneeAIdNumerique[])lst.ToArray(typeof(CObjetDonneeAIdNumerique)),
                                                         pt) as CObjetDonneeAIdNumeriqueAuto;
            }
            else
            {
                objet = ((CRelationEntreeAgenda_ElementAAgenda)ListeRelations[0]).ElementLie as CObjetDonneeAIdNumeriqueAuto;
            }
            if (objet != null)
            {
                //Type typeForm = CFormFinder.GetTypeFormToEdit(objet.GetType());
                //if ( typeForm == null || !typeForm.IsSubclassOf(typeof(CFormEditionStandard)))
                //{
                //    CFormAlerte.Afficher("Le système ne sait pas afficher les éléments du type "+m_typeRelation.TypeElementsConvivial, EFormAlerteType.Exclamation);
                //    return;
                //}
                //CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(typeForm, new object[]{objet});
                //CSc2iWin32DataNavigation.Navigateur.AffichePage ( form );
                CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(objet.GetType());
                if (refTypeForm == null)
                {
                    CFormAlerte.Afficher(I.T("The system cannot display elements from type @1|30120", m_typeRelation.TypeElementsConvivial), EFormAlerteType.Exclamation);
                    return;
                }
                else
                {
                    CFormEditionStandard form = refTypeForm.GetForm(objet) as CFormEditionStandard;
                    if (form != null)
                    {
                        CSc2iWin32DataNavigation.Navigateur.AffichePage(form);
                    }
                }
            }
        }
Exemple #3
0
 private void detailLinkLabel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
 {
     photoPropertiesPopup.Top  = detailLinkLabel.PointToScreen(new Point(0, 0)).Y + 30;
     photoPropertiesPopup.Left = detailLinkLabel.PointToScreen(new Point(0, 0)).X + detailLinkLabel.Width - photoPropertiesPopup.Width;
     photoPropertiesPopup.Show();
 }