Example #1
0
 //-------------------------------------------------------------------------
 private void ShowObjet(object obj)
 {
     if (!(obj is CObjetDonnee))
     {
         CFormAlerte.Afficher(I.T("Not available|917"), EFormAlerteType.Exclamation);
     }
     else
     {
         //Type typeForm = CFormFinder.GetTypeFormToEdit(obj.GetType());
         //if ( typeForm == null || !typeForm.IsSubclassOf(typeof(CFormEditionStandard)))
         //{
         //    CFormAlerte.Afficher("Non disponible", EFormAlerteType.Exclamation);
         //    return;
         //}
         //CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(typeForm, new object[]{obj});
         //CSc2iWin32DataNavigation.Navigateur.AffichePage ( form );
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(obj.GetType());
         if (refTypeForm == null)
         {
             CFormAlerte.Afficher(I.T("No available Form|30229"), EFormAlerteType.Exclamation);
             return;
         }
         CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)obj) as CFormEditionStandard;
         if (form != null)
         {
             CSc2iWin32DataNavigation.Navigateur.AffichePage(form);
         }
     }
 }
Example #2
0
 //------------------------------------------------------------------------------------------
 static void CControlListeForFormulaire_AfficheEntiteFromListeForFormulaire(object entite)
 {
     try
     {
         if (!(entite is CObjetDonnee))
         {
             return;
         }
         //Type typeForm = CFormFinder.GetTypeFormToEdit(entite.GetType());
         //if (typeof(CFormEditionStandard).IsAssignableFrom ( typeForm))
         //{
         //    CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(typeForm, (CObjetDonnee)entite);
         //    CTimosApp.Navigateur.AffichePage(form);
         //}
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(entite.GetType());
         if (refTypeForm != null)
         {
             CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)entite) as CFormEditionStandard;
             if (form != null)
             {
                 CTimosApp.Navigateur.AffichePage(form);
             }
         }
     }
     catch
     {
     }
 }
Example #3
0
        //-------------------------------------------------------------------
        private CResultAErreur EditerObjetNomme(CObjetDonnee objet)
        {
            CResultAErreur result = CResultAErreur.True;

            CNommageEntite nommage = objet as CNommageEntite;

            if (nommage != null)
            {
                CObjetDonneeAIdNumerique objetNomme = nommage.GetObjetNomme();
                if (objetNomme != null)
                {
                    CReferenceTypeForm refForm = CFormFinder.GetRefFormToEdit(objetNomme.GetType());
                    if (refForm != null)
                    {
                        IFormNavigable form = refForm.GetForm((CObjetDonneeAIdNumeriqueAuto)objetNomme) as IFormNavigable;
                        if (form != null)
                        {
                            CTimosApp.Navigateur.AffichePage(form);
                        }
                    }
                }
            }

            return(result);
        }
        private void EditeElement()
        {
            CReferenceTypeForm refTypeForm = null;

            if (m_strCodeFormulaire != string.Empty)
            {
                refTypeForm = CFormFinder.GetRefFormToEdit(m_objetToEdit.GetType(), m_strCodeFormulaire);
            }
            else
            {
                refTypeForm = CFormFinder.GetRefFormToEdit(m_objetToEdit.GetType());
            }

            if (refTypeForm == null)
            {
                m_resultEdit.EmpileErreur(I.T("The system is not able to edit elements from type @1|1076", m_objetToEdit.GetType().ToString()));
                return;
            }

            try
            {
                CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)m_objetToEdit) as CFormEditionStandard;
                if (form != null)
                {
                    CFormNavigateurPopup.Show(form);
                }
            }
            catch (Exception e)
            {
                m_resultEdit.EmpileErreur(new CErreurException(e));
            }
        }
