From 68ffb2106fcc068262391ba531f4f3cecbd78390 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 15 Feb 2023 13:26:11 +0400 Subject: [PATCH 1/3] autogenerate VB --- VB/WpfApplication1.Net6.sln | 21 ++ VB/WpfApplication1.sln | 21 ++ VB/WpfApplication1/App.config | 19 ++ VB/WpfApplication1/App.xaml | 8 + VB/WpfApplication1/App.xaml.vb | 15 ++ VB/WpfApplication1/MainWindow.xaml | 22 ++ VB/WpfApplication1/MainWindow.xaml.vb | 33 +++ VB/WpfApplication1/MyDataClass.vb | 9 + 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.Net6.vbproj | 38 ++++ VB/WpfApplication1/WpfApplication1.vbproj | 163 ++++++++++++++ VB/WpfApplication1/XtraReport1.Designer.vb | 207 ++++++++++++++++++ VB/WpfApplication1/XtraReport1.resx | 126 +++++++++++ VB/WpfApplication1/XtraReport1.vb | 14 ++ 18 files changed, 946 insertions(+) create mode 100644 VB/WpfApplication1.Net6.sln create mode 100644 VB/WpfApplication1.sln create mode 100644 VB/WpfApplication1/App.config create mode 100644 VB/WpfApplication1/App.xaml create mode 100644 VB/WpfApplication1/App.xaml.vb create mode 100644 VB/WpfApplication1/MainWindow.xaml create mode 100644 VB/WpfApplication1/MainWindow.xaml.vb create mode 100644 VB/WpfApplication1/MyDataClass.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 create mode 100644 VB/WpfApplication1/WpfApplication1.Net6.vbproj create mode 100644 VB/WpfApplication1/WpfApplication1.vbproj create mode 100644 VB/WpfApplication1/XtraReport1.Designer.vb create mode 100644 VB/WpfApplication1/XtraReport1.resx create mode 100644 VB/WpfApplication1/XtraReport1.vb diff --git a/VB/WpfApplication1.Net6.sln b/VB/WpfApplication1.Net6.sln new file mode 100644 index 0000000..02b6844 --- /dev/null +++ b/VB/WpfApplication1.Net6.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 16 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WpfApplication1", "WpfApplication1\WpfApplication1.Net6.vbproj", "{0162F1A9-2ED8-45AD-B0BC-D05D86D90408}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VB/WpfApplication1.sln b/VB/WpfApplication1.sln new file mode 100644 index 0000000..e2edab9 --- /dev/null +++ b/VB/WpfApplication1.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WpfApplication1", "WpfApplication1\WpfApplication1.vbproj", "{0162F1A9-2ED8-45AD-B0BC-D05D86D90408}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0162F1A9-2ED8-45AD-B0BC-D05D86D90408}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VB/WpfApplication1/App.config b/VB/WpfApplication1/App.config new file mode 100644 index 0000000..56a99e4 --- /dev/null +++ b/VB/WpfApplication1/App.config @@ -0,0 +1,19 @@ + + + + +
+ + + + + + + + + + Office2016White + + + + 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 b/VB/WpfApplication1/MainWindow.xaml new file mode 100644 index 0000000..abe7906 --- /dev/null +++ b/VB/WpfApplication1/MainWindow.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/VB/WpfApplication1/MainWindow.xaml.vb b/VB/WpfApplication1/MainWindow.xaml.vb new file mode 100644 index 0000000..e3e8e88 --- /dev/null +++ b/VB/WpfApplication1/MainWindow.xaml.vb @@ -0,0 +1,33 @@ +Imports System.ComponentModel +Imports System.Windows +Imports DevExpress.DataAccess.ObjectBinding +Imports DevExpress.XtraReports.UI + +Namespace WpfApplication1 + + ''' + ''' Interaction logic for MainWindow.xaml + ''' + Public Partial Class MainWindow + Inherits Window + + Public Sub New() + Me.InitializeComponent() + Me.designer.OpenDocument(New XtraReport1()) + End Sub + + 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 new file mode 100644 index 0000000..162c4b3 --- /dev/null +++ b/VB/WpfApplication1/MyDataClass.vb @@ -0,0 +1,9 @@ +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.Net6.vbproj b/VB/WpfApplication1/WpfApplication1.Net6.vbproj new file mode 100644 index 0000000..78c243b --- /dev/null +++ b/VB/WpfApplication1/WpfApplication1.Net6.vbproj @@ -0,0 +1,38 @@ + + + + On + net6.0-windows + WinExe + + + WpfApplication1 + true + false + false + false + false + false + false + true + true + x86;AnyCPU + false + false + + + + + + + Component + + + + + + + + + + \ No newline at end of file diff --git a/VB/WpfApplication1/WpfApplication1.vbproj b/VB/WpfApplication1/WpfApplication1.vbproj new file mode 100644 index 0000000..2c04ad5 --- /dev/null +++ b/VB/WpfApplication1/WpfApplication1.vbproj @@ -0,0 +1,163 @@ + + + + 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 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG,TRACE + prompt + 4 + false + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + Component + + + XtraReport1.vb + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.vb + WpfApplication1.Properties + + + XtraReport1.vb + + + SettingsSingleFileGenerator + Settings.Designer.vb + + + + + + + + + \ No newline at end of file diff --git a/VB/WpfApplication1/XtraReport1.Designer.vb b/VB/WpfApplication1/XtraReport1.Designer.vb new file mode 100644 index 0000000..7a93695 --- /dev/null +++ b/VB/WpfApplication1/XtraReport1.Designer.vb @@ -0,0 +1,207 @@ +Namespace WpfApplication1 + + 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 DevExpress.Drawing.DXFont("Times New Roman", 18F, DevExpress.Drawing.DXFontStyle.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 DevExpress.Drawing.DXMargins(100, 100, 100, 99) + Me.Version = "16.2" + CType((Me), System.ComponentModel.ISupportInitialize).EndInit() + End Sub + +#End Region + 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 +End Namespace diff --git a/VB/WpfApplication1/XtraReport1.resx b/VB/WpfApplication1/XtraReport1.resx new file mode 100644 index 0000000..046d511 --- /dev/null +++ b/VB/WpfApplication1/XtraReport1.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + PERhdGFTZXQgTmFtZT0ic3FsRGF0YVNvdXJjZTEiPjxWaWV3IE5hbWU9IkNhcnMiPjxGaWVsZCBOYW1lPSJJRCIgVHlwZT0iSW50MzIiIC8+PEZpZWxkIE5hbWU9IlRyYWRlbWFyayIgVHlwZT0iU3RyaW5nIiAvPjxGaWVsZCBOYW1lPSJNb2RlbCIgVHlwZT0iU3RyaW5nIiAvPjxGaWVsZCBOYW1lPSJIUCIgVHlwZT0iSW50MTYiIC8+PEZpZWxkIE5hbWU9IkxpdGVyIiBUeXBlPSJEb3VibGUiIC8+PEZpZWxkIE5hbWU9IkN5bCIgVHlwZT0iQnl0ZSIgLz48RmllbGQgTmFtZT0iVHJhbnNtaXNzU3BlZWRDb3VudCIgVHlwZT0iQnl0ZSIgLz48RmllbGQgTmFtZT0iVHJhbnNtaXNzQXV0b21hdGljIiBUeXBlPSJTdHJpbmciIC8+PEZpZWxkIE5hbWU9Ik1QR19DaXR5IiBUeXBlPSJCeXRlIiAvPjxGaWVsZCBOYW1lPSJNUEdfSGlnaHdheSIgVHlwZT0iQnl0ZSIgLz48RmllbGQgTmFtZT0iQ2F0ZWdvcnkiIFR5cGU9IlN0cmluZyIgLz48RmllbGQgTmFtZT0iRGVzY3JpcHRpb24iIFR5cGU9IlN0cmluZyIgLz48RmllbGQgTmFtZT0iSHlwZXJsaW5rIiBUeXBlPSJTdHJpbmciIC8+PEZpZWxkIE5hbWU9IlBpY3R1cmUiIFR5cGU9IkJ5dGVBcnJheSIgLz48RmllbGQgTmFtZT0iUHJpY2UiIFR5cGU9IkRlY2ltYWwiIC8+PEZpZWxkIE5hbWU9IlJ0ZkNvbnRlbnQiIFR5cGU9IlN0cmluZyIgLz48L1ZpZXc+PC9EYXRhU2V0Pg== + + \ No newline at end of file diff --git a/VB/WpfApplication1/XtraReport1.vb b/VB/WpfApplication1/XtraReport1.vb new file mode 100644 index 0000000..d9ae021 --- /dev/null +++ b/VB/WpfApplication1/XtraReport1.vb @@ -0,0 +1,14 @@ +Imports System.Drawing +Imports System.ComponentModel +Imports DevExpress.XtraReports.UI + +Namespace WpfApplication1 + + Public Partial Class XtraReport1 + Inherits XtraReport + + Public Sub New() + InitializeComponent() + End Sub + End Class +End Namespace From 111dce3e6dcbb0aa854577372cc05dd06d0519af Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Wed, 15 Feb 2023 13:26:30 +0400 Subject: [PATCH 2/3] README auto update [skip ci] --- Readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Readme.md b/Readme.md index 9425519..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/22.2.2%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) From 1ac4906def84d2bc3c48037fb473f8cf7dc52b13 Mon Sep 17 00:00:00 2001 From: vasyaste Date: Wed, 15 Feb 2023 15:28:08 +0400 Subject: [PATCH 3/3] Fix VB --- CS/WpfApplication1/WpfApplication1.csproj | 78 +++++++++++------------ VB/WpfApplication1/MainWindow.xaml.vb | 15 +++-- config.json | 2 +- 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/CS/WpfApplication1/WpfApplication1.csproj b/CS/WpfApplication1/WpfApplication1.csproj index 504533f..8dcd0b7 100644 --- a/CS/WpfApplication1/WpfApplication1.csproj +++ b/CS/WpfApplication1/WpfApplication1.csproj @@ -37,45 +37,45 @@ true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VB/WpfApplication1/MainWindow.xaml.vb b/VB/WpfApplication1/MainWindow.xaml.vb index e3e8e88..0f0259c 100644 --- a/VB/WpfApplication1/MainWindow.xaml.vb +++ b/VB/WpfApplication1/MainWindow.xaml.vb @@ -1,6 +1,7 @@ Imports System.ComponentModel Imports System.Windows Imports DevExpress.DataAccess.ObjectBinding +Imports DevExpress.Xpf.Reports.UserDesigner Imports DevExpress.XtraReports.UI Namespace WpfApplication1 @@ -8,7 +9,7 @@ Namespace WpfApplication1 ''' ''' Interaction logic for MainWindow.xaml ''' - Public Partial Class MainWindow + Partial Public Class MainWindow Inherits Window Public Sub New() @@ -21,13 +22,13 @@ Namespace WpfApplication1 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 + If oldDataSource IsNot Nothing Then + changes.RemoveItem(oldDataSource) + End If - changes.AddItem(newDataSource) - changes.SetProperty(report, Function(x) x.DataSource, newDataSource) - End Sub) + changes.AddItem(newDataSource) + changes.SetProperty(report, Function(x) x.DataSource, newDataSource) + End Sub) End Sub End Class End Namespace diff --git a/config.json b/config.json index adc0595..5800a8f 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,4 @@ { "runOnWeb": false, - "autoGenerateVb": true + "autoGenerateVb": false } \ No newline at end of file