From eb45679337f718f70f3c1177fe80a370242ce3a4 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 15 Feb 2023 16:21:19 +0400 Subject: [PATCH 1/2] autogenerate VB --- VB/WpfApplication1.Net5.sln | 2 +- VB/WpfApplication1.sln | 2 +- VB/WpfApplication1/App.xaml | 8 + VB/WpfApplication1/App.xaml.vb | 15 + VB/WpfApplication1/MainWindow.xaml.vb | 48 +-- VB/WpfApplication1/MyDataClass.vb | 13 +- VB/WpfApplication1/Properties/AssemblyInfo.vb | 37 ++ .../Properties/Resources.Designer.vb | 64 +++ VB/WpfApplication1/Properties/Resources.resx | 117 ++++++ .../Properties/Settings.Designer.vb | 25 ++ .../Properties/Settings.settings | 7 + .../WpfApplication1.Net5.vbproj | 19 +- VB/WpfApplication1/WpfApplication1.vbproj | 75 ++-- VB/WpfApplication1/XtraReport1.Designer.vb | 397 +++++++++--------- VB/WpfApplication1/XtraReport1.vb | 14 +- 15 files changed, 547 insertions(+), 296 deletions(-) create mode 100644 VB/WpfApplication1/App.xaml create mode 100644 VB/WpfApplication1/App.xaml.vb create mode 100644 VB/WpfApplication1/Properties/AssemblyInfo.vb create mode 100644 VB/WpfApplication1/Properties/Resources.Designer.vb create mode 100644 VB/WpfApplication1/Properties/Resources.resx create mode 100644 VB/WpfApplication1/Properties/Settings.Designer.vb create mode 100644 VB/WpfApplication1/Properties/Settings.settings diff --git a/VB/WpfApplication1.Net5.sln b/VB/WpfApplication1.Net5.sln index 2255e7e..06c4745 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 = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication1.sln b/VB/WpfApplication1.sln index 63f53a1..05f9e88 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 = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication1/App.xaml b/VB/WpfApplication1/App.xaml new file mode 100644 index 0000000..5c219c6 --- /dev/null +++ b/VB/WpfApplication1/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/VB/WpfApplication1/App.xaml.vb b/VB/WpfApplication1/App.xaml.vb new file mode 100644 index 0000000..8b6d98f --- /dev/null +++ b/VB/WpfApplication1/App.xaml.vb @@ -0,0 +1,15 @@ +Imports System.Windows + +Namespace WpfApplication1 + + ''' + ''' Interaction logic for App.xaml + ''' + Public Partial Class App + Inherits Application + + Private Sub OnAppStartup_UpdateThemeName(ByVal sender As Object, ByVal e As StartupEventArgs) + DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName() + End Sub + End Class +End Namespace diff --git a/VB/WpfApplication1/MainWindow.xaml.vb b/VB/WpfApplication1/MainWindow.xaml.vb index c1fc3f4..e3e8e88 100644 --- a/VB/WpfApplication1/MainWindow.xaml.vb +++ b/VB/WpfApplication1/MainWindow.xaml.vb @@ -1,33 +1,33 @@ -Imports System.ComponentModel +Imports System.ComponentModel Imports System.Windows Imports DevExpress.DataAccess.ObjectBinding -Imports DevExpress.Xpf.Reports.UserDesigner Imports DevExpress.XtraReports.UI Namespace WpfApplication1 - ''' - ''' Interaction logic for MainWindow.xaml - ''' - Partial Public Class MainWindow - Inherits Window - Public Sub New() - InitializeComponent() - designer.OpenDocument(New XtraReport1()) - End Sub + ''' + ''' Interaction logic for MainWindow.xaml + ''' + Public Partial Class MainWindow + Inherits Window - Private Sub ReplaceDataSource_ItemClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.Bars.ItemClickEventArgs) - Dim newDataSource = New ObjectDataSource With {.DataSource = GetType(MyDataClass)} - Dim report As XtraReport = designer.ActiveDocument.Diagram.RootItem.XRObject - Dim oldDataSource = TryCast(report.DataSource, IComponent) + Public Sub New() + Me.InitializeComponent() + Me.designer.OpenDocument(New XtraReport1()) + End Sub - designer.ActiveDocument.MakeChanges(Sub(changes) - If oldDataSource IsNot Nothing Then - changes.RemoveItem(oldDataSource) - End If - changes.AddItem(newDataSource) - changes.SetProperty(report, Function(x) x.DataSource, newDataSource) - End Sub) - End Sub - End Class + Private Sub ReplaceDataSource_ItemClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.Bars.ItemClickEventArgs) + Dim newDataSource = New ObjectDataSource With {.DataSource = GetType(MyDataClass)} + Dim report As XtraReport = Me.designer.ActiveDocument.Diagram.RootItem.XRObject + Dim oldDataSource = TryCast(report.DataSource, IComponent) + Me.designer.ActiveDocument.MakeChanges(Sub(changes) + If oldDataSource IsNot Nothing Then + changes.RemoveItem(oldDataSource) + End If + + changes.AddItem(newDataSource) + changes.SetProperty(report, Function(x) x.DataSource, newDataSource) + End Sub) + End Sub + End Class End Namespace diff --git a/VB/WpfApplication1/MyDataClass.vb b/VB/WpfApplication1/MyDataClass.vb index 9aa7ae3..162c4b3 100644 --- a/VB/WpfApplication1/MyDataClass.vb +++ b/VB/WpfApplication1/MyDataClass.vb @@ -1,6 +1,9 @@ -Namespace WpfApplication1 - Public Class MyDataClass - Public Property ID() As Integer - Public Property Name() As String - End Class +Namespace WpfApplication1 + + Public Class MyDataClass + + Public Property ID As Integer + + Public Property Name As String + End Class End Namespace diff --git a/VB/WpfApplication1/Properties/AssemblyInfo.vb b/VB/WpfApplication1/Properties/AssemblyInfo.vb new file mode 100644 index 0000000..8d2e99c --- /dev/null +++ b/VB/WpfApplication1/Properties/AssemblyInfo.vb @@ -0,0 +1,37 @@ +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + + + + + + + + +' Setting ComVisible to false makes the types in this assembly not visible +' to COM components. If you need to access a type in this assembly from +' COM, set the ComVisible attribute to true on that type. + +'In order to begin building localizable applications, set +'CultureYouAreCodingWith in your .csproj file +'inside a . For example, if you are using US english +'in your source files, set the to en-US. Then uncomment +'the NeutralResourceLanguage attribute below. Update the "en-US" in +'the line below to match the UICulture setting in the project file. +'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' [assembly: AssemblyVersion("1.0.*")] + + diff --git a/VB/WpfApplication1/Properties/Resources.Designer.vb b/VB/WpfApplication1/Properties/Resources.Designer.vb new file mode 100644 index 0000000..23b5679 --- /dev/null +++ b/VB/WpfApplication1/Properties/Resources.Designer.vb @@ -0,0 +1,64 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ +Imports System + +Namespace WpfApplication1.Properties + + ''' + ''' 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 Class Resources + + Private Shared resourceMan As Global.System.Resources.ResourceManager + + Private Shared resourceCulture As Global.System.Globalization.CultureInfo + + + Friend Sub New() + End Sub + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + + Friend Shared ReadOnly Property ResourceManager As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(WpfApplication1.Properties.Resources.resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Resources", GetType(WpfApplication1.Properties.Resources).Assembly) + WpfApplication1.Properties.Resources.resourceMan = temp + End If + + Return WpfApplication1.Properties.Resources.resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + + Friend Shared Property Culture As Global.System.Globalization.CultureInfo + Get + Return WpfApplication1.Properties.Resources.resourceCulture + End Get + + Set(ByVal value As Global.System.Globalization.CultureInfo) + WpfApplication1.Properties.Resources.resourceCulture = value + End Set + End Property + End Class +End Namespace diff --git a/VB/WpfApplication1/Properties/Resources.resx b/VB/WpfApplication1/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/VB/WpfApplication1/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VB/WpfApplication1/Properties/Settings.Designer.vb b/VB/WpfApplication1/Properties/Settings.Designer.vb new file mode 100644 index 0000000..70002d6 --- /dev/null +++ b/VB/WpfApplication1/Properties/Settings.Designer.vb @@ -0,0 +1,25 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ +Namespace WpfApplication1.Properties + + + + Friend NotInheritable Partial Class Settings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As WpfApplication1.Properties.Settings = CType((Global.System.Configuration.ApplicationSettingsBase.Synchronized(New WpfApplication1.Properties.Settings())), WpfApplication1.Properties.Settings) + + Public Shared ReadOnly Property [Default] As Settings + Get + Return WpfApplication1.Properties.Settings.defaultInstance + End Get + End Property + End Class +End Namespace diff --git a/VB/WpfApplication1/Properties/Settings.settings b/VB/WpfApplication1/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/VB/WpfApplication1/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/VB/WpfApplication1/WpfApplication1.Net5.vbproj b/VB/WpfApplication1/WpfApplication1.Net5.vbproj index b0b81ec..974a736 100644 --- a/VB/WpfApplication1/WpfApplication1.Net5.vbproj +++ b/VB/WpfApplication1/WpfApplication1.Net5.vbproj @@ -1,28 +1,29 @@ + On net5.0-windows WinExe - + + WpfApplication1 false true true x86;AnyCPU - true + false false - obj*/** - On - Binary - Off - On + false + + + Component - + @@ -62,4 +63,4 @@ - + \ No newline at end of file diff --git a/VB/WpfApplication1/WpfApplication1.vbproj b/VB/WpfApplication1/WpfApplication1.vbproj index 2b1d4bf..837ca6e 100644 --- a/VB/WpfApplication1/WpfApplication1.vbproj +++ b/VB/WpfApplication1/WpfApplication1.vbproj @@ -1,20 +1,20 @@ - + + On Debug AnyCPU {0162F1A9-2ED8-45AD-B0BC-D05D86D90408} WinExe - + Properties + + WpfApplication1 v4.5.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + 4 obj.NetFX - On - Binary - Off - On AnyCPU @@ -22,46 +22,22 @@ full false bin\Debug\ - true - true + DEBUG,TRACE prompt + 4 false - true - true + false AnyCPU pdbonly true bin\Release\ - false - true + TRACE prompt - true - true + 4 + false - - - - - - - - - - - - - - - - - - - - - - @@ -120,7 +96,7 @@ - + MSBuild:Compile Designer @@ -135,8 +111,8 @@ MSBuild:Compile Designer - - Application.xaml + + App.xaml Code @@ -145,43 +121,42 @@ - + Code - + True True Resources.resx - + True Settings.settings True - - VbMyResourcesResXFileCodeGenerator + + ResXFileCodeGenerator Resources.Designer.vb - My.Resources + WpfApplication1.Properties XtraReport1.vb - + SettingsSingleFileGenerator Settings.Designer.vb - My - + - - + \ No newline at end of file diff --git a/VB/WpfApplication1/XtraReport1.Designer.vb b/VB/WpfApplication1/XtraReport1.Designer.vb index 7eb4b31..145ecfa 100644 --- a/VB/WpfApplication1/XtraReport1.Designer.vb +++ b/VB/WpfApplication1/XtraReport1.Designer.vb @@ -1,206 +1,207 @@ -Imports Microsoft.VisualBasic - Namespace WpfApplication1 - Partial Public Class XtraReport1 - ''' - ''' Required designer variable. - ''' - Private components As System.ComponentModel.IContainer = Nothing - ''' - ''' Clean up any resources being used. - ''' - ''' true if managed resources should be disposed; otherwise, false. - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - If disposing AndAlso (components IsNot Nothing) Then - components.Dispose() - End If - MyBase.Dispose(disposing) - End Sub + Partial Class XtraReport1 + + ''' + ''' Required designer variable. + ''' + Private components As System.ComponentModel.IContainer = Nothing + + ''' + ''' Clean up any resources being used. + ''' + ''' true if managed resources should be disposed; otherwise, false. + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso (Me.components IsNot Nothing) Then + Me.components.Dispose() + End If + + MyBase.Dispose(disposing) + End Sub + +#Region "Designer generated code" + ''' + ''' Required method for Designer support - do not modify + ''' the contents of this method with the code editor. + ''' + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim selectQuery1 As DevExpress.DataAccess.Sql.SelectQuery = New DevExpress.DataAccess.Sql.SelectQuery() + Dim column1 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression1 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim table1 As DevExpress.DataAccess.Sql.Table = New DevExpress.DataAccess.Sql.Table() + Dim column2 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression2 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column3 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression3 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column4 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression4 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column5 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression5 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column6 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression6 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column7 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression7 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column8 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression8 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column9 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression9 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column10 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression10 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column11 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression11 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column12 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression12 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column13 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression13 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column14 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression14 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column15 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression15 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim column16 As DevExpress.DataAccess.Sql.Column = New DevExpress.DataAccess.Sql.Column() + Dim columnExpression16 As DevExpress.DataAccess.Sql.ColumnExpression = New DevExpress.DataAccess.Sql.ColumnExpression() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(WpfApplication1.XtraReport1)) + Me.Detail = New DevExpress.XtraReports.UI.DetailBand() + Me.xrLabel1 = New DevExpress.XtraReports.UI.XRLabel() + Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand() + Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand() + Me.sqlDataSource1 = New DevExpress.DataAccess.Sql.SqlDataSource(Me.components) + CType((Me), System.ComponentModel.ISupportInitialize).BeginInit() + ' + ' Detail + ' + Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.xrLabel1}) + Me.Detail.Dpi = 100F + Me.Detail.HeightF = 200F + Me.Detail.Name = "Detail" + Me.Detail.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) + Me.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft + ' + ' xrLabel1 + ' + Me.xrLabel1.AnchorHorizontal = DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left + Me.xrLabel1.Dpi = 100F + Me.xrLabel1.Font = New System.Drawing.Font("Times New Roman", 18F, System.Drawing.FontStyle.Bold) + Me.xrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(78.74998F, 47.50001F) + Me.xrLabel1.Multiline = True + Me.xrLabel1.Name = "xrLabel1" + Me.xrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F) + Me.xrLabel1.SizeF = New System.Drawing.SizeF(497.7084F, 100.8333F) + Me.xrLabel1.StylePriority.UseFont = False + Me.xrLabel1.StylePriority.UseTextAlignment = False + Me.xrLabel1.Text = "Click the ""Replace DataSource"" button" & Global.Microsoft.VisualBasic.Constants.vbCrLf & "and view a new report data source in the R" & "eport Explorer" + Me.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter + ' + ' TopMargin + ' + Me.TopMargin.Dpi = 100F + Me.TopMargin.HeightF = 100F + Me.TopMargin.Name = "TopMargin" + Me.TopMargin.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) + Me.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft + ' + ' BottomMargin + ' + Me.BottomMargin.Dpi = 100F + Me.BottomMargin.HeightF = 98.95834F + Me.BottomMargin.Name = "BottomMargin" + Me.BottomMargin.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) + Me.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft + ' + ' sqlDataSource1 + ' + Me.sqlDataSource1.Name = "sqlDataSource1" + columnExpression1.ColumnName = "ID" + table1.MetaSerializable = "30|30|125|360" + table1.Name = "Cars" + columnExpression1.Table = table1 + column1.Expression = columnExpression1 + columnExpression2.ColumnName = "Trademark" + columnExpression2.Table = table1 + column2.Expression = columnExpression2 + columnExpression3.ColumnName = "Model" + columnExpression3.Table = table1 + column3.Expression = columnExpression3 + columnExpression4.ColumnName = "HP" + columnExpression4.Table = table1 + column4.Expression = columnExpression4 + columnExpression5.ColumnName = "Liter" + columnExpression5.Table = table1 + column5.Expression = columnExpression5 + columnExpression6.ColumnName = "Cyl" + columnExpression6.Table = table1 + column6.Expression = columnExpression6 + columnExpression7.ColumnName = "TransmissSpeedCount" + columnExpression7.Table = table1 + column7.Expression = columnExpression7 + columnExpression8.ColumnName = "TransmissAutomatic" + columnExpression8.Table = table1 + column8.Expression = columnExpression8 + columnExpression9.ColumnName = "MPG_City" + columnExpression9.Table = table1 + column9.Expression = columnExpression9 + columnExpression10.ColumnName = "MPG_Highway" + columnExpression10.Table = table1 + column10.Expression = columnExpression10 + columnExpression11.ColumnName = "Category" + columnExpression11.Table = table1 + column11.Expression = columnExpression11 + columnExpression12.ColumnName = "Description" + columnExpression12.Table = table1 + column12.Expression = columnExpression12 + columnExpression13.ColumnName = "Hyperlink" + columnExpression13.Table = table1 + column13.Expression = columnExpression13 + columnExpression14.ColumnName = "Picture" + columnExpression14.Table = table1 + column14.Expression = columnExpression14 + columnExpression15.ColumnName = "Price" + columnExpression15.Table = table1 + column15.Expression = columnExpression15 + columnExpression16.ColumnName = "RtfContent" + columnExpression16.Table = table1 + column16.Expression = columnExpression16 + selectQuery1.Columns.Add(column1) + selectQuery1.Columns.Add(column2) + selectQuery1.Columns.Add(column3) + selectQuery1.Columns.Add(column4) + selectQuery1.Columns.Add(column5) + selectQuery1.Columns.Add(column6) + selectQuery1.Columns.Add(column7) + selectQuery1.Columns.Add(column8) + selectQuery1.Columns.Add(column9) + selectQuery1.Columns.Add(column10) + selectQuery1.Columns.Add(column11) + selectQuery1.Columns.Add(column12) + selectQuery1.Columns.Add(column13) + selectQuery1.Columns.Add(column14) + selectQuery1.Columns.Add(column15) + selectQuery1.Columns.Add(column16) + selectQuery1.Name = "Cars" + selectQuery1.Tables.Add(table1) + Me.sqlDataSource1.Queries.AddRange(New DevExpress.DataAccess.Sql.SqlQuery() {selectQuery1}) + Me.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable") + ' + ' XtraReport1 + ' + Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.Detail, Me.TopMargin, Me.BottomMargin}) + Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.sqlDataSource1}) + Me.DataMember = "Cars" + Me.DataSource = Me.sqlDataSource1 + Me.Margins = New System.Drawing.Printing.Margins(100, 100, 100, 99) + Me.Version = "16.2" + CType((Me), System.ComponentModel.ISupportInitialize).EndInit() + End Sub - #Region "Designer generated code" +#End Region + Private Detail As DevExpress.XtraReports.UI.DetailBand - ''' - ''' Required method for Designer support - do not modify - ''' the contents of this method with the code editor. - ''' - Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() - Dim selectQuery1 As New DevExpress.DataAccess.Sql.SelectQuery() - Dim column1 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression1 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim table1 As New DevExpress.DataAccess.Sql.Table() - Dim column2 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression2 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column3 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression3 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column4 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression4 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column5 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression5 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column6 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression6 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column7 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression7 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column8 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression8 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column9 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression9 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column10 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression10 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column11 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression11 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column12 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression12 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column13 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression13 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column14 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression14 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column15 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression15 As New DevExpress.DataAccess.Sql.ColumnExpression() - Dim column16 As New DevExpress.DataAccess.Sql.Column() - Dim columnExpression16 As New DevExpress.DataAccess.Sql.ColumnExpression() -'INSTANT VB NOTE: The variable resources was renamed since it may cause conflicts with calls to static members of the user-defined type with this name: - Dim resources_Conflict As New System.ComponentModel.ComponentResourceManager(GetType(XtraReport1)) - Me.Detail = New DevExpress.XtraReports.UI.DetailBand() - Me.xrLabel1 = New DevExpress.XtraReports.UI.XRLabel() - Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand() - Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand() - Me.sqlDataSource1 = New DevExpress.DataAccess.Sql.SqlDataSource(Me.components) - CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() - ' - ' Detail - ' - Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() { Me.xrLabel1}) - Me.Detail.Dpi = 100F - Me.Detail.HeightF = 200F - Me.Detail.Name = "Detail" - Me.Detail.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) - Me.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft - ' - ' xrLabel1 - ' - Me.xrLabel1.AnchorHorizontal = DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left - Me.xrLabel1.Dpi = 100F - Me.xrLabel1.Font = New System.Drawing.Font("Times New Roman", 18F, System.Drawing.FontStyle.Bold) - Me.xrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(78.74998F, 47.50001F) - Me.xrLabel1.Multiline = True - Me.xrLabel1.Name = "xrLabel1" - Me.xrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F) - Me.xrLabel1.SizeF = New System.Drawing.SizeF(497.7084F, 100.8333F) - Me.xrLabel1.StylePriority.UseFont = False - Me.xrLabel1.StylePriority.UseTextAlignment = False - Me.xrLabel1.Text = "Click the ""Replace DataSource"" button" & vbCrLf & "and view a new report data source in the R" & "eport Explorer" - Me.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter - ' - ' TopMargin - ' - Me.TopMargin.Dpi = 100F - Me.TopMargin.HeightF = 100F - Me.TopMargin.Name = "TopMargin" - Me.TopMargin.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) - Me.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft - ' - ' BottomMargin - ' - Me.BottomMargin.Dpi = 100F - Me.BottomMargin.HeightF = 98.95834F - Me.BottomMargin.Name = "BottomMargin" - Me.BottomMargin.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F) - Me.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft - ' - ' sqlDataSource1 - ' - Me.sqlDataSource1.Name = "sqlDataSource1" - columnExpression1.ColumnName = "ID" - table1.MetaSerializable = "30|30|125|360" - table1.Name = "Cars" - columnExpression1.Table = table1 - column1.Expression = columnExpression1 - columnExpression2.ColumnName = "Trademark" - columnExpression2.Table = table1 - column2.Expression = columnExpression2 - columnExpression3.ColumnName = "Model" - columnExpression3.Table = table1 - column3.Expression = columnExpression3 - columnExpression4.ColumnName = "HP" - columnExpression4.Table = table1 - column4.Expression = columnExpression4 - columnExpression5.ColumnName = "Liter" - columnExpression5.Table = table1 - column5.Expression = columnExpression5 - columnExpression6.ColumnName = "Cyl" - columnExpression6.Table = table1 - column6.Expression = columnExpression6 - columnExpression7.ColumnName = "TransmissSpeedCount" - columnExpression7.Table = table1 - column7.Expression = columnExpression7 - columnExpression8.ColumnName = "TransmissAutomatic" - columnExpression8.Table = table1 - column8.Expression = columnExpression8 - columnExpression9.ColumnName = "MPG_City" - columnExpression9.Table = table1 - column9.Expression = columnExpression9 - columnExpression10.ColumnName = "MPG_Highway" - columnExpression10.Table = table1 - column10.Expression = columnExpression10 - columnExpression11.ColumnName = "Category" - columnExpression11.Table = table1 - column11.Expression = columnExpression11 - columnExpression12.ColumnName = "Description" - columnExpression12.Table = table1 - column12.Expression = columnExpression12 - columnExpression13.ColumnName = "Hyperlink" - columnExpression13.Table = table1 - column13.Expression = columnExpression13 - columnExpression14.ColumnName = "Picture" - columnExpression14.Table = table1 - column14.Expression = columnExpression14 - columnExpression15.ColumnName = "Price" - columnExpression15.Table = table1 - column15.Expression = columnExpression15 - columnExpression16.ColumnName = "RtfContent" - columnExpression16.Table = table1 - column16.Expression = columnExpression16 - selectQuery1.Columns.Add(column1) - selectQuery1.Columns.Add(column2) - selectQuery1.Columns.Add(column3) - selectQuery1.Columns.Add(column4) - selectQuery1.Columns.Add(column5) - selectQuery1.Columns.Add(column6) - selectQuery1.Columns.Add(column7) - selectQuery1.Columns.Add(column8) - selectQuery1.Columns.Add(column9) - selectQuery1.Columns.Add(column10) - selectQuery1.Columns.Add(column11) - selectQuery1.Columns.Add(column12) - selectQuery1.Columns.Add(column13) - selectQuery1.Columns.Add(column14) - selectQuery1.Columns.Add(column15) - selectQuery1.Columns.Add(column16) - selectQuery1.Name = "Cars" - selectQuery1.Tables.Add(table1) - Me.sqlDataSource1.Queries.AddRange(New DevExpress.DataAccess.Sql.SqlQuery() { selectQuery1}) - Me.sqlDataSource1.ResultSchemaSerializable = resources_Conflict.GetString("sqlDataSource1.ResultSchemaSerializable") - ' - ' XtraReport1 - ' - Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() { Me.Detail, Me.TopMargin, Me.BottomMargin}) - Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() { Me.sqlDataSource1}) - Me.DataMember = "Cars" - Me.DataSource = Me.sqlDataSource1 - Me.Margins = New System.Drawing.Printing.Margins(100, 100, 100, 99) - Me.Version = "16.2" - CType(Me, System.ComponentModel.ISupportInitialize).EndInit() + Private TopMargin As DevExpress.XtraReports.UI.TopMarginBand - End Sub + Private BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand - #End Region + Private sqlDataSource1 As DevExpress.DataAccess.Sql.SqlDataSource - Private Detail As DevExpress.XtraReports.UI.DetailBand - Private TopMargin As DevExpress.XtraReports.UI.TopMarginBand - Private BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand - Private sqlDataSource1 As DevExpress.DataAccess.Sql.SqlDataSource - Private xrLabel1 As DevExpress.XtraReports.UI.XRLabel - End Class + Private xrLabel1 As DevExpress.XtraReports.UI.XRLabel + End Class End Namespace diff --git a/VB/WpfApplication1/XtraReport1.vb b/VB/WpfApplication1/XtraReport1.vb index b763a56..d9ae021 100644 --- a/VB/WpfApplication1/XtraReport1.vb +++ b/VB/WpfApplication1/XtraReport1.vb @@ -1,16 +1,14 @@ -Imports System Imports System.Drawing -Imports System.Collections Imports System.ComponentModel Imports DevExpress.XtraReports.UI Namespace WpfApplication1 - Partial Public Class XtraReport1 - Inherits DevExpress.XtraReports.UI.XtraReport - Public Sub New() - InitializeComponent() - End Sub + Public Partial Class XtraReport1 + Inherits XtraReport - End Class + Public Sub New() + InitializeComponent() + End Sub + End Class End Namespace From 6f3a15aa8a73a3662b43f2bc1d24fde3a77834a1 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 15 Feb 2023 16:22:39 +0400 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 89b87ae..7c8e187 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128605234/21.1.5%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/T432556) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)