Permalink
Browse files

Modifications homidom-homiadmin

Incorporation gestion thermostat ( modif jptools )
  • Loading branch information...
jphomi committed Jul 9, 2017
1 parent 30b1ade commit 5bee62e45f72c8b3d1c974ef564d29750e1b2fea
@@ -170,6 +170,7 @@ Partial Public Class uDevice

BtnTest.Visibility = Windows.Visibility.Visible
StkModel.Visibility = Visibility.Visible

If x.Type = ListeDevices.MULTIMEDIA Then
ImgEditTemplate.Visibility = Windows.Visibility.Visible
LabelModele.Visibility = Windows.Visibility.Visible
@@ -424,6 +425,7 @@ Partial Public Class uDevice
CbAdresse2.Visibility = Windows.Visibility.Collapsed
CbAdresse2.Tag = "Driver"
Else

LabelAdresse2.Content = _Driver.LabelsDevice.Item(k).LabelChamp
If String.IsNullOrEmpty(_Driver.LabelsDevice.Item(k).Tooltip) = False Then
LabelAdresse2.ToolTip = _Driver.LabelsDevice.Item(k).Tooltip
@@ -451,6 +453,7 @@ Partial Public Class uDevice
TxtAdresse2.Visibility = Windows.Visibility.Visible
TxtAdresse2.Tag = 1
TxtAdresse2.Text = a(0)

End If
Else
CbAdresse2.Visibility = Windows.Visibility.Collapsed
@@ -1048,6 +1051,7 @@ Partial Public Class uDevice
If CbAdresse1.SelectedValue <> "" And Left(CbAdresse1.SelectedValue, 4) <> "XXXX" Then
TxtAdresse1.Text = CbAdresse1.SelectedValue


Dim _Driver As Object = Nothing
Me.ForceCursor = True
'on cherche le driver
@@ -1067,13 +1071,16 @@ Partial Public Class uDevice
If _Driver.LabelsDevice.Count > 0 Then
'permet de lier l'adresse2 au choix de l'adresse1
Dim tmpstr As String = Trim(Mid(CbAdresse1.SelectedValue, 1, InStr(CbAdresse1.SelectedValue, " #") + 1)) & ";"

Dim a() As String

For k As Integer = 0 To _Driver.LabelsDevice.Count - 1
If UCase(_Driver.LabelsDevice.Item(k).NomChamp) = "ADRESSE2" Then
CbAdresse2.Items.Clear()
If String.IsNullOrEmpty(_Driver.LabelsDevice.Item(k).Parametre) = False Then
a = _Driver.LabelsDevice.Item(k).Parametre.Split("|")
For g As Integer = 0 To a.Length - 1
' MsgBox(a(g))
If InStr(a(g), "#;") > 0 Then 'permet de lier une valeur de adresse2 avec adresse1
If (InStr(a(g), tmpstr) > 0) And (Len(tmpstr) = Len(Trim(Mid(a(g), 1, InStr(a(g), " #;") + 2)))) Then
CbAdresse2.Items.Add(Trim(Mid(a(g), InStr(a(g), "#;") + 2)))
@@ -1097,8 +1104,9 @@ Partial Public Class uDevice

Private Sub TxtAdresse1_TextChanged(sender As System.Object, e As System.Windows.Controls.TextChangedEventArgs) Handles TxtAdresse1.TextChanged
Try

If CbAdresse1.Items.Count > 0 Then
If TxtAdresse1.Text.Trim.Length >= 8 Then 'on cherche dans la liste quand on a tapait l'ID complet
If TxtAdresse1.Text.Trim.Length >= 4 Then 'jps = 4 aulieu 8 on cherche dans la liste quand on a tapait l'ID complet
Dim flagTrouv As Boolean = False
Dim idx As Integer = 0

@@ -1112,11 +1120,13 @@ Partial Public Class uDevice

If flagTrouv Then
CbAdresse1.SelectedIndex = idx

Else
CbAdresse1.Text = ""
End If
End If
End If

Catch ex As Exception
AfficheMessageAndLog(HoMIDom.HoMIDom.Server.TypeLog.ERREUR, "Erreur TxtAdresse1_TextChanged: " & ex.ToString, "Erreur Admin", "TxtAdresse1_TextChanged")
End Try
@@ -1145,7 +1155,7 @@ Partial Public Class uDevice
Private Sub TxtAdresse2_TextChanged(sender As System.Object, e As System.Windows.Controls.TextChangedEventArgs) Handles TxtAdresse2.TextChanged
Try
If CbAdresse2.Items.Count > 0 Then
If TxtAdresse2.Text.Trim.Length >= 8 Then 'on cherche dans la liste quand on a tapait l'ID complet
If TxtAdresse2.Text.Trim.Length >= 4 Then 'jps = 4 aulieu 8 on cherche dans la liste quand on a tapait l'ID complet
Dim flagTrouv As Boolean = False
Dim idx As Integer = 0

@@ -1489,6 +1499,7 @@ Partial Public Class uDevice
End Try
End Function


End Class

'=========================================================================================================================================================
@@ -1841,7 +1841,7 @@ Class Window1

End If
Catch ex As Exception
AfficheMessageAndLog(HoMIDom.HoMIDom.Server.TypeLog.ERREUR, "ERREUR Sub TreeView_MouseDoubleClick: " & ex.Message, "ERREUR", "")
AfficheMessageAndLog(HoMIDom.HoMIDom.Server.TypeLog.ERREUR, "ERREUR Sub TreeView_MouseDoubleClick : " & ex.Message, "ERREUR", "")
End Try
End Sub

@@ -2934,6 +2934,18 @@ Namespace HoMIDom
AddHandler MyTimer.Elapsed, AddressOf Read
End Sub

' SetPoint Thermostat *****************************************************
Public Sub [SetPoint](ByVal Variation As Single)
If _Enable = False Then Exit Sub

If Variation < 5 Then
Variation = 5
ElseIf Variation > 40 Then
Variation = 40
End If
Driver.Write(Me, "SETPOINT", Variation)
End Sub

End Class

<Serializable()> Class UV
BIN +5 KB (100%) RELEASE/HoMIAdmiN.exe
Binary file not shown.
Oops, something went wrong.

0 comments on commit 5bee62e

Please sign in to comment.