Example #5
0
        //-----------------------------------------------------
        void item_Click(object sender, EventArgs e)
        {
            CMenuItemARefObj item = sender as CMenuItemARefObj;

            if (item != null)
            {
                if (item.FonctionDelete)
                {
                    ListeObjets.Remove(item.ReferenceObjet);
                    UpdateLook();
                    Save();
                }
                else
                {
                    CObjetDonneeAIdNumeriqueAuto obj = item.ReferenceObjet.ReferenceObjet.GetObjet(CSc2iWin32DataClient.ContexteCourant) as CObjetDonneeAIdNumeriqueAuto;
                    if (obj != null)
                    {
                        CReferenceTypeForm refForm = CFormFinder.GetRefFormToEdit(obj.GetType());
                        if (refForm != null)
                        {
                            IFormNavigable frm = refForm.GetForm(obj) as IFormNavigable;
                            if (frm != null)
                            {
                                CTimosApp.Navigateur.AffichePage(frm);
                                return;
                            }
                        }
                    }
                }
            }
        }
Example #6
0
 //------------------------- OLD ----------------------------
 private void m_lnkElementAIntervention_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (Intervention.ElementAIntervention != null)
     {
         //Type tpForm = CFormFinder.GetTypeFormToEdit(Intervention.ElementAIntervention.GetType());
         //if (tpForm != null && typeof(CFormEditionStandard).IsAssignableFrom(tpForm))
         //{
         //    CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(tpForm, new object[] { Intervention.ElementAIntervention });
         //    CTimosApp.Navigateur.AffichePage(form);
         //    return;
         //}
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(Intervention.ElementAIntervention.GetType());
         if (refTypeForm != null)
         {
             CFormEditionStandard form = refTypeForm.GetForm(Intervention.ElementAIntervention as CObjetDonneeAIdNumeriqueAuto) as CFormEditionStandard;
             if (form != null)
             {
                 CTimosApp.Navigateur.AffichePage(form);
             }
         }
     }
     else
     {
         ChangerElement();
     }
 }
Example #7
0
        //-------------------------------------------------------------------------
        private void InitComboComportements()
        {
            CReferenceTypeFormBuiltIn refForm = CFormFinder.GetRefFormToEdit(typeof(CComportementGenerique)) as CReferenceTypeFormBuiltIn;

            if (m_cmbTypeElements.SelectedValue is Type)
            {
                m_cmbComportement.Init(
                    typeof(CComportementGenerique),
                    new CFiltreData(CComportementGenerique.c_champTypeElementCible + "=@1",
                                    m_cmbTypeElements.SelectedValue.ToString()),
                    "Libelle",
                    refForm != null?refForm.TypeForm:null,
                    true);
            }
            else
            {
                m_cmbComportement.Init(
                    typeof(CComportementGenerique),
                    new CFiltreDataImpossible(),
                    "Libelle",
                    refForm != null ? refForm.TypeForm : null,
                    true);
                m_cmbComportement.AssureRemplissage();
            }
        }
Example #8
0
 //-------------------------------------------------------------------------------------
 private void m_arbre_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node != null && e.Node.Tag is CRessourceMaterielle)
     {
         if (m_handlerSetRessource != null)
         {
             m_handlerSetRessource(this, (CRessourceMaterielle)e.Node.Tag);
         }
         else
         {
             //Type typeForm = CFormFinder.GetTypeFormToEdit(typeof(CRessourceMaterielle));
             //if (typeForm != null && typeof(CFormEditionStandard).IsAssignableFrom(typeForm))
             //{
             //    CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(typeForm, e.Node.Tag);
             //    CSc2iWin32DataNavigation.Navigateur.AffichePage(form);
             //}
             CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CRessourceMaterielle));
             if (refTypeForm != null)
             {
                 CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)e.Node.Tag) as CFormEditionStandard;
                 if (form != null)
                 {
                     CSc2iWin32DataNavigation.Navigateur.AffichePage(form);
                 }
             }
         }
         Hide();
     }
 }
Example #9
0
        protected CResultAErreur TraiterEditionPanel(CObjetDonnee objet)
        {
            CResultAErreur result = CResultAErreur.True;
            CContexteEvaluationExpression ctxEval  = CUtilControlesWnd.GetContexteEval(this, objet);
            C2iWndListeSpeedStandard      listeStd = this.WndAssociee as C2iWndListeSpeedStandard;

            if (listeStd != null)
            {
                C2iExpression formule = listeStd.AlternativeEditedElement;
                result = formule.Eval(ctxEval);
                if (!result)
                {
                    return(result);
                }
                CObjetDonneeAIdNumeriqueAuto objetToEdit = result.Data as CObjetDonneeAIdNumeriqueAuto;
                if (objetToEdit != null)
                {
                    CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(objetToEdit.GetType());
                    IFormNavigable     frmToShow   = refTypeForm.GetForm(objetToEdit) as IFormNavigable;
                    IFormNavigable     frm         = m_panelListeSpeedStd.FindForm() as IFormNavigable;
                    if (frm != null)
                    {
                        frm.Navigateur.AffichePage(frmToShow);
                    }
                    else
                    {
                        CFormNavigateurPopup.Show(frmToShow);
                    }
                }
                return(result);
            }
            return(result);
        }
