[FogBugz #83] sxconnexion.asmx #145

Open
opened 2023-07-03 23:20:46 +02:00 by fbenoist68 · 15 comments

Assigned To: Frederik Benoist
Project: CAISSE
Area: awcaisse
Category: Bogue
Priority: A étudier

Assigned To: Frederik Benoist Project: CAISSE Area: awcaisse Category: Bogue Priority: A étudier
Poster
Owner

Event ID: 642
Date: 2013-08-29T14:59:30Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 642 Date: 2013-08-29T14:59:30Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 641
Date: 2013-08-29T14:55:42Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 641 Date: 2013-08-29T14:55:42Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 640
Date: 2013-08-29T14:54:27Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

<<Bouton déconnexion>>

C:\projets\DotSoft\CaisseAuto\awCaisse\Vues\cfCaisse.vb

Au final ce sera la propriété pForcageDeconnecter de cSurveilleConnection.vb qui sera appellée.

 

Private Sub CmdConnexion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdConnexion.Click

' BSS 13/07/2010 - Demander une confirmation avant de dconnecter l'application

If Not cApplication.psSurveilleInternet.pForcageDeconnecter AndAlso cfMessage.msShowDialog(True, True, False, False, "Dconnection", "Voulez-vous vraiment passer en mode dconnect?", Nothing, cfMessage.eTypImage.Question) <> DialogResult.Yes Then Exit Sub

App.mAction(bInterface.PluginApp.IPlugin.actions.deconnection_caisse, App.pTicketGestionCourant.pTicketEntete.pEmployes.pIdEmploye)

cApplication.psForcerModeDeconnecter = Not cApplication.psForcerModeDeconnecter

If cApplication.psForcerModeDeconnecter Then

cApplication.psSurveilleInternet.pForcageDeconnecter = True

'Me.CmdConnexion.mClignotementBoutonLancer()

Me.CmdConnexion.Text = cLangueService.pCaisse.mLireLibelle("cfCaisse", "conexioncaisse", "C")

Me.CmdConnexion.ImageIndex = 2

Else

cApplication.psSurveilleInternet.pForcageDeconnecter = False

'Me.CmdConnexion.mClignotementBoutonStop()

Me.CmdConnexion.Text = cLangueService.pCaisse.mLireLibelle("cfCaisse", "deconexioncaisse", "D")

Me.CmdConnexion.ImageIndex = 3

End If

End Sub

Event ID: 640 Date: 2013-08-29T14:54:27Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> &lt;&lt;Bouton d&eacute;connexion&gt;&gt;</p> <p> C:\projets\DotSoft\CaisseAuto\awCaisse\Vues\cfCaisse.vb</p> <p> Au final ce sera la propri&eacute;t&eacute; pForcageDeconnecter de cSurveilleConnection.vb qui sera appell&eacute;e.</p> <p> &nbsp;</p> <p> Private Sub CmdConnexion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdConnexion.Click</p> <p> &#39; BSS 13/07/2010 - Demander une confirmation avant de dconnecter l&#39;application</p> <p> If Not cApplication.psSurveilleInternet.pForcageDeconnecter AndAlso cfMessage.msShowDialog(True, True, False, False, &quot;Dconnection&quot;, &quot;Voulez-vous vraiment passer en mode dconnect?&quot;, Nothing, cfMessage.eTypImage.Question) &lt;&gt; DialogResult.Yes Then Exit Sub</p> <p> App.mAction(bInterface.PluginApp.IPlugin.actions.deconnection_caisse, App.pTicketGestionCourant.pTicketEntete.pEmployes.pIdEmploye)</p> <p> cApplication.psForcerModeDeconnecter = Not cApplication.psForcerModeDeconnecter</p> <p> If cApplication.psForcerModeDeconnecter Then</p> <p> cApplication.psSurveilleInternet.pForcageDeconnecter = True</p> <p> &#39;Me.CmdConnexion.mClignotementBoutonLancer()</p> <p> Me.CmdConnexion.Text = cLangueService.pCaisse.mLireLibelle(&quot;cfCaisse&quot;, &quot;conexioncaisse&quot;, &quot;C&quot;)</p> <p> Me.CmdConnexion.ImageIndex = 2</p> <p> Else</p> <p> cApplication.psSurveilleInternet.pForcageDeconnecter = False</p> <p> &#39;Me.CmdConnexion.mClignotementBoutonStop()</p> <p> Me.CmdConnexion.Text = cLangueService.pCaisse.mLireLibelle(&quot;cfCaisse&quot;, &quot;deconexioncaisse&quot;, &quot;D&quot;)</p> <p> Me.CmdConnexion.ImageIndex = 3</p> <p> End If</p> <p> End Sub</p>
Poster
Owner

Event ID: 639
Date: 2013-08-29T14:38:32Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 639 Date: 2013-08-29T14:38:32Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 638
Date: 2013-08-29T14:09:31Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

C:\projets\DotSoft\CaisseAuto\bInternet\cInternet.vb

 

Private Shared Function pIsServeurRepond(ByVal IdStructure As Long, ByVal IdCaisse As Long, Optional ByVal AdressServeur As String = "") As Boolean

If AdressServeur.Length = 0 Then

AdressServeur = cInternet.vAdresseServeur

If AdressServeur.Length = 0 Then Throw New Exception("L'adresse du serveur n'a encore jamais t renseigne.")

Else

cInternet.vAdresseServeur = AdressServeur

End If

Try

'tester le service web qui retourne True

Using Sw As New swConnexion.swConnexion()

Sw.Url = AdressServeur

Sw.Timeout = cInternet.vsTimeOut

cInternet.vDateServeur = Sw.mIsServeurDisponible()

Return cInternet.psIsConnectedTous(True)

End Using

Event ID: 638 Date: 2013-08-29T14:09:31Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> C:\projets\DotSoft\CaisseAuto\bInternet\cInternet.vb</p> <p> &nbsp;</p> <p> Private Shared Function pIsServeurRepond(ByVal IdStructure As Long, ByVal IdCaisse As Long, Optional ByVal AdressServeur As String = &quot;&quot;) As Boolean</p> <p> If AdressServeur.Length = 0 Then</p> <p> AdressServeur = cInternet.vAdresseServeur</p> <p> If AdressServeur.Length = 0 Then Throw New Exception(&quot;L&#39;adresse du serveur n&#39;a encore jamais t renseigne.&quot;)</p> <p> Else</p> <p> cInternet.vAdresseServeur = AdressServeur</p> <p> End If</p> <p> Try</p> <p> &#39;tester le service web qui retourne True</p> <p> Using Sw As New swConnexion.swConnexion()</p> <p> Sw.Url = AdressServeur</p> <p> Sw.Timeout = cInternet.vsTimeOut</p> <p> cInternet.vDateServeur = Sw.mIsServeurDisponible()</p> <p> Return cInternet.psIsConnectedTous(True)</p> <p> End Using</p>
Poster
Owner

Event ID: 637
Date: 2013-08-29T13:41:49Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

C:\projets\DotSoft\CaisseAuto\bCaisse\cCaisse.vb

 

' Charger le fichier de configuration

Dim document As Xml.XmlDocument = msLireConfiguration(vCaisse)

cConfigurationCaisse.msCharger(document)

Event ID: 637 Date: 2013-08-29T13:41:49Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> C:\projets\DotSoft\CaisseAuto\bCaisse\cCaisse.vb</p> <p> &nbsp;</p> <p> &#39; Charger le fichier de configuration</p> <p> Dim document As Xml.XmlDocument = msLireConfiguration(vCaisse)</p> <p> cConfigurationCaisse.msCharger(document)</p>
Poster
Owner

Event ID: 636
Date: 2013-08-29T12:50:37Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

C:\projets\DotSoft\CaisseAuto\awCaisse\Code\cApplication.vb

 

Public Event eConnexion(ByVal IsConnected As Boolean)

'Public WithEvents vSurveilleInternet As bInternet.cSurveilleConnection

Public Sub mInitialiseSurveillanceInternet(ByVal IPServeur As String)

bApplication.cApplication.vsSurveilleInternet = New bInternet.cSurveilleConnection(4000, CInt(cConfigLocal.psIdStructure), CInt(cConfigLocal.psIdCaisse), "http://" & IPServeur & "/swConnexion.asmx")

bInternet.cSurveilleConnection.psInstanceEnCours = bApplication.cApplication.vsSurveilleInternet

RaiseEvent eConnexion(bApplication.cApplication.vsSurveilleInternet.pIsConnected)

'Me.vSurveilleInternet.Dispose()

End Sub

Event ID: 636 Date: 2013-08-29T12:50:37Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> C:\projets\DotSoft\CaisseAuto\awCaisse\Code\cApplication.vb</p> <p> &nbsp;</p> <p> Public Event eConnexion(ByVal IsConnected As Boolean)</p> <p> &#39;Public WithEvents vSurveilleInternet As bInternet.cSurveilleConnection</p> <p> Public Sub mInitialiseSurveillanceInternet(ByVal IPServeur As String)</p> <p> bApplication.cApplication.vsSurveilleInternet = New bInternet.cSurveilleConnection(4000, CInt(cConfigLocal.psIdStructure), CInt(cConfigLocal.psIdCaisse), &quot;http://&quot; &amp; IPServeur &amp; &quot;/swConnexion.asmx&quot;)</p> <p> bInternet.cSurveilleConnection.psInstanceEnCours = bApplication.cApplication.vsSurveilleInternet</p> <p> RaiseEvent eConnexion(bApplication.cApplication.vsSurveilleInternet.pIsConnected)</p> <p> &#39;Me.vSurveilleInternet.Dispose()</p> <p> End Sub</p>
Poster
Owner

Event ID: 635
Date: 2013-08-29T12:49:23Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

C:\projets\DotSoft\CaisseAuto\bCore\Configuration\cConfigurationCaisse.vb

 

''' <summary> Donne le time out de connexion pour check la connexion au SW web </summary>

Public ReadOnly Property pParaTimeOutVerifConnexion() As Integer

Get

Return msLireEntier("root/timeout", 4000)

End Get

End Property

 

Pas utilisé à priori ...

Event ID: 635 Date: 2013-08-29T12:49:23Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> C:\projets\DotSoft\CaisseAuto\bCore\Configuration\cConfigurationCaisse.vb</p> <p> &nbsp;</p> <p> &#39;&#39;&#39; &lt;summary&gt; Donne le time out de connexion pour check la connexion au SW web &lt;/summary&gt;</p> <p> Public ReadOnly Property pParaTimeOutVerifConnexion() As Integer</p> <p> Get</p> <p> Return msLireEntier(&quot;root/timeout&quot;, 4000)</p> <p> End Get</p> <p> End Property</p> <p> &nbsp;</p> <p> Pas utilis&eacute; &agrave; priori ...</p>
Poster
Owner

Event ID: 634
Date: 2013-08-29T12:45:33Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

C:\projets\DotSoft\CaisseAuto\bInternet\cSurveilleConnection.vb

Public Sub New(ByVal Temps As Integer, ByVal IdStructure As Integer, ByVal IdCaisse As Integer, Optional ByVal AdressServeur As String = "")

Me.vAdressServeur = AdressServeur

Me.vIdStructure = IdStructure

Me.vIdCaisse = IdCaisse

Me.vNetWork = New Microsoft.VisualBasic.Devices.Network

Me.vIsConnected = cInternet.pIsConnected(IdStructure, IdCaisse, AdressServeur, Me.vNetWork)

Me.vTemporisation = Temps

TaThreadVerifConnect.BeginInvoke(Nothing, Nothing)

End Sub

Event ID: 634 Date: 2013-08-29T12:45:33Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> C:\projets\DotSoft\CaisseAuto\bInternet\cSurveilleConnection.vb</p> <p> Public Sub New(ByVal Temps As Integer, ByVal IdStructure As Integer, ByVal IdCaisse As Integer, Optional ByVal AdressServeur As String = &quot;&quot;)</p> <p> Me.vAdressServeur = AdressServeur</p> <p> Me.vIdStructure = IdStructure</p> <p> Me.vIdCaisse = IdCaisse</p> <p> Me.vNetWork = New Microsoft.VisualBasic.Devices.Network</p> <p> Me.vIsConnected = cInternet.pIsConnected(IdStructure, IdCaisse, AdressServeur, Me.vNetWork)</p> <p> Me.vTemporisation = Temps</p> <p> TaThreadVerifConnect.BeginInvoke(Nothing, Nothing)</p> <p> End Sub</p>
Poster
Owner

Event ID: 633
Date: 2013-08-29T12:44:05Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

http://swduplik-4-0.gzsi.local/swConnexion.asmx

 

C:\projets\DotSoft\CaisseAuto\bInternet\cInternet.vb

Le plus "important"  est la classe cInternet. Elle contient propriété : pIsConnected

le thread "TaThreadVerifConnect" dans cSurveilleConnection.vb qui tourne toutes les 4 secondes appelle cette propriété.

Dans cApplication.vb on a "psForcerModeDeconnecter" et une propriéte : psIsConnected

Public Shared Function psIsConnected() As Boolean

If vsForcerModeDeconnecte Then Return False

If vsSurveilleInternet Is Nothing Then Return False

Return vsSurveilleInternet.pIsConnected

End Function

 

 

 

 


 

 

Event ID: 633 Date: 2013-08-29T12:44:05Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> <a href="http://swduplik-4-0.gzsi.local/swConnexion.asmx" rel="nofollow noopener noreferrer" target="_blank">http://swduplik-4-0.gzsi.local/swConnexion.asmx</a></p> <p> &nbsp;</p> <p> C:\projets\DotSoft\CaisseAuto\bInternet\cInternet.vb</p> <p> Le plus &quot;important&quot;&nbsp;&nbsp;est la classe cInternet. Elle contient propri&eacute;t&eacute; : pIsConnected</p> <p> le thread &quot;TaThreadVerifConnect&quot; dans cSurveilleConnection.vb qui tourne toutes les 4 secondes appelle cette propri&eacute;t&eacute;.</p> <p> Dans cApplication.vb on a &quot;psForcerModeDeconnecter&quot; et une propri&eacute;te : psIsConnected</p> <p> Public Shared Function psIsConnected() As Boolean</p> <p> If vsForcerModeDeconnecte Then Return False</p> <p> If vsSurveilleInternet Is Nothing Then Return False</p> <p> Return vsSurveilleInternet.pIsConnected</p> <p> End Function</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> <br /> &nbsp;</p> <p> &nbsp;</p>
Poster
Owner

Event ID: 323
Date: 2013-02-06T15:34:25Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 323 Date: 2013-02-06T15:34:25Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 322
Date: 2013-02-06T15:19:16Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Envoi : Content-Length: 298

Retour : Content-Length: 420

Event ID: 322 Date: 2013-02-06T15:19:16Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> Envoi : Content-Length: 298</p> <p> Retour : Content-Length: 420</p>
Poster
Owner

Event ID: 321
Date: 2013-02-06T15:18:45Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

Event ID: 321 Date: 2013-02-06T15:18:45Z Person: Frederik Benoist Description: Modifié par Frederik Benoist
Poster
Owner

Event ID: 316
Date: 2013-02-06T15:02:42Z
Person: Frederik Benoist
Description: Attribué à Frederik Benoist par Frederik Benoist

Event ID: 316 Date: 2013-02-06T15:02:42Z Person: Frederik Benoist Description: Attribué à Frederik Benoist par Frederik Benoist
Poster
Owner

Event ID: 315
Date: 2013-02-06T15:02:42Z
Person: Frederik Benoist
Description: Ouvert par Frederik Benoist

Event ID: 315 Date: 2013-02-06T15:02:42Z Person: Frederik Benoist Description: Ouvert par Frederik Benoist
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fbenoist68/mobileportal#145
There is no content yet.