From 00c715d0ef413f3d947840839099cc1e3ded7509 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 1 Sep 2021 18:00:25 +0300 Subject: [PATCH 1/2] autogenerate VB --- VB/WpfApplication1.Net5.sln | 2 +- VB/WpfApplication1.sln | 2 +- VB/WpfApplication1/Application.xaml | 2 +- VB/WpfApplication1/Application.xaml.vb | 12 +- VB/WpfApplication1/DateDataSourceWrapper.vb | 360 +++++++++--------- VB/WpfApplication1/MainWindow.xaml | 2 +- VB/WpfApplication1/MainWindow.xaml.vb | 114 +++--- VB/WpfApplication1/My Project/AssemblyInfo.vb | 6 +- .../My Project/Resources.Designer.vb | 96 ++--- .../My Project/Settings.Designer.vb | 21 +- .../WpfApplication1.Net5.vbproj | 25 +- VB/WpfApplication1/WpfApplication1.vbproj | 68 +++- 12 files changed, 361 insertions(+), 349 deletions(-) diff --git a/VB/WpfApplication1.Net5.sln b/VB/WpfApplication1.Net5.sln index ae4d643..f0869ca 100644 --- a/VB/WpfApplication1.Net5.sln +++ b/VB/WpfApplication1.Net5.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 16 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication1.sln b/VB/WpfApplication1.sln index 545a2cb..30c1828 100644 --- a/VB/WpfApplication1.sln +++ b/VB/WpfApplication1.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication1/Application.xaml b/VB/WpfApplication1/Application.xaml index 81a7f0f..7d80047 100644 --- a/VB/WpfApplication1/Application.xaml +++ b/VB/WpfApplication1/Application.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for App.xaml - ''' - Partial Public Class App - Inherits Application + ''' + ''' Interaction logic for App.xaml + ''' + Partial Public Class App + Inherits Application - End Class + End Class End Namespace diff --git a/VB/WpfApplication1/DateDataSourceWrapper.vb b/VB/WpfApplication1/DateDataSourceWrapper.vb index b7db5c7..d2661c9 100644 --- a/VB/WpfApplication1/DateDataSourceWrapper.vb +++ b/VB/WpfApplication1/DateDataSourceWrapper.vb @@ -7,196 +7,196 @@ Imports System.Text Imports System.Collections Namespace CustomDatesPivot - Friend Class DateDataSourceWrapper - Implements ITypedList, IList, IEnumerator + Friend Class DateDataSourceWrapper + Implements ITypedList, IList, IEnumerator - Private position As Integer = -1 - Public ReadOnly NestedList As IList - Public ReadOnly CustomDates As List(Of Date) - Public ReadOnly Property NestedTypedList() As ITypedList - Get - Return DirectCast(NestedList, ITypedList) - End Get - End Property - Public Sub New(ByVal OriginalDatasource As ITypedList, ByVal dateFields As List(Of String), ByVal customDates As List(Of Date)) - _DateFields = dateFields - Me.NestedList = DirectCast(OriginalDatasource, IList) - Me.CustomDates = customDates - End Sub + Private position As Integer = -1 + Public ReadOnly NestedList As IList + Public ReadOnly CustomDates As List(Of DateTime) + Public ReadOnly Property NestedTypedList() As ITypedList + Get + Return DirectCast(NestedList, ITypedList) + End Get + End Property + Public Sub New(ByVal OriginalDatasource As ITypedList, ByVal dateFields As List(Of String), ByVal customDates As List(Of DateTime)) + _DateFields = dateFields + Me.NestedList = DirectCast(OriginalDatasource, IList) + Me.CustomDates = customDates + End Sub - Private ReadOnly _DateFields As List(Of String) + Private ReadOnly _DateFields As List(Of String) - Private Class EmptyObjectPropertyDescriptor - Inherits PropertyDescriptor + Private Class EmptyObjectPropertyDescriptor + Inherits PropertyDescriptor - Private ReadOnly _DateFields As List(Of String) - Public ReadOnly NestedDescriptor As PropertyDescriptor - Public Sub New(ByVal nestedDescriptor As PropertyDescriptor, ByVal dateFields As List(Of String)) - MyBase.New(nestedDescriptor.Name, CType((New ArrayList(nestedDescriptor.Attributes)).ToArray(GetType(Attribute)), Attribute())) - _DateFields = dateFields - Me.NestedDescriptor = nestedDescriptor - End Sub - Public Overrides Function CanResetValue(ByVal component As Object) As Boolean - Return False - End Function - Public Overrides ReadOnly Property ComponentType() As Type - Get - Return GetType(Object) - End Get - End Property - Public Overrides Function GetValue(ByVal component As Object) As Object - If TypeOf component Is Date Then - If _DateFields.Contains(NestedDescriptor.Name) Then - Return DirectCast(component, Date) - End If - Return Nothing - Else - Return NestedDescriptor.GetValue(component) - End If - End Function - Public Overrides ReadOnly Property IsReadOnly() As Boolean - Get - Return True - End Get - End Property - Public Overrides ReadOnly Property PropertyType() As Type - Get - Return NestedDescriptor.PropertyType - End Get - End Property - Public Overrides Sub ResetValue(ByVal component As Object) - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public Overrides Sub SetValue(ByVal component As Object, ByVal value As Object) - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public Overrides Function ShouldSerializeValue(ByVal component As Object) As Boolean - Return True - End Function - End Class - Public Function GetItemProperties(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptorCollection Implements ITypedList.GetItemProperties - Dim result As New List(Of PropertyDescriptor)() - For Each pd As PropertyDescriptor In NestedTypedList.GetItemProperties(ExtractOriginalDescriptors(listAccessors)) + Private ReadOnly _DateFields As List(Of String) + Public ReadOnly NestedDescriptor As PropertyDescriptor + Public Sub New(ByVal nestedDescriptor As PropertyDescriptor, ByVal dateFields As List(Of String)) + MyBase.New(nestedDescriptor.Name, CType((New ArrayList(nestedDescriptor.Attributes)).ToArray(GetType(Attribute)), Attribute())) + _DateFields = dateFields + Me.NestedDescriptor = nestedDescriptor + End Sub + Public Overrides Function CanResetValue(ByVal component As Object) As Boolean + Return False + End Function + Public Overrides ReadOnly Property ComponentType() As Type + Get + Return GetType(Object) + End Get + End Property + Public Overrides Function GetValue(ByVal component As Object) As Object + If TypeOf component Is DateTime Then + If _DateFields.Contains(NestedDescriptor.Name) Then + Return DirectCast(component, DateTime) + End If + Return Nothing + Else + Return NestedDescriptor.GetValue(component) + End If + End Function + Public Overrides ReadOnly Property IsReadOnly() As Boolean + Get + Return True + End Get + End Property + Public Overrides ReadOnly Property PropertyType() As Type + Get + Return NestedDescriptor.PropertyType + End Get + End Property + Public Overrides Sub ResetValue(ByVal component As Object) + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public Overrides Sub SetValue(ByVal component As Object, ByVal value As Object) + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public Overrides Function ShouldSerializeValue(ByVal component As Object) As Boolean + Return True + End Function + End Class + Public Function GetItemProperties(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptorCollection + Dim result As New List(Of PropertyDescriptor)() + For Each pd As PropertyDescriptor In NestedTypedList.GetItemProperties(ExtractOriginalDescriptors(listAccessors)) - result.Add(New EmptyObjectPropertyDescriptor(pd, _DateFields)) - Next pd - Return New PropertyDescriptorCollection(result.ToArray()) - End Function - Public Function GetListName(ByVal listAccessors() As PropertyDescriptor) As String Implements ITypedList.GetListName - Return NestedTypedList.GetListName(ExtractOriginalDescriptors(listAccessors)) - End Function + result.Add(New EmptyObjectPropertyDescriptor(pd, _DateFields)) + Next pd + Return New PropertyDescriptorCollection(result.ToArray()) + End Function + Public Function GetListName(ByVal listAccessors() As PropertyDescriptor) As String + Return NestedTypedList.GetListName(ExtractOriginalDescriptors(listAccessors)) + End Function - Protected Shared Function ExtractOriginalDescriptors(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptor() - If listAccessors Is Nothing Then - Return Nothing - End If - Dim convertedDescriptors(listAccessors.Length - 1) As PropertyDescriptor - For i As Integer = 0 To convertedDescriptors.Length - 1 - Dim d As PropertyDescriptor = listAccessors(i) - Dim c As EmptyObjectPropertyDescriptor = TryCast(d, EmptyObjectPropertyDescriptor) - If c IsNot Nothing Then - convertedDescriptors(i) = c.NestedDescriptor - Else - convertedDescriptors(i) = d - End If - Next i - Return convertedDescriptors - End Function - Public Function Add(ByVal value As Object) As Integer Implements IList.Add - Throw New NotSupportedException("The method or operation is not implemented.") - End Function - Public Sub Clear() Implements IList.Clear - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public Function Contains(ByVal value As Object) As Boolean Implements IList.Contains - If TypeOf value Is Date Then - Return CustomDates.Contains(DirectCast(value, Date)) - End If - Return NestedList.Contains(value) - End Function - Public Function IndexOf(ByVal value As Object) As Integer Implements IList.IndexOf - If TypeOf value Is Date AndAlso CustomDates.Contains(DirectCast(value, Date)) Then - Return CustomDates.IndexOf(DirectCast(value, Date)) - End If - Dim nres As Integer = NestedList.IndexOf(value) - If nres < 0 Then - Return nres - End If - Return nres + CustomDates.Count - End Function - Public Sub Insert(ByVal index As Integer, ByVal value As Object) Implements IList.Insert - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public ReadOnly Property IsFixedSize() As Boolean Implements IList.IsFixedSize - Get - Return True - End Get - End Property - Public ReadOnly Property IsReadOnly() As Boolean Implements IList.IsReadOnly - Get - Return True - End Get - End Property - Public Sub Remove(ByVal value As Object) Implements IList.Remove - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public Sub RemoveAt(ByVal index As Integer) Implements IList.RemoveAt - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Default Public Property Item(ByVal index As Integer) As Object Implements IList.Item - Get - If index < CustomDates.Count Then - Return CustomDates(index) - Else - Return NestedList(index - CustomDates.Count) - End If - End Get - Set(ByVal value As Object) - Throw New NotSupportedException("The method or operation is not implemented.") - End Set - End Property - Public Sub CopyTo(ByVal array As Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo - Throw New NotSupportedException("The method or operation is not implemented.") - End Sub - Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count - Get - Return NestedList.Count + CustomDates.Count - End Get - End Property - Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized - Get - Return False - End Get - End Property - Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot - Get - Return NestedList.SyncRoot - End Get - End Property + Protected Shared Function ExtractOriginalDescriptors(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptor() + If listAccessors Is Nothing Then + Return Nothing + End If + Dim convertedDescriptors(listAccessors.Length - 1) As PropertyDescriptor + For i As Integer = 0 To convertedDescriptors.Length - 1 + Dim d As PropertyDescriptor = listAccessors(i) + Dim c As EmptyObjectPropertyDescriptor = TryCast(d, EmptyObjectPropertyDescriptor) + If c IsNot Nothing Then + convertedDescriptors(i) = c.NestedDescriptor + Else + convertedDescriptors(i) = d + End If + Next i + Return convertedDescriptors + End Function + Public Function Add(ByVal value As Object) As Integer Implements IList.Add + Throw New NotSupportedException("The method or operation is not implemented.") + End Function + Public Sub Clear() Implements IList.Clear + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public Function Contains(ByVal value As Object) As Boolean Implements IList.Contains + If TypeOf value Is DateTime Then + Return CustomDates.Contains(DirectCast(value, DateTime)) + End If + Return NestedList.Contains(value) + End Function + Public Function IndexOf(ByVal value As Object) As Integer Implements IList.IndexOf + If TypeOf value Is DateTime AndAlso CustomDates.Contains(DirectCast(value, DateTime)) Then + Return CustomDates.IndexOf(DirectCast(value, DateTime)) + End If + Dim nres As Integer = NestedList.IndexOf(value) + If nres < 0 Then + Return nres + End If + Return nres + CustomDates.Count + End Function + Public Sub Insert(ByVal index As Integer, ByVal value As Object) Implements IList.Insert + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public ReadOnly Property IsFixedSize() As Boolean Implements IList.IsFixedSize + Get + Return True + End Get + End Property + Public ReadOnly Property IsReadOnly() As Boolean Implements IList.IsReadOnly + Get + Return True + End Get + End Property + Public Sub Remove(ByVal value As Object) Implements IList.Remove + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public Sub RemoveAt(ByVal index As Integer) Implements IList.RemoveAt + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Default Public Property Item(ByVal index As Integer) As Object Implements IList.Item + Get + If index < CustomDates.Count Then + Return CustomDates(index) + Else + Return NestedList(index - CustomDates.Count) + End If + End Get + Set(ByVal value As Object) + Throw New NotSupportedException("The method or operation is not implemented.") + End Set + End Property + Public Sub CopyTo(ByVal array As Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo + Throw New NotSupportedException("The method or operation is not implemented.") + End Sub + Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count + Get + Return NestedList.Count + CustomDates.Count + End Get + End Property + Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized + Get + Return False + End Get + End Property + Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot + Get + Return NestedList.SyncRoot + End Get + End Property - Public ReadOnly Property Current() As Object Implements IEnumerator.Current - Get - If position < CustomDates.Count Then - Return CustomDates(position) - Else - Return NestedList(position - CustomDates.Count) - End If - End Get - End Property + Public ReadOnly Property Current() As Object Implements IEnumerator.Current + Get + If position < CustomDates.Count Then + Return CustomDates(position) + Else + Return NestedList(position - CustomDates.Count) + End If + End Get + End Property - Public Function GetEnumerator() As IEnumerator Implements System.Collections.IEnumerable.GetEnumerator - Return DirectCast(Me, IEnumerator) - End Function + Public Function GetEnumerator() As IEnumerator Implements System.Collections.IEnumerable.GetEnumerator + Return DirectCast(Me, IEnumerator) + End Function - Public Function MoveNext() As Boolean Implements IEnumerator.MoveNext - position += 1 - Return (position < Count) - End Function + Public Function MoveNext() As Boolean Implements IEnumerator.MoveNext + position += 1 + Return (position < Count) + End Function - Public Sub Reset() Implements IEnumerator.Reset - position = 0 - End Sub - End Class + Public Sub Reset() Implements IEnumerator.Reset + position = 0 + End Sub + End Class End Namespace \ No newline at end of file diff --git a/VB/WpfApplication1/MainWindow.xaml b/VB/WpfApplication1/MainWindow.xaml index 268afb5..43335f1 100644 --- a/VB/WpfApplication1/MainWindow.xaml +++ b/VB/WpfApplication1/MainWindow.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for MainWindow.xaml - ''' - Partial Public Class MainWindow - Inherits Window + ''' + ''' Interaction logic for MainWindow.xaml + ''' + Partial Public Class MainWindow + Inherits Window - Private Table As DataTable - Public Sub New() - InitializeComponent() - End Sub + Private Table As DataTable + Public Sub New() + InitializeComponent() + End Sub - Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) - dateEdit1.DateTime = Date.Now - dateEdit2.DateTime = Date.Now.AddMonths(12) - Table = CreatePivotTable(100) - pivot.DataSource = Table - End Sub + Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) + dateEdit1.DateTime = DateTime.Now + dateEdit2.DateTime = DateTime.Now.AddMonths(12) + Table = CreatePivotTable(100) + pivot.DataSource = Table + End Sub - Private Shared Function CreatePivotTable(ByVal RowCount As Integer) As DataTable - Dim rnd As New Random() + Private Shared Function CreatePivotTable(ByVal RowCount As Integer) As DataTable + Dim rnd As New Random() - Dim tbl As New DataTable() - tbl.Columns.Add("ID", GetType(Integer)) - tbl.Columns.Add("Name", GetType(String)) - tbl.Columns.Add("Checked", GetType(Boolean)) - tbl.Columns.Add("Number", GetType(Integer)) - tbl.Columns.Add("Value", GetType(Decimal)) - tbl.Columns.Add("AltValue", GetType(Decimal)) - tbl.Columns.Add("Date", GetType(Date)) + Dim tbl As New DataTable() + tbl.Columns.Add("ID", GetType(Integer)) + tbl.Columns.Add("Name", GetType(String)) + tbl.Columns.Add("Checked", GetType(Boolean)) + tbl.Columns.Add("Number", GetType(Integer)) + tbl.Columns.Add("Value", GetType(Decimal)) + tbl.Columns.Add("AltValue", GetType(Decimal)) + tbl.Columns.Add("Date", GetType(DateTime)) - For i As Integer = 0 To RowCount - 1 - Dim row As DataRow = tbl.Rows.Add(New Object() { i, String.Format("Name{0}", i Mod 9), i Mod 2 = 0, rnd.Next(10), rnd.Next(100, 1000), rnd.Next(100, 1000), Date.Now.AddDays(rnd.Next(300)) }) - Next i - Return tbl - End Function + For i As Integer = 0 To RowCount - 1 + Dim row As DataRow = tbl.Rows.Add(New Object() { i, String.Format("Name{0}", i Mod 9), i Mod 2 = 0, rnd.Next(10), rnd.Next(100, 1000), rnd.Next(100, 1000), DateTime.Now.AddDays(rnd.Next(300)) }) + Next i + Return tbl + End Function - Private Sub pivot_CustomFieldValueCells(ByVal sender As Object, ByVal e As DevExpress.Xpf.PivotGrid.PivotCustomFieldValueCellsEventArgs) - Dim index As Integer = pivot.GetRowIndex(New Object() { Nothing }) - If index <> -1 Then - e.Remove(e.GetCell(False, index)) - End If - End Sub + Private Sub pivot_CustomFieldValueCells(ByVal sender As Object, ByVal e As DevExpress.Xpf.PivotGrid.PivotCustomFieldValueCellsEventArgs) + Dim index As Integer = pivot.GetRowIndex(New Object() { Nothing }) + If index <> -1 Then + e.Remove(e.GetCell(False, index)) + End If + End Sub - Private Sub button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - Dim DateFields As New List(Of String)() - DateFields.Add("Date") - Dim CustomDates As New List(Of Date)() - Dim [date] As Date = dateEdit1.DateTime - Do While [date] < dateEdit2.DateTime - CustomDates.Add([date]) - Select Case comboBox.Text - Case "Year" - [date] = [date].AddYears(1) - Case "Quarter" - [date] = [date].AddMonths(3) - Case "Month" - [date] = [date].AddMonths(1) - Case Else - [date] = [date].AddDays(1) - End Select - Loop - pivot.DataSource = New DateDataSourceWrapper(Table.DefaultView, DateFields, CustomDates) - End Sub - End Class + Private Sub button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) + Dim DateFields As New List(Of String)() + DateFields.Add("Date") + Dim CustomDates As New List(Of DateTime)() + Dim [date] As DateTime = dateEdit1.DateTime + Do While [date] < dateEdit2.DateTime + CustomDates.Add([date]) + Select Case comboBox.Text + Case "Year" + [date] = [date].AddYears(1) + Case "Quarter" + [date] = [date].AddMonths(3) + Case "Month" + [date] = [date].AddMonths(1) + Case Else + [date] = [date].AddDays(1) + End Select + Loop + pivot.DataSource = New DateDataSourceWrapper(Table.DefaultView, DateFields, CustomDates) + End Sub + End Class End Namespace diff --git a/VB/WpfApplication1/My Project/AssemblyInfo.vb b/VB/WpfApplication1/My Project/AssemblyInfo.vb index 8cd7145..a9e9a61 100644 --- a/VB/WpfApplication1/My Project/AssemblyInfo.vb +++ b/VB/WpfApplication1/My Project/AssemblyInfo.vb @@ -31,11 +31,7 @@ Imports System.Windows '[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - 'where the generic resource dictionary is located - where theme specific resource dictionaries are located - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) + ' Version information for an assembly consists of the following four values: diff --git a/VB/WpfApplication1/My Project/Resources.Designer.vb b/VB/WpfApplication1/My Project/Resources.Designer.vb index fd55551..d7ba6b1 100644 --- a/VB/WpfApplication1/My Project/Resources.Designer.vb +++ b/VB/WpfApplication1/My Project/Resources.Designer.vb @@ -11,51 +11,53 @@ Namespace My.Resources - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - ' This class was auto-generated by the StronglyTypedResourceBuilder - ' class via a tool like ResGen or Visual Studio. - ' To add or remove a member, edit your .ResX file then rerun ResGen - ' with the /str option, or rebuild your VS project. - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - -' internal Resources() -' { -' } - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If (resourceMan Is Nothing) Then - Dim temp As New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + ' This class was auto-generated by the StronglyTypedResourceBuilder + ' class via a tool like ResGen or Visual Studio. + ' To add or remove a member, edit your .ResX file then rerun ResGen + ' with the /str option, or rebuild your VS project. + + + + Friend Module Resources + + Private resourceMan As System.Resources.ResourceManager + + Private resourceCulture As System.Globalization.CultureInfo + +' internal Resources() +' { +' } + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + + Friend ReadOnly Property ResourceManager() As System.Resources.ResourceManager + Get + If (resourceMan Is Nothing) Then + Dim temp As New System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + + Friend Property Culture() As System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module End Namespace diff --git a/VB/WpfApplication1/My Project/Settings.Designer.vb b/VB/WpfApplication1/My Project/Settings.Designer.vb index e9978f6..5e19dc1 100644 --- a/VB/WpfApplication1/My Project/Settings.Designer.vb +++ b/VB/WpfApplication1/My Project/Settings.Designer.vb @@ -11,16 +11,17 @@ Namespace My - _ - Friend NotInheritable Partial Class Settings - Inherits System.Configuration.ApplicationSettingsBase + + + Friend NotInheritable Partial Class Settings + Inherits System.Configuration.ApplicationSettingsBase - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) + Private Shared defaultInstance As Settings = (CType(System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) - Public Shared ReadOnly Property [Default]() As Settings - Get - Return defaultInstance - End Get - End Property - End Class + Public Shared ReadOnly Property [Default]() As Settings + Get + Return defaultInstance + End Get + End Property + End Class End Namespace diff --git a/VB/WpfApplication1/WpfApplication1.Net5.vbproj b/VB/WpfApplication1/WpfApplication1.Net5.vbproj index dd20a95..6805a50 100644 --- a/VB/WpfApplication1/WpfApplication1.Net5.vbproj +++ b/VB/WpfApplication1/WpfApplication1.Net5.vbproj @@ -1,3 +1,4 @@ + net5.0-windows @@ -11,27 +12,11 @@ x86;AnyCPU false obj*/** + On + Binary + Off + On - - - - - - - - - - - - - - - - - - - - diff --git a/VB/WpfApplication1/WpfApplication1.vbproj b/VB/WpfApplication1/WpfApplication1.vbproj index 27ad0e6..f786ece 100644 --- a/VB/WpfApplication1/WpfApplication1.vbproj +++ b/VB/WpfApplication1/WpfApplication1.vbproj @@ -12,11 +12,11 @@ 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} true + obj.NetFX On Binary Off On - obj.NetFX AnyCPU @@ -27,6 +27,7 @@ true true prompt + true AnyCPU @@ -36,36 +37,62 @@ false true prompt + true - + + + + - - + - - + - - - - - - - - + + True + C:\DXDlls\21.1.5\DevExpress.Data.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Mvvm.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.PivotGrid.v21.1.Core.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Printing.v21.1.Core.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Data.Desktop.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Core.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.PivotGrid.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Printing.v21.1.dll + @@ -126,6 +153,7 @@ SettingsSingleFileGenerator Settings.Designer.vb + My @@ -133,11 +161,11 @@ - \ No newline at end of file From 85b467c8791cab02614b7278aabde9314d29854b Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 1 Sep 2021 19:19:32 +0300 Subject: [PATCH 2/2] README auto update [skip ci] --- Readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Readme.md b/Readme.md index d5cfc1a..1350260 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128578327/17.2.6%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/T615806) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)