Example #10
0
 //---------------------------------------------------
 private void EditeIntervention(CIntervention intervention)
 {
     if (intervention != null)
     {
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CIntervention));
         if (refTypeForm != null)
         {
             CFormEditionStandard frm = refTypeForm.GetForm(intervention) as CFormEditionStandard;
             if (frm != null)
             {
                 if (m_gestionnaireModeEdition.ModeEdition)
                 {
                     CFormNavigateurPopup.Show(frm, FormWindowState.Maximized);
                 }
                 else
                 {
                     sc2i.win32.navigation.IFormNavigable thisFrm = FindForm() as sc2i.win32.navigation.IFormNavigable;
                     if (thisFrm != null && thisFrm.Navigateur != null)
                     {
                         thisFrm.Navigateur.AffichePage(frm);
                     }
                     else
                     {
                         CFormMain.GetInstance().AffichePage(frm);
                     }
                 }
             }
         }
         FillListeInterventionsAPlanifier();
         m_controlePlanning.Refresh();
     }
 }
        private void EditeElement()
        {
            CObjetDonneeAIdNumeriqueAuto objet = null;

            bool            bIsNewContexte = false;
            CContexteDonnee contexteDonnee = CSc2iWin32DataClient.ContexteCourant;

            if (m_parametreEdition.IdVersionAForcer != contexteDonnee.IdVersionDeTravail)
            {
                contexteDonnee = (CContexteDonnee)CSc2iWin32DataClient.ContexteCourant.Clone();// GetNewContexteDonneeInSameThread(m_parametreEdition.IdSession, true);
                contexteDonnee.SetEnableAutoStructure(true);
                contexteDonnee.SetVersionDeTravail(m_parametreEdition.IdVersionAForcer, false);
                bIsNewContexte = true;
            }
            objet = m_parametreEdition.ReferenceObjet.GetObjet(contexteDonnee) as CObjetDonneeAIdNumeriqueAuto;
            if (objet == null)
            {
                m_resultEdit.EmpileErreur(I.T("The object to edit doesn't exist|1078"));
                return;
            }

            CReferenceTypeForm refTypeForm = null;

            if (m_strCodeFormulaire != string.Empty)
            {
                refTypeForm = CFormFinder.GetRefFormToEdit(objet.GetType(), m_strCodeFormulaire);
            }
            else
            {
                refTypeForm = CFormFinder.GetRefFormToEdit(objet.GetType());
            }

            if (refTypeForm == null)
            {
                m_resultEdit.EmpileErreur(I.T("The system is not able to edit elements from type @1|1076", m_parametreEdition.GetType().ToString()));
                return;
            }

            try
            {
                CFormEditionStandard form = refTypeForm.GetForm(objet) as CFormEditionStandard;
                if (form != null)
                {
                    CFormNavigateurPopup.Show(form);//, CTimosApp.Navigateur);
                }
            }
            catch (Exception e)
            {
                m_resultEdit.EmpileErreur(new CErreurException(e));
            }
            finally
            {
                if (bIsNewContexte)
                {
                    contexteDonnee.Dispose();
                    contexteDonnee = null;
                }
            }
        }
        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);
                    }
                }
            }
        }
Example #13
0
 private void m_lnkElement_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (m_elementForGED != null)
     {
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(m_elementForGED.GetType());
         if (refTypeForm != null)
         {
             CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)m_elementForGED) as CFormEditionStandard;
             if (form != null)
             {
                 CTimosApp.Navigateur.AffichePage(form);
             }
         }
     }
 }
