public CFormConsultationAlarmesEnCours() { InitializeComponent(); m_recepteurNotifications = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CNotificationModificationsAlarme)); m_recepteurNotifications.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotification); }
private void CPanelNotificationUtilisateur_Load(object sender, System.EventArgs e) { if (!DesignMode) { m_recepteurInterventions = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationBesoinIntervention)); m_recepteurInterventions.OnReceiveNotification += new NotificationEventHandler(OnNotification); m_recepteurWorkflow = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationWorkflow)); m_recepteurWorkflow.OnReceiveNotification += new NotificationEventHandler(m_recepteurWorkflow_OnReceiveNotification); CDonneesActeurUtilisateur user = CUtilSession.GetUserForSession(CSc2iWin32DataClient.ContexteCourant); if (user != null) { CListeObjetsDonnees lstPourActeur = user.Acteur.GetEtapeWorkflowsEnCours(); m_nNbEtapesEnCours = lstPourActeur.Count; if (m_nNbEtapesEnCours > 0) { m_lblNbToDo.Text = m_nNbEtapesEnCours.ToString(); m_lblNbToDo.Visible = true; } else { m_lblNbToDo.Text = "0"; m_lblNbToDo.Visible = false; } } BeginInvoke((MethodInvoker) delegate { UpdateInterventions(); }); } }
//-------------------------------------------------------------------------- private static void AssureRecepteurNotifications(int nIdSession) { if (m_recepteurNotifications == null) { m_recepteurNotifications = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationResetCacheDatabaseRegistre)); m_recepteurNotifications.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotifications_OnReceiveNotification); } }
public CControleUsersMessagesInstantanes() { InitializeComponent(); m_recepteurConnexion = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationConnection)); m_recepteurConnexion.OnReceiveNotification += new NotificationEventHandler(m_recepteurConnexion_OnReceiveNotification); m_recepteurMessage = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationMessageInstantane)); m_recepteurMessage.OnReceiveNotification += new NotificationEventHandler(m_recepteurMessage_OnReceiveNotification); }
public CDataBaseRegistrePourClient(int nIdSession) { m_nIdSession = nIdSession; if (m_recepteurNotifications == null) { m_recepteurNotifications = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationResetCacheDatabaseRegistre)); m_recepteurNotifications.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotifications_OnReceiveNotification); } }
//---------------------------------------------------------------------------------------------- public CBasePourVueAnimee(CContexteDonnee contexteDonnee, bool bAvecNotifications) { if (bAvecNotifications) { m_recepteurNotifications = new CRecepteurNotification(contexteDonnee.IdSession, typeof(CDonneeNotificationAlarmes)); m_recepteurNotifications.OnReceiveNotification += new NotificationEventHandler(m_recepteurAlarme_Notification); } m_contexteDonnee = contexteDonnee; m_baseGraphes = new CBaseGraphesReseau(); m_timerRefresh.Elapsed += new ElapsedEventHandler(m_timerRefresh_Elapsed); }
private void AssureRecepteurs() { if (m_recepteurAjout == null) { m_recepteurAjout = new CRecepteurNotification(CContexteDonneeSysteme.GetInstance().IdSession, typeof(CDonneeNotificationAjoutEnregistrement)); m_recepteurAjout.OnReceiveNotification += new NotificationEventHandler(m_recepteurAjout_OnReceiveNotification); } if (m_recepteurModification == null) { m_recepteurModification = new CRecepteurNotification(CContexteDonneeSysteme.GetInstance().IdSession, typeof(CDonneeNotificationModificationContexteDonnee)); m_recepteurModification.OnReceiveNotification += new NotificationEventHandler(m_recepteurModification_OnReceiveNotification); } }
//------------------------------------------------------------ private void InitRecepteurs() { if (m_recepteurNotificationTypeDonneeAjoutee == null) { m_recepteurNotificationTypeDonneeAjoutee = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationAjoutEnregistrement)); m_recepteurNotificationTypeDonneeAjoutee.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationAjout); } if (m_recepteurNotificationTypeDonneeModifiee == null) { m_recepteurNotificationTypeDonneeModifiee = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationModificationContexteDonnee)); m_recepteurNotificationTypeDonneeModifiee.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationModif); } }
/// <summary> /// S'assure que les récepteurs de notification sont créés /// </summary> private static void AssureRecepteursNotifications(int nIdSession) { if (m_recepteurAjouts == null) { m_recepteurAjouts = new CRecepteurNotification(nIdSession, typeof(sc2i.data.CDonneeNotificationAjoutEnregistrement)); m_recepteurAjouts.OnReceiveNotification += new NotificationEventHandler(m_recepteurAjouts_OnReceiveNotification); } if (m_recepteurModifs == null) { m_recepteurModifs = new CRecepteurNotification(nIdSession, typeof(sc2i.data.CDonneeNotificationModificationContexteDonnee)); m_recepteurModifs.OnReceiveNotification += new NotificationEventHandler(m_recepteurModifs_OnReceiveNotification); } }
public CFormConsoleSuivi() { // // Requis pour la prise en charge du Concepteur Windows Forms // InitializeComponent(); // // TODO : ajoutez le code du constructeur après l'appel à InitializeComponent // m_recepteurMessage = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeof(CDonneeNotificationMessageInstantane)); m_recepteurMessage.OnReceiveNotification += new NotificationEventHandler(m_recepteurMessage_OnReceiveNotification); m_controleChat.SetModeSansActeurEtSansClose(); }
/// /////////////////////////////////////////////////////////// private static void UpdateTableDonneesCumulees() { int nIdSession = 0; try { nIdSession = CSessionClient.GetSessionUnique().IdSession; } catch { } if (m_recepteurNotificationModifTypeDonneeCumulee == null) { m_recepteurNotificationModifTypeDonneeCumulee = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationModificationContexteDonnee)); m_recepteurNotificationModifTypeDonneeCumulee.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotificationTypeDonneeCumulee_OnReceiveNotification); } if (m_recepteurNotificationAjoutTypeDonneeCumulee == null) { m_recepteurNotificationAjoutTypeDonneeCumulee = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationAjoutEnregistrement)); m_recepteurNotificationAjoutTypeDonneeCumulee.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotificationTypeDonneeCumulee_OnReceiveNotification); } if (m_tableTypeToDonneesCumulees != null) { m_tableTypeToDonneesCumulees.Clear(); } else { m_tableTypeToDonneesCumulees = new Dictionary <Type, List <CTypeDonneeCumulee> >(); } CContexteDonnee contexte = CContexteDonneeSysteme.GetInstance(); CListeObjetsDonnees liste = new CListeObjetsDonnees(contexte, typeof(CTypeDonneeCumulee)); foreach (CTypeDonneeCumulee type in liste) { CParametreDonneeCumulee parametre = type.Parametre; foreach (CCleDonneeCumulee cle in parametre.ChampsCle) { if (cle.TypeLie != null) { List <CTypeDonneeCumulee> lst = null; if (!m_tableTypeToDonneesCumulees.TryGetValue(cle.TypeLie, out lst)) { lst = new List <CTypeDonneeCumulee>(); m_tableTypeToDonneesCumulees[cle.TypeLie] = lst; } lst.Add(type); } } } }
/// /////////////////////////////////////////////////////////// private static void UpdateTableDonneesCumulees() { int nIdSession = 0; try { nIdSession = CSessionClient.GetSessionUnique().IdSession; } catch {} if (m_recepteurNotificationModifTypeDonneeCumulee == null) { m_recepteurNotificationModifTypeDonneeCumulee = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationModificationContexteDonnee)); m_recepteurNotificationModifTypeDonneeCumulee.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotificationTypeDonneeCumulee_OnReceiveNotification); } if (m_recepteurNotificationAjoutTypeDonneeCumulee == null) { m_recepteurNotificationAjoutTypeDonneeCumulee = new CRecepteurNotification(nIdSession, typeof(CDonneeNotificationAjoutEnregistrement)); m_recepteurNotificationAjoutTypeDonneeCumulee.OnReceiveNotification += new NotificationEventHandler(m_recepteurNotificationTypeDonneeCumulee_OnReceiveNotification); } if (m_tableTypeToDonneesCumulees != null) { m_tableTypeToDonneesCumulees.Clear(); } else { m_tableTypeToDonneesCumulees = new Hashtable(); } CListeObjetsDonnees liste = new CListeObjetsDonnees(ContexteDonneeCache, typeof(CTypeDonneeCumulee)); foreach (CTypeDonneeCumulee type in liste) { CParametreDonneeCumulee parametre = type.Parametre; foreach (CCleDonneeCumulee cle in parametre.ChampsCle) { if (cle.TypeLie != null) { ArrayList lst = (ArrayList)m_tableTypeToDonneesCumulees[cle.TypeLie]; if (lst == null) { lst = new ArrayList(); m_tableTypeToDonneesCumulees[cle.TypeLie] = lst; } lst.Add(type); } } } }
/// <summary> /// Nettoyage des ressources utilisées. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (m_recepteurMessage != null) { m_recepteurMessage.Dispose(); } m_recepteurMessage = null; if (components != null) { components.Dispose(); } } base.Dispose(disposing); }
//-------------------------------------------------------------------------------------- private static void AssureRecepteur(Type typeNotification) { CRecepteurNotification recepteur = null; m_dicRecepteurs.TryGetValue(typeNotification, out recepteur); if (recepteur != null) { return; } if (CTimosApp.SessionClient == null) { m_dicRecepteurs[typeNotification] = null; } else { recepteur = new CRecepteurNotification(CTimosApp.SessionClient.IdSession, typeNotification); recepteur.OnReceiveNotification += new NotificationEventHandler(recepteur_OnReceiveNotification); m_dicRecepteurs[typeNotification] = recepteur; } }
/// <summary> /// Nettoyage des ressources utilisées. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); if (m_recepteurInterventions != null) { m_recepteurInterventions.Dispose(); } m_recepteurInterventions = null; if (m_recepteurWorkflow != null) { m_recepteurWorkflow.Dispose(); } m_recepteurWorkflow = null; } } base.Dispose(disposing); }
public CControleSelectionObjetHierarchique() { // Cet appel est requis par le Concepteur de formulaires Windows.Forms. InitializeComponent(); // TODO : ajoutez les initialisations après l'appel à InitializeComponent try { if (m_recepteurNotificationModificationObjets == null) { m_recepteurNotificationModificationObjets = new CRecepteurNotification(CSessionClient.GetSessionUnique().IdSession, typeof(CDonneeNotificationModificationContexteDonnee)); m_recepteurNotificationModificationObjets.OnReceiveNotification += new NotificationEventHandler(OnChangementDansObjets); } if (m_recepteurNotificationAjoutObjets == null) { m_recepteurNotificationModificationObjets = new CRecepteurNotification(CSessionClient.GetSessionUnique().IdSession, typeof(CDonneeNotificationAjoutEnregistrement)); m_recepteurNotificationModificationObjets.OnReceiveNotification += new NotificationEventHandler(OnChangementDansObjets); } } catch {} }
//---------------------------------------------------------------------------------------------- public void Dispose() { m_bIsDisposed = true; if (m_recepteurNotifications != null) { m_recepteurNotifications.Dispose(); } m_recepteurNotifications = null; if (m_imageConnexionHS != null) { m_imageConnexionHS.Dispose(); } if (m_imageConnexionOk != null) { m_imageConnexionOk.Dispose(); } m_imageConnexionHS = null; m_imageConnexionOk = null; if (m_timerRefresh != null) { m_timerRefresh.Stop(); m_timerRefresh.Dispose(); } }
static void CSessionClient_AfterOpenSession(CSessionClient session) { CRecepteurNotification recepteur = new CRecepteurNotification(session.IdSession, typeof(CDonneeNotificationModificationSystemeUnites)); recepteur.OnReceiveNotification += new NotificationEventHandler(recepteur_OnReceiveNotification); }
public CFormListeAlarmeEnCours(CConsultationAlarmesEnCoursInDb consultation, CFormNavigateur navigateur) { c_nBaseControleRetombee = 15000 / c_nTimeClignote; List <string> strNomColonnes; string st; TimeSpan duree; DateTime start, stop; m_consultationEnCours = consultation; m_navigateur = navigateur; start = DateTime.Now; InitializeComponent(); this.Text = consultation.Libelle; m_timerVoyant.Enabled = true; stop = DateTime.Now; duree = stop - start; //test duree = 8 sec !!!!!!! m_recepteurNotifications = new CRecepteurNotification(CSc2iWin32DataClient.ContexteCourant.IdSession, typeof(CDonneeNotificationAlarmes)); m_recepteurNotifications.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationAlarmEnCours); /* m_recepteurNotificationsStop = new CRecepteurNotification(CSc2iWin32DataClient.ContexteCourant.IdSession, typeof(CDonneeNotificationAlarmesStop)); * m_recepteurNotificationsStop.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationStop); * * m_recepteurNotificationsMask = new CRecepteurNotification(CSc2iWin32DataClient.ContexteCourant.IdSession, typeof(CDonneeNotificationAlarmesMask)); * m_recepteurNotificationsMask.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationMask); * * m_recepteurNotificationsAcknowledge = new CRecepteurNotification(CSc2iWin32DataClient.ContexteCourant.IdSession, typeof(CDonneeNotificationAlarmesAcknowledge)); * m_recepteurNotificationsAcknowledge.OnReceiveNotification += new NotificationEventHandler(OnReceiveNotificationAcknowledge);*/ List <CInfoAlarmeAffichee> lstEnCours = new List <CInfoAlarmeAffichee>(); List <CInfoAlarmeAffichee> lstRetombe = new List <CInfoAlarmeAffichee>(); m_lstViewEnCours.OnGetDonneesObjet += new GetDonneesLigneEventHandler(GetDonneesObjetEnCours); m_lstViewRetombe.OnGetDonneesObjet += new GetDonneesLigneEventHandler(GetDonneesObjetRetombe); m_lstViewEnCours.DoubleClick += new EventHandler(OnLstViewEnCoursDoubleClick); m_lstViewRetombe.DoubleClick += new EventHandler(OnLstViewRetombeDoubleClick); lstEnCours = GetAlarmsInfoFromDB(); strNomColonnes = m_consultationEnCours.Parametres.GetColumnNames(); m_lstViewEnCours.Init(strNomColonnes.ToArray(), lstEnCours.ToArray()); st = I.T("End date|60023"); strNomColonnes.Add(st); st = I.T("Duration|60022"); strNomColonnes.Add(st); m_lstViewRetombe.Init((string[])strNomColonnes.ToArray(), lstRetombe.ToArray()); m_strMaskAdminButtonText = I.T("Alarms masked by Administrator|60016") + " : "; m_strMaskBrigButtonText = I.T("Alarms masked by Operating agent|60017") + " : "; m_strFrequentButtonText = I.T("Current frequent alarms|60018") + " : "; InitButtonsInfo(); MAJFrequentButtonText(); MAJAdminButtonText(); MAJBrigButtonText(); m_btnMaskedOnCreation.Text = I.T("Alarms masked on creation|60047") + " : " + m_NbMasqCreat.ToString(); label1.Text = I.T("Current alarms|60014"); label2.Text = I.T("Cleared alarms|60015"); CDocumentGED docSonnerie = consultation.DocumentGEDSoundFile; if (docSonnerie != null && docSonnerie.ReferenceDoc != null) { m_proxySonnerie = new CProxyGED(consultation.ContexteDonnee.IdSession, docSonnerie.ReferenceDoc); if (!m_proxySonnerie.CopieFichierEnLocal()) { m_proxySonnerie.Dispose(); m_proxySonnerie = null; } } //SetVoyantAlarme(); Type tpVar = GetType(); Type tpGeneric = typeof(List <>); tpGeneric = tpGeneric.MakeGenericType(tpVar); object liste = Activator.CreateInstance(tpGeneric); }