Skip to content

VB conversion error #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 25.1.3+
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @DevExpressExampleBot
1 change: 0 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!-- default badges list -->
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128571768/24.2.1%2B)
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E4238)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
Expand Down
2 changes: 1 addition & 1 deletion VB/DXMapExample/App.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Imports System.Windows
Imports System.Linq

Namespace DXMapExample

Expand Down
7 changes: 4 additions & 3 deletions VB/DXMapExample/DXMapExample.Net5.vbproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OptionInfer>On</OptionInfer>
<TargetFramework>net8.0-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace></RootNamespace>
<RootNamespace>
</RootNamespace>
<AssemblyName>DXMapExample</AssemblyName>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
Expand Down Expand Up @@ -48,4 +49,4 @@
<PackageReference Include="DevExpress.Wpf.Themes.Office2016White" Version="25.1.3" />
<PackageReference Include="DevExpress.Wpf.Themes.All" Version="25.1.3" />
</ItemGroup>
</Project>
</Project>
32 changes: 15 additions & 17 deletions VB/DXMapExample/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
Imports DevExpress.Xpf.Map
Imports System.Text
Imports System.Windows

Namespace DXMapExample

Public Partial Class MainWindow
Inherits Window

Public Sub New()
Me.InitializeComponent()
InitializeComponent()
End Sub

'#Region "#Search_Click"
#Region "#Search_Click"
Private Sub Search_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Me.searchDataProvider.Search(Me.teKeywords.Text)
searchDataProvider.Search(teKeywords.Text)
End Sub

'#End Region ' #Search_Click
'#Region "#SearchCompleted_Implementation"
#End Region ' #Search_Click
#Region "#SearchCompleted_Implementation"
Private Sub OnSearchCompleted(ByVal sender As Object, ByVal e As AzureSearchCompletedEventArgs)
If e.Cancelled Then Return
If e.RequestResult.ResultCode <> RequestResultCode.Success Then
Me.teResult.Text = "The Bing Search service does not work for this location."
If e.RequestResult.ResultCode IsNot RequestResultCode.Success Then
teResult.Text = "The Bing Search service does not work for this location."
Return
End If

Dim resultList As StringBuilder = New StringBuilder("")
Dim resCounter As Integer = 1
For Each resultInfo As LocationInformation In e.RequestResult.SearchResults
resultList.Append(String.Format("Result {0}: " & Microsoft.VisualBasic.Constants.vbCrLf, resCounter))
resultList.Append(String.Format("Name: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.DisplayName))
resultList.Append(String.Format("Address: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.Address.FormattedAddress))
resultList.Append(String.Format("Geographic coordinates: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.Location))
resultList.Append(String.Format("______________________________" & Microsoft.VisualBasic.Constants.vbCrLf))
resultList.Append([String].Format("Result {0}: " & Microsoft.VisualBasic.Constants.vbCrLf, resCounter))
resultList.Append([String].Format("Name: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.DisplayName))
resultList.Append([String].Format("Address: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.Address.FormattedAddress))
resultList.Append([String].Format("Geographic coordinates: {0}" & Microsoft.VisualBasic.Constants.vbCrLf, resultInfo.Location))
resultList.Append([String].Format("______________________________" & Microsoft.VisualBasic.Constants.vbCrLf))
resCounter += 1
Next

Me.teResult.Text = resultList.ToString()
teResult.Text = resultList.ToString()
End Sub

'#End Region ' #SearchCompleted_Implementation
#End Region ' #SearchCompleted_Implementation
Private Sub OnLayerItemsGenerating(ByVal sender As Object, ByVal args As LayerItemsGeneratingEventArgs)
Me.mapControl.ZoomToFit(args.Items, 0.4)
mapControl.ZoomToFit(args.Items, 0.4)
End Sub
End Class
End Namespace
3 changes: 1 addition & 2 deletions VB/DXMapExample/Properties/AssemblyInfo.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Windows
Imports System.Resources

' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
Expand Down
2 changes: 1 addition & 1 deletion VB/DXMapExample/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Expand Down