Merge branch 'master' of http://SchreiberM@172.24.11.74:90/scm/git/RecordOrganizer
This commit is contained in:
@@ -184,4 +184,40 @@ Public Class ClassLayout
|
|||||||
|
|
||||||
Return Result
|
Return Result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Sub PutValue(Name As String, Value As String)
|
||||||
|
Dim doc As XDocument = XDocument.Load(_filename)
|
||||||
|
Dim settings As XElement = doc.Element("Settings")
|
||||||
|
|
||||||
|
Dim el As XElement = settings.Descendants("Setting").Where(Function(s)
|
||||||
|
Return s.Attribute("name") = Name
|
||||||
|
End Function).SingleOrDefault()
|
||||||
|
|
||||||
|
If IsNothing(el) Then
|
||||||
|
settings.Add(New XElement("Setting",
|
||||||
|
New XAttribute("name", Name),
|
||||||
|
New XAttribute("value", Value)))
|
||||||
|
Else
|
||||||
|
el.SetAttributeValue("value", Value)
|
||||||
|
End If
|
||||||
|
|
||||||
|
doc.Save(_filename)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function GetValue(Name As String) As String
|
||||||
|
Dim doc As XDocument = XDocument.Load(_filename)
|
||||||
|
Dim settings As XElement = doc.Element("Settings")
|
||||||
|
|
||||||
|
Dim el As XElement = settings.Descendants("Setting").Where(Function(s)
|
||||||
|
Return s.Attribute("name") = Name
|
||||||
|
End Function).SingleOrDefault()
|
||||||
|
|
||||||
|
If IsNothing(el) Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
Return el.Attribute("value").Value
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6067,7 +6067,7 @@ Public Class frmConstructor_Main
|
|||||||
JUMP_RECORD_ID = 0
|
JUMP_RECORD_ID = 0
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles tsbtnGeodata.Click
|
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles tsbtnGeodata.Click
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Show_Detail_Record: ", "dsdfsdfdsfdsf")
|
'ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Show_Detail_Record: ", "dsdfsdfdsfdsf")
|
||||||
Dim frm As New frmGeodataNavigation(GridControlMain, CURRENT_ENTITY_ID)
|
Dim frm As New frmGeodataNavigation(GridControlMain, CURRENT_ENTITY_ID)
|
||||||
frm.Show()
|
frm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ Public Class frmGeodataSelect
|
|||||||
dataProvider.BingKey = BING_KEY
|
dataProvider.BingKey = BING_KEY
|
||||||
ImageLayer.DataProvider = dataProvider
|
ImageLayer.DataProvider = dataProvider
|
||||||
|
|
||||||
|
Dim XMLPath = Get_Settings_Filename()
|
||||||
|
Dim layout As New ClassLayout(XMLPath)
|
||||||
|
|
||||||
Dim storage As New MapItemStorage()
|
Dim storage As New MapItemStorage()
|
||||||
VectorLayer.Data = storage
|
VectorLayer.Data = storage
|
||||||
|
|
||||||
@@ -45,7 +48,14 @@ Public Class frmGeodataSelect
|
|||||||
txtLat.Text = SelectedPoint.Latitude.ToString()
|
txtLat.Text = SelectedPoint.Latitude.ToString()
|
||||||
txtLon.Text = SelectedPoint.Longitude.ToString()
|
txtLon.Text = SelectedPoint.Longitude.ToString()
|
||||||
|
|
||||||
MapControl1.ZoomLevel = 7
|
Dim zoomLevel = layout.GetValue("MapControlSelect_ZoomLevel")
|
||||||
|
|
||||||
|
If IsNothing(zoomLevel) Then
|
||||||
|
MapControl1.ZoomLevel = 10.0
|
||||||
|
Else
|
||||||
|
MapControl1.ZoomLevel = Double.Parse(zoomLevel)
|
||||||
|
End If
|
||||||
|
|
||||||
MapControl1.ZoomToFit(New List(Of MapPushpin) From {pin})
|
MapControl1.ZoomToFit(New List(Of MapPushpin) From {pin})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -77,10 +87,22 @@ Public Class frmGeodataSelect
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||||
|
Dim XMLPath = Get_Settings_Filename()
|
||||||
|
Dim layout As New ClassLayout(XMLPath)
|
||||||
|
Dim settings As New System.Collections.Generic.List(Of ClassSetting)
|
||||||
|
settings = layout.Load()
|
||||||
|
|
||||||
|
layout.PutValue("MapControlSelect_ZoomLevel", MapControl1.ZoomLevel)
|
||||||
|
|
||||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function Get_Settings_Filename()
|
||||||
|
Dim Filename As String = String.Format("{0}-Geodata-Layout.xml", CURRENT_CONSTRUCTOR_ID)
|
||||||
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub tsbtnactivate_Click(sender As Object, e As EventArgs) Handles tsbtnactivate.Click
|
Private Sub tsbtnactivate_Click(sender As Object, e As EventArgs) Handles tsbtnactivate.Click
|
||||||
If _SelectActive = False Then
|
If _SelectActive = False Then
|
||||||
_SelectActive = True
|
_SelectActive = True
|
||||||
|
|||||||
Reference in New Issue
Block a user