Example #14
0
 private void m_lnkTicket_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (m_intervention.PhaseTicket != null)
     {
         CReferenceTypeForm rTypeForm = CFormFinder.GetRefFormToEdit(typeof(CTicket));
         if (rTypeForm != null)
         {
             IFormNavigable form = rTypeForm.GetForm(m_intervention.PhaseTicket.Ticket) as IFormNavigable;
             if (form != null)
             {
                 CTimosApp.Navigateur.AffichePage(form);
             }
         }
     }
 }
        private void m_lnkElementGere_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            IObjetSPVAvecObjetTimos obj = m_AlarmInfo.GetElementGere(m_ctxDonnee) as IObjetSPVAvecObjetTimos;

            if (obj != null)
            {
                CObjetDonneeAIdNumeriqueAuto objTimos = obj.ObjetTimosSansGenerique as CObjetDonneeAIdNumeriqueAuto;
                if (objTimos != null)
                {
                    CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(objTimos.GetType());
                    if (refTypeForm != null)
                    {
                        IFormNavigable frm = refTypeForm.GetForm(objTimos) as IFormNavigable;
                        Navigateur.AffichePage(frm);
                    }
                }
            }
        }
Example #16
0
        void m_panelModulesParametrage_OnListElementsItemDoubleClick(object sender, EventArgs e)
        {
            // Affiche l'élement dans Timos
            CObjetDonneeAIdNumerique element = sender as CObjetDonneeAIdNumerique;

            if (element != null)
            {
                CReferenceTypeForm referenceForm = CFormFinder.GetRefFormToEdit(element.GetType());
                if (referenceForm != null)
                {
                    IFormNavigable form = referenceForm.GetForm((CObjetDonneeAIdNumeriqueAuto)element) as IFormNavigable;
                    if (form != null)
                    {
                        CTimosApp.Navigateur.AffichePage(form);
                    }
                }
            }
        }
        public override object Invoke(object objetAppelle, params object[] parametres)
        {
            if (parametres.Length < 1)
            {
                return(false);
            }
            CObjetDonneeAIdNumeriqueAuto objet = parametres[0] as CObjetDonneeAIdNumeriqueAuto;

            if (objet == null)
            {
                return(false);
            }
            objet = objet.GetObjetInContexte(CSc2iWin32DataClient.ContexteCourant) as CObjetDonneeAIdNumeriqueAuto;
            if (objet == null)
            {
                return(false);
            }
            CReferenceTypeForm refForm = null;
            string             strCode = null;

            if (parametres.Length > 1)
            {
                strCode = parametres[1] as string;
            }
            if (strCode == null || strCode.Length == 0)
            {
                refForm = CFormFinder.GetRefFormToEdit(objet.GetType());
            }
            else
            {
                refForm = CFormFinder.GetRefFormToEdit(objet.GetType(), strCode);
            }

            if (refForm != null)
            {
                CFormEditionStandard frm = refForm.GetForm(objet) as CFormEditionStandard;
                if (frm != null)
                {
                    CTimosApp.Navigateur.AffichePage(frm);
                    return(true);
                }
            }
            return(false);
        }
        //----------------------------------------------------------------------
        private void AfficherTicket(CTicket tkt)
        {
            //Type t = CFormFinder.GetTypeFormToEdit(tkt.GetType());
            //if (typeof(IFormNavigable).IsAssignableFrom(t))
            //{
            //    IFormNavigable iformnav = (IFormNavigable)Activator.CreateInstance(t, new object[] { tkt });
            //    CTimosApp.Navigateur.AffichePage(iformnav);
            //}
            CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(tkt.GetType());

            if (refTypeForm != null)
            {
                IFormNavigable iformnav = refTypeForm.GetForm(tkt) as IFormNavigable;
                if (iformnav != null)
                {
                    CTimosApp.Navigateur.AffichePage(iformnav);
                }
            }
        }
Example #19
0
        private void m_lnkNomIntervenant_LinkClicked(object sender, EventArgs e)
        {
            //Type t = CFormFinder.GetTypeFormToEdit(typeof(CActeur));
            //if (typeof(IFormNavigable).IsAssignableFrom(t))
            //{
            //    IFormNavigable iformnav = (IFormNavigable)Activator.CreateInstance(t, new object[] { m_acteur });
            //    CTimosApp.Navigateur.AffichePage(iformnav);
            //}
            CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CActeur));

            if (refTypeForm != null)
            {
                IFormNavigable iformnav = refTypeForm.GetForm(m_acteur) as IFormNavigable;
                if (iformnav != null)
                {
                    CTimosApp.Navigateur.AffichePage(iformnav);
                }
            }
        }
