diff --git a/app/BrainpoolXmlParser/BrainpoolXmlParser.vbproj b/app/BrainpoolXmlParser/BrainpoolXmlParser.vbproj
index 3510e49..149b058 100644
--- a/app/BrainpoolXmlParser/BrainpoolXmlParser.vbproj
+++ b/app/BrainpoolXmlParser/BrainpoolXmlParser.vbproj
@@ -61,6 +61,9 @@
On
+
+ ..\packages\Humanizer.1.37.7\lib\portable-win+net40+sl50+wp8+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Humanizer.dll
+
..\..\3rdparty\NLog.4.1.2\lib\net45\NLog.dll
@@ -90,6 +93,7 @@
+
diff --git a/app/BrainpoolXmlParser/Main.vb b/app/BrainpoolXmlParser/Main.vb
index 7373403..378bd31 100644
--- a/app/BrainpoolXmlParser/Main.vb
+++ b/app/BrainpoolXmlParser/Main.vb
@@ -105,6 +105,16 @@ Module Main
Dim value = db.GetProperty(m, prop)
' Wert einfügen
db.InsertValue(controlId, recordId, value)
+
+ ' Wenn Bildmarke oder Wort- und Bildmarke, Bild einfügen
+ If prop = "MarkFeature" Then
+ If value = "wort-bildmarke" Or value = "bildmarke" Then
+ Dim imageControlId = db.GetControlId(formId, "MarkImage")
+ Dim bimage() As Byte = Image.ToByteArray(m.Image.BinaryImage)
+ db.InsertImage(bimage, imageControlId, recordId)
+ End If
+ End If
+
logger.Debug("Value inserted - Property: {0}, Value: {1}, ControlId: {2}", prop, value, controlId)
Next
Else
@@ -120,15 +130,29 @@ Module Main
' Wert für die aktuelle property holen
Dim value = db.GetProperty(m, prop)
- Dim hasChanged As Boolean = Not db.IsEqual(controlId, recordId, value)
- logger.Debug("Value for {0} has changed", recordId)
+ ' Wert aktualisieren
+ db.UpdateValue(controlId, recordId, value)
- If hasChanged Then
- propsChanged = True
- ' Wert aktualisieren
- db.UpdateValue(controlId, recordId, value)
- logger.Debug("Value updated - Property: {0}, ControlId: {1}", prop, controlId)
+ ' Wenn Bildmarke oder Wort- und Bildmarke, Bild aktualisieren
+ If prop = "MarkFeature" Then
+ If value = "wort-bildmarke" Or value = "bildmarke" Then
+ Dim imageControlId = db.GetControlId(formId, "MarkImage")
+ Dim bimage() As Byte = Image.ToByteArray(m.Image.BinaryImage)
+ db.UpdateImage(bimage, imageControlId, recordId)
+ End If
End If
+
+ logger.Debug("Value updated - Property: {0}, ControlId: {1}", prop, controlId)
+
+ 'Dim hasChanged As Boolean = Not db.IsEqual(controlId, recordId, value)
+ 'logger.Debug("Value for {0} has changed", recordId)
+
+ 'If hasChanged Then
+ ' propsChanged = True
+ ' ' Wert aktualisieren
+ ' db.UpdateValue(controlId, recordId, value)
+ ' logger.Debug("Value updated - Property: {0}, ControlId: {1}", prop, controlId)
+ 'End If
Next
If propsChanged Then