jj 14.03
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports DevExpress.XtraMap
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Map
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
@@ -67,7 +68,7 @@ Public Class frmGeodataNavigation
|
||||
|
||||
tsLabelRecordCount.Text = String.Format("{0} Elemente mit Koordinaten gefunden", items.Count)
|
||||
|
||||
MapControl1.ZoomToFitLayerItems()
|
||||
'MapControl1.ZoomToFitLayerItems()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -88,6 +89,28 @@ Public Class frmGeodataNavigation
|
||||
dataProvider.BingKey = BING_KEY
|
||||
ImageLayer.DataProvider = dataProvider
|
||||
|
||||
Dim XMLPath = Get_Settings_Filename()
|
||||
Dim layout As New ClassLayout(XMLPath)
|
||||
Dim settings As New System.Collections.Generic.List(Of ClassSetting)
|
||||
settings = layout.Load()
|
||||
|
||||
Dim centerX, centerY As Double
|
||||
|
||||
For Each setting In settings
|
||||
Select Case setting._name
|
||||
Case "MapControl_ZoomLevel"
|
||||
MapControl1.ZoomLevel = Double.Parse(setting._value)
|
||||
Case "MapControl_CenterX"
|
||||
centerX = Double.Parse(setting._value)
|
||||
Case "MapControl_CenterY"
|
||||
centerY = Double.Parse(setting._value)
|
||||
End Select
|
||||
Next
|
||||
|
||||
Dim center As New GeoPoint(centerY, centerX)
|
||||
MapControl1.SetCenterPoint(center, False)
|
||||
|
||||
|
||||
EntitySql = Get_Grid_Sql(CURRENT_CONSTRUCTOR_ID, CURRENT_ENTITY_ID, CURRENT_CONSTRUCTOR_DETAIL_ID, frmConstructor_Main.GridType.Grid, USER_GUID, String.Empty, False, 1, 0, GridControlGeo, grvwMain, True)
|
||||
LoadData()
|
||||
|
||||
@@ -100,11 +123,31 @@ Public Class frmGeodataNavigation
|
||||
Try
|
||||
Dim gridView As Views.Grid.GridView = Me.ConstructorMain_Grid.FocusedView
|
||||
gridView.ActiveFilterString = Nothing
|
||||
|
||||
Dim zoomLevel = MapControl1.ZoomLevel
|
||||
Dim xCoord = MapControl1.CenterPoint.GetX
|
||||
Dim yCoord = MapControl1.CenterPoint.GetY
|
||||
|
||||
Dim XMLPath = Get_Settings_Filename()
|
||||
Dim layout As New ClassLayout(XMLPath)
|
||||
Dim settings As New System.Collections.Generic.List(Of ClassSetting)
|
||||
|
||||
settings.Add(New ClassSetting("MapControl_ZoomLevel", zoomLevel))
|
||||
settings.Add(New ClassSetting("MapControl_CenterX", xCoord))
|
||||
settings.Add(New ClassSetting("MapControl_CenterY", yCoord))
|
||||
|
||||
layout.Save(settings)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in frmGeodataNavigation_FormClosing: " & vbNewLine & ex.Message)
|
||||
End Try
|
||||
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 LoadData()
|
||||
Dim rowhandle As Integer = grvwMain.FocusedRowHandle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user