Example #20
0
        private void m_wndListeComportements_DoubleClick(object sender, System.EventArgs e)
        {
            Point pt = Cursor.Position;

            pt = m_wndListeComportements.PointToClient(pt);
            if (m_wndListeComportements.SelectedItems.Count == 1)
            {
                CComportementGenerique comportement = (CComportementGenerique)m_wndListeComportements.SelectedItems[0];
                CReferenceTypeForm     refForm      = CFormFinder.GetRefFormToEdit(typeof(CComportementGenerique));
                if (refForm != null)
                {
                    CFormEditionStandard form = refForm.GetForm(comportement) as CFormEditionStandard;
                    if (form != null)
                    {
                        CSc2iWin32DataNavigation.Navigateur.AffichePage(form);
                    }
                }
            }
        }
Example #21
0
        //-------------------------------------------------------------------------
        private void InitPanelEvenements()
        {
            CReferenceTypeFormBuiltIn refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CEvenement)) as CReferenceTypeFormBuiltIn;

            m_panelEvenements.InitFromListeObjets(
                m_definisseur.Evenements,
                typeof(CEvenement),
                refTypeForm != null ? refTypeForm.TypeForm : null,
                null,
                null);

            //S'il n'y a de navigateur, tout se passe en popup
            if (CFormNavigateurPopup.FindNavigateur(this) == null)
            {
                m_gestionnaireModeEdition.SetModeEdition(m_panelEvenements, TypeModeEdition.EnableSurEdition);
                m_panelEvenements.LockEdition                = !m_gestionnaireModeEdition.ModeEdition;
                m_panelEvenements.AjouterElement             = new CPanelListeSpeedStandard.AjouterElementDelegate(CreeEvenementPopup);
                m_panelEvenements.TraiterModificationElement = new CPanelListeSpeedStandard.ModifierElementDelegate(EditeEvenementPopup);
            }
        }
        public static void NaviguerVersObjetACoordonnee(IObjetACoordonnees obj)
        {
            Type t = typeof(string);

            CReferenceTypeForm refTypeForm = null;

            if (obj is CEntiteOrganisationnelle)
            {
                //t = CFormFinder.GetTypeFormToEdit(typeof(CEntiteOrganisationnelle));
                refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CEntiteOrganisationnelle));
            }
            else if (obj is CSite)
            {
                //t = CFormFinder.GetTypeFormToEdit(typeof(CSite));
                refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CSite));
            }
            else if (obj is CStock)
            {
                //t = CFormFinder.GetTypeFormToEdit(typeof(CStock));
                refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CStock));
            }
            else if (obj is CEquipement)
            {
                //t = CFormFinder.GetTypeFormToEdit(typeof(CEquipement));
                refTypeForm = CFormFinder.GetRefFormToEdit(typeof(CEquipement));
            }

            //if (typeof(IFormNavigable).IsAssignableFrom(t))
            //{
            //    IFormNavigable iformnav = (IFormNavigable)Activator.CreateInstance(t, new object[] { obj });
            //    CTimosApp.Navigateur.AffichePage(iformnav);
            //}
            if (refTypeForm != null)
            {
                IFormNavigable iformnav = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)obj) as IFormNavigable;
                if (iformnav != null)
                {
                    CTimosApp.Navigateur.AffichePage(iformnav);
                }
            }
        }
Example #23
0
        //-----------------------------------------------------------------------------------------------------
        private void m_menuAfficheDetailEtape_Click(object sender, EventArgs e)
        {
            CEtapeWorkflow etape = EtapeSelectionnee;

            if (etape != null)
            {
                CFormNavigateur navigateur = CFormNavigateur.FindNavigateur(this);
                if (navigateur != null)
                {
                    CReferenceTypeForm refForm = CFormFinder.GetRefFormToEdit(typeof(CEtapeWorkflow));
                    if (refForm != null)
                    {
                        CFormEditionStandard frm = refForm.GetForm(etape) as CFormEditionStandard;
                        if (frm != null)
                        {
                            navigateur.AffichePage(frm);
                        }
                    }
                }
            }
        }
