jj 14.03
This commit is contained in:
parent
93057172cd
commit
4c245e7e7b
@ -99,7 +99,6 @@ Partial Class frmGeodataNavigation
|
|||||||
Me.MapControl1.Layers.Add(VectorItemsLayer1)
|
Me.MapControl1.Layers.Add(VectorItemsLayer1)
|
||||||
Me.MapControl1.Location = New System.Drawing.Point(0, 0)
|
Me.MapControl1.Location = New System.Drawing.Point(0, 0)
|
||||||
Me.MapControl1.Name = "MapControl1"
|
Me.MapControl1.Name = "MapControl1"
|
||||||
Me.MapControl1.NavigationPanelOptions.Visible = False
|
|
||||||
Me.MapControl1.Size = New System.Drawing.Size(996, 572)
|
Me.MapControl1.Size = New System.Drawing.Size(996, 572)
|
||||||
Me.MapControl1.TabIndex = 2
|
Me.MapControl1.TabIndex = 2
|
||||||
'
|
'
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
Imports DevExpress.XtraMap
|
Imports DevExpress.XtraMap
|
||||||
Imports DevExpress.XtraEditors
|
Imports DevExpress.XtraEditors
|
||||||
Imports DevExpress.XtraGrid
|
Imports DevExpress.XtraGrid
|
||||||
|
Imports DevExpress.Map
|
||||||
Imports DevExpress.Utils
|
Imports DevExpress.Utils
|
||||||
Imports DevExpress.XtraGrid.Columns
|
Imports DevExpress.XtraGrid.Columns
|
||||||
Imports DevExpress.XtraEditors.Repository
|
Imports DevExpress.XtraEditors.Repository
|
||||||
@ -67,7 +68,7 @@ Public Class frmGeodataNavigation
|
|||||||
|
|
||||||
tsLabelRecordCount.Text = String.Format("{0} Elemente mit Koordinaten gefunden", items.Count)
|
tsLabelRecordCount.Text = String.Format("{0} Elemente mit Koordinaten gefunden", items.Count)
|
||||||
|
|
||||||
MapControl1.ZoomToFitLayerItems()
|
'MapControl1.ZoomToFitLayerItems()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@ -88,6 +89,28 @@ Public Class frmGeodataNavigation
|
|||||||
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 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)
|
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()
|
LoadData()
|
||||||
|
|
||||||
@ -100,11 +123,31 @@ Public Class frmGeodataNavigation
|
|||||||
Try
|
Try
|
||||||
Dim gridView As Views.Grid.GridView = Me.ConstructorMain_Grid.FocusedView
|
Dim gridView As Views.Grid.GridView = Me.ConstructorMain_Grid.FocusedView
|
||||||
gridView.ActiveFilterString = Nothing
|
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
|
Catch ex As Exception
|
||||||
MsgBox("Error in frmGeodataNavigation_FormClosing: " & vbNewLine & ex.Message)
|
MsgBox("Error in frmGeodataNavigation_FormClosing: " & vbNewLine & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
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 LoadData()
|
Private Sub LoadData()
|
||||||
Dim rowhandle As Integer = grvwMain.FocusedRowHandle
|
Dim rowhandle As Integer = grvwMain.FocusedRowHandle
|
||||||
|
|
||||||
|
|||||||
28
app/DD-Record-Organizer/frmGeodataSelect.Designer.vb
generated
28
app/DD-Record-Organizer/frmGeodataSelect.Designer.vb
generated
@ -26,12 +26,12 @@ Partial Class frmGeodataSelect
|
|||||||
Dim VectorItemsLayer1 As DevExpress.XtraMap.VectorItemsLayer = New DevExpress.XtraMap.VectorItemsLayer()
|
Dim VectorItemsLayer1 As DevExpress.XtraMap.VectorItemsLayer = New DevExpress.XtraMap.VectorItemsLayer()
|
||||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||||
Me.btnSave = New System.Windows.Forms.ToolStripButton()
|
Me.btnSave = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
Me.tsbtnactivate = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel()
|
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.txtLat = New System.Windows.Forms.ToolStripLabel()
|
Me.txtLat = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.ToolStripLabel4 = New System.Windows.Forms.ToolStripLabel()
|
Me.ToolStripLabel4 = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.txtLon = New System.Windows.Forms.ToolStripLabel()
|
Me.txtLon = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.tsbtnactivate = New System.Windows.Forms.ToolStripButton()
|
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.MapControl1 = New DevExpress.XtraMap.MapControl()
|
Me.MapControl1 = New DevExpress.XtraMap.MapControl()
|
||||||
Me.ToolStrip1.SuspendLayout()
|
Me.ToolStrip1.SuspendLayout()
|
||||||
CType(Me.MapControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.MapControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@ -55,13 +55,13 @@ Partial Class frmGeodataSelect
|
|||||||
Me.btnSave.Size = New System.Drawing.Size(79, 22)
|
Me.btnSave.Size = New System.Drawing.Size(79, 22)
|
||||||
Me.btnSave.Text = "Speichern"
|
Me.btnSave.Text = "Speichern"
|
||||||
'
|
'
|
||||||
'ToolStripLabel1
|
'tsbtnactivate
|
||||||
'
|
'
|
||||||
Me.ToolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
Me.tsbtnactivate.Image = Global.DD_Record_Organizer.My.Resources.Resources.base_globe_32
|
||||||
Me.ToolStripLabel1.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.tsbtnactivate.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
Me.tsbtnactivate.Name = "tsbtnactivate"
|
||||||
Me.ToolStripLabel1.Size = New System.Drawing.Size(146, 22)
|
Me.tsbtnactivate.Size = New System.Drawing.Size(148, 22)
|
||||||
Me.ToolStripLabel1.Text = "Ausgewählte Koordinaten:"
|
Me.tsbtnactivate.Text = "Aktiviere Mausauswahl"
|
||||||
'
|
'
|
||||||
'ToolStripLabel2
|
'ToolStripLabel2
|
||||||
'
|
'
|
||||||
@ -91,13 +91,13 @@ Partial Class frmGeodataSelect
|
|||||||
Me.txtLon.Size = New System.Drawing.Size(40, 22)
|
Me.txtLon.Size = New System.Drawing.Size(40, 22)
|
||||||
Me.txtLon.Text = "txtLon"
|
Me.txtLon.Text = "txtLon"
|
||||||
'
|
'
|
||||||
'tsbtnactivate
|
'ToolStripLabel1
|
||||||
'
|
'
|
||||||
Me.tsbtnactivate.Image = Global.DD_Record_Organizer.My.Resources.Resources.base_globe_32
|
Me.ToolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
||||||
Me.tsbtnactivate.ImageTransparentColor = System.Drawing.Color.Magenta
|
Me.ToolStripLabel1.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.tsbtnactivate.Name = "tsbtnactivate"
|
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
||||||
Me.tsbtnactivate.Size = New System.Drawing.Size(148, 22)
|
Me.ToolStripLabel1.Size = New System.Drawing.Size(146, 22)
|
||||||
Me.tsbtnactivate.Text = "Aktiviere Mausauswahl"
|
Me.ToolStripLabel1.Text = "Ausgewählte Koordinaten:"
|
||||||
'
|
'
|
||||||
'MapControl1
|
'MapControl1
|
||||||
'
|
'
|
||||||
|
|||||||
@ -44,7 +44,12 @@ 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
|
||||||
|
MapControl1.ZoomToFit(New List(Of MapPushpin) From {pin})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MapControl1_Click(sender As Object, e As MouseEventArgs) Handles MapControl1.Click
|
Private Sub MapControl1_Click(sender As Object, e As MouseEventArgs) Handles MapControl1.Click
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user