diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..a88e69e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @DevExpressExampleBot \ No newline at end of file diff --git a/Readme.md b/Readme.md index 7298c2e..3ffeed2 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128611498/23.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/E3280) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) [![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives) diff --git a/VB/Form1.Designer.vb b/VB/Form1.Designer.vb index 16d9980..ce6938b 100644 --- a/VB/Form1.Designer.vb +++ b/VB/Form1.Designer.vb @@ -46,7 +46,7 @@ Namespace RichEditDOCVARIABLEBasics Me.button2.TabIndex = 4 Me.button2.Text = "MailMerge" Me.button2.UseVisualStyleBackColor = True - AddHandler Me.button2.Click, New System.EventHandler(AddressOf Me.button2_Click) + Me.button2.Click += New System.EventHandler(AddressOf Me.button2_Click) ' ' button1 ' @@ -56,7 +56,7 @@ Namespace RichEditDOCVARIABLEBasics Me.button1.TabIndex = 5 Me.button1.Text = "Restore template" Me.button1.UseVisualStyleBackColor = True - AddHandler Me.button1.Click, New System.EventHandler(AddressOf Me.button1_Click) + Me.button1.Click += New System.EventHandler(AddressOf Me.button1_Click) ' ' Form1 ' diff --git a/VB/Form1.vb b/VB/Form1.vb index 877de11..78d2b1a 100644 --- a/VB/Form1.vb +++ b/VB/Form1.vb @@ -1,5 +1,3 @@ -Imports System -Imports System.Collections.Generic Imports DevExpress.XtraRichEdit.API.Native Imports DevExpress.XtraRichEdit @@ -12,7 +10,7 @@ Namespace RichEditDOCVARIABLEBasics InitializeComponent() Dim details As List(Of DetailInfo) = New List(Of DetailInfo) From {New DetailInfo(1, "Documents//Detail1"), New DetailInfo(2, "Documents//Detail2")} richEditControl1.Options.MailMerge.DataSource = details - AddHandler richEditControl1.Document.CalculateDocumentVariable, New CalculateDocumentVariableEventHandler(AddressOf Document_CalculateDocumentVariable) + richEditControl1.Document.CalculateDocumentVariable += New CalculateDocumentVariableEventHandler(AddressOf Document_CalculateDocumentVariable) richEditControl1.LoadDocument("Documents//Template.rtf") ShowFieldCodes() End Sub @@ -26,7 +24,7 @@ Namespace RichEditDOCVARIABLEBasics Dim myMergeOptions As MailMergeOptions = richEditControl1.Document.CreateMailMergeOptions() myMergeOptions.MergeMode = MergeMode.NewParagraph Dim server As RichEditDocumentServer = New RichEditDocumentServer() - AddHandler server.CalculateDocumentVariable, New CalculateDocumentVariableEventHandler(AddressOf Document_CalculateDocumentVariable) + server.CalculateDocumentVariable += New CalculateDocumentVariableEventHandler(AddressOf Document_CalculateDocumentVariable) richEditControl1.Document.MailMerge(myMergeOptions, server.Document) richEditControl1.CreateNewDocument() richEditControl1.Document.AppendDocumentContent(server.Document.Range) @@ -34,9 +32,9 @@ Namespace RichEditDOCVARIABLEBasics Private Sub Document_CalculateDocumentVariable(ByVal sender As Object, ByVal e As CalculateDocumentVariableEventArgs) Dim detailId As Integer = -1 - If Integer.TryParse(e.Arguments(0).Value, detailId) Then + If Int32.TryParse(e.Arguments(0).Value, detailId) Then Dim server As RichEditDocumentServer = New RichEditDocumentServer() - Dim path As String = String.Format("{0}\Documents\Detail{1}.rtf", IO.Directory.GetCurrentDirectory(), detailId.ToString()) + Dim path As String = String.Format("{0}\Documents\Detail{1}.rtf", System.IO.Directory.GetCurrentDirectory(), detailId.ToString()) server.LoadDocument(path) e.Value = server e.Handled = True diff --git a/VB/Program.vb b/VB/Program.vb index 917717d..16fa217 100644 --- a/VB/Program.vb +++ b/VB/Program.vb @@ -1,6 +1,3 @@ -Imports System -Imports System.Windows.Forms - Namespace RichEditDOCVARIABLEBasics Friend Module Program @@ -10,9 +7,9 @@ Namespace RichEditDOCVARIABLEBasics ''' Sub Main() - Call Application.EnableVisualStyles() + Application.EnableVisualStyles() Application.SetCompatibleTextRenderingDefault(False) - Call Application.Run(New Form1()) + Application.Run(New Form1()) End Sub End Module End Namespace diff --git a/VB/RichEditDOCVARIABLEBasics.vbproj b/VB/RichEditDOCVARIABLEBasics.vbproj index 5bc1a6d..f2f13bf 100644 --- a/VB/RichEditDOCVARIABLEBasics.vbproj +++ b/VB/RichEditDOCVARIABLEBasics.vbproj @@ -1,38 +1,27 @@ - - - net8.0-windows - WinExe - Properties - - false - true - true - - - - Form1.vb - - - True - Resources.resx - True - - - Always - - - Always - - - Always - - - True - Settings.settings - True - - - - - + + + On + net8.0-windows + WinExe + false + false + false + false + true + true + + + + Always + + + Always + + + Always + + + + + \ No newline at end of file diff --git a/VB/app.config b/VB/app.config new file mode 100644 index 0000000..2cb6644 --- /dev/null +++ b/VB/app.config @@ -0,0 +1,51 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PerMonitorV2 + + + + + + + + + + \ No newline at end of file