Example #24
0
 /// ////////////////////////////////////////
 private void m_lnkElement_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
 {
     if (m_objetForGED != null)
     {
         //Type tp = CFormFinder.GetTypeFormToEdit ( m_objetForGED.GetType() );
         //if ( tp.IsSubclassOf ( typeof(CFormEditionStandard) ))
         //{
         //    CFormEditionStandard form = (CFormEditionStandard)Activator.CreateInstance(tp, new object[]{m_objetForGED});
         //    CTimosApp.Navigateur.AffichePage ( form );
         //}
         CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(m_objetForGED.GetType());
         if (refTypeForm != null)
         {
             CFormEditionStandard form = refTypeForm.GetForm((CObjetDonneeAIdNumeriqueAuto)m_objetForGED) as CFormEditionStandard;
             if (form != null)
             {
                 CTimosApp.Navigateur.AffichePage(form);
             }
         }
     }
 }
Example #25
0
        private void m_linkTypeq_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            CReferenceTypeForm reference;


            if (Port.TypeEquipement != null)
            {
                CObjetDonneeAIdNumeriqueAuto objetAEditer = (CObjetDonneeAIdNumeriqueAuto)Port.TypeEquipement;


                reference = CFormFinder.GetRefFormToEdit(typeof(CTypeEquipement));
                if (reference != null)
                {
                    CFormEditionStandard frm = reference.GetForm(objetAEditer) as CFormEditionStandard;

                    if (frm != null)
                    {
                        Navigateur.AffichePage(frm);
                    }
                }
            }
        }
Example #26
0
        public static void OnDemandeAffichageRecherche(CNoeudCheminResultatRechercheObjetAvecParents noeud)
        {
            //Trouve l'objet donnée le plus bas dans les noeuds
            CNoeudCheminResultatRechercheObjetAvecParents noeudLePlusBas = noeud;

            while (noeudLePlusBas.NoeudFils != null)
            {
                noeudLePlusBas = noeudLePlusBas.NoeudFils;
            }
            CNoeudRechercheObjet_ObjetDonnee noeudObjet = noeudLePlusBas.Noeud as CNoeudRechercheObjet_ObjetDonnee;

            while (noeudLePlusBas != null)
            {
                CNoeudRechercheObjet_ObjetDonnee noeudTest = noeudLePlusBas.Noeud as CNoeudRechercheObjet_ObjetDonnee;
                if (noeudTest != null)
                {
                    noeudObjet = noeudTest;
                }
                if (noeudObjet != null)
                {
                    CObjetDonnee objet = noeudObjet.GetObjet(CSc2iWin32DataClient.ContexteCourant);
                    if (objet != null)
                    {
                        CReferenceTypeForm refType = CFormFinder.GetRefFormToEdit(objet.GetType());
                        if (refType != null)
                        {
                            IFormNavigable form = refType.GetForm(objet as CObjetDonneeAIdNumeriqueAuto) as IFormNavigable;
                            if (form != null)
                            {
                                CTimosApp.Navigateur.AffichePage(form);
                                return;
                            }
                        }
                    }
                }
                noeudLePlusBas = noeudLePlusBas.NoeudParent;
            }
            MessageBox.Show(I.T("Cannot display this element|20143"));
        }
Example #27
0
        //--------------------------------------------------------------------------
        private void m_lnkNouveauTicket_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // Créer un nouveau ticket
            CTicket ticket = new CTicket(m_listeObjets.ContexteDonnee);

            ticket.CreateNew();
            // Edition dans un nouvel onglet

            CReferenceTypeForm rTpForm = CFormFinder.GetRefFormToEdit(typeof(CTicket));

            if (rTpForm != null)
            {
                IFormNavigable form = rTpForm.GetForm(ticket) as IFormNavigable;
                if (form != null)
                {
                    CTimosApp.Navigateur.AffichePageDansNouvelOnglet(form);
                }
            }

            //CFormNavigateurPopup.Show(new CFormEditionTicket(ticket),FormWindowState.Maximized);

            InitPanel();
        }
 //------------------------------------------------------------------
 private void m_panelWorkflow_DoubleClicSurElement(object sender, EventArgs e)
 {
     if (!LockEdition)
     {
         EditeCurrentEtape();
     }
     else
     {
         CWorkflowEtapeDessin etape = m_panelWorkflow.EtapeSelectionnee;
         if (etape == null)
         {
             return;
         }
         CBlocWorkflow         bloc         = etape.TypeEtape != null ? etape.TypeEtape.Bloc : null;
         CBlocWorkflowWorkflow blocWorkflow = bloc as CBlocWorkflowWorkflow;
         if (blocWorkflow != null && blocWorkflow.DbKeyTypeWorkflow != null)
         {
             CTypeWorkflow typeWorkflow = new CTypeWorkflow(CSc2iWin32DataClient.ContexteCourant);
             if (typeWorkflow.ReadIfExists(blocWorkflow.DbKeyTypeWorkflow))
             {
                 CFormNavigateur navigateur = CFormNavigateur.FindNavigateur(this);
                 if (navigateur != null)
                 {
                     CReferenceTypeForm refFrm = CFormFinder.GetRefFormToEdit(typeof(CTypeWorkflow));
                     if (refFrm != null)
                     {
                         CFormEditionStandard frm = refFrm.GetForm(typeWorkflow) as CFormEditionStandard;
                         if (frm != null)
                         {
                             navigateur.AffichePage(frm);
                         }
                     }
                 }
             }
         }
     }
 }
        /*
         * private void m_btnMask_Click(object sender, EventArgs e)
         * {
         *  CSpvAlarmeEvenement spvAlarm = null;
         *
         *  if (m_AlarmInfo != null)
         *      spvAlarm = m_AlarmInfo.GetSpvAlarm(m_ctxDonnee);
         *
         *  if (spvAlarm == null)
         *      return;
         *  int id = spvAlarm.SpvAccesAccesc.Id;//test
         * //   CFormEditionMasquage editionMask = new CFormEditionMasquage(spvAlarm.SpvAccesAccesc, false);
         * //   editionMask.ShowDialog();
         *
         *  //CFormEditionCablageAccesAlarmeBoucle form = new CFormEditionCablageAccesAlarmeBoucle(spvAlarm.SpvAccesAccesc);
         *  CFormEditionAccesAlarmeEquipement form = new CFormEditionAccesAlarmeEquipement(spvAlarm.SpvAccesAccesc);
         *  Navigateur.AffichePage(form);
         *
         * }*/

        private void OnLstClientsDoubleClick(object sender, EventArgs e)
        {
            if (m_lstClients.SelectedIndices.Count > 0)
            {
                int index = m_lstClients.SelectedIndices[0];

                CSpvClient clientSpv = ((CInfoClientAlarmeAffichee)m_lstClients.Items[index]).GetSpvClient(m_ctxDonnee);
                if (clientSpv != null)
                {
                    CDonneesActeurClient customer = clientSpv.ObjetTimosAssocie;
                    //CDonneesActeurClient customer = clientSpv.ClientSmt;

                    if (customer != null && customer.Acteur != null)
                    {
                        CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(customer.Acteur.GetType());
                        if (refTypeForm != null)
                        {
                            IFormNavigable frm = refTypeForm.GetForm(customer.Acteur) as IFormNavigable;
                            Navigateur.AffichePage(frm);
                        }
                    }
                }
            }
        }
        private void OnLstServicesDoubleClick(object sender, EventArgs e)
        {
            if (m_lstServices.SelectedIndices.Count > 0)
            {
                int index = m_lstServices.SelectedIndices[0];

                CSpvSchemaReseau serviceSpv = ((CInfoServiceAlarmeAffichee)m_lstServices.Items[index]).GetSpvServiceByName(m_ctxDonnee);

                if (serviceSpv != null)
                {
                    CSchemaReseau schema = serviceSpv.ObjetTimosAssocie;

                    if (schema != null)
                    {
                        CReferenceTypeForm refTypeForm = CFormFinder.GetRefFormToEdit(schema.GetType());
                        if (refTypeForm != null)
                        {
                            IFormNavigable frm = refTypeForm.GetForm(schema) as IFormNavigable;
                            Navigateur.AffichePage(frm);
                        }
                    }
                }
            }
        }