From eaa29245d345003da1f92e0bde653550751e9858 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Mon, 6 Sep 2021 21:05:10 +0300 Subject: [PATCH 1/2] autogenerate VB --- VB/CustomReminderExample.Net5.sln | 2 +- VB/CustomReminderExample.sln | 2 +- VB/CustomReminderExample/Application.xaml | 2 +- VB/CustomReminderExample/Application.xaml.vb | 12 +-- .../CustomReminderExample.Net5.vbproj | 27 ++---- .../CustomReminderExample.vbproj | 51 +++++++--- .../CustomReminderWindow.xaml | 2 +- .../CustomReminderWindow.xaml.vb | 18 ++-- VB/CustomReminderExample/MainWindow.xaml | 2 +- VB/CustomReminderExample/MainWindow.xaml.vb | 86 ++++++++--------- .../My Project/AssemblyInfo.vb | 6 +- .../My Project/Resources.Designer.vb | 96 ++++++++++--------- .../My Project/Settings.Designer.vb | 21 ++-- .../NumberToTimeSpanConverter.vb | 18 ++-- 14 files changed, 177 insertions(+), 168 deletions(-) diff --git a/VB/CustomReminderExample.Net5.sln b/VB/CustomReminderExample.Net5.sln index 190b22e..97cf350 100644 --- a/VB/CustomReminderExample.Net5.sln +++ b/VB/CustomReminderExample.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/CustomReminderExample.sln b/VB/CustomReminderExample.sln index 1baec9d..8240c1e 100644 --- a/VB/CustomReminderExample.sln +++ b/VB/CustomReminderExample.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/CustomReminderExample/Application.xaml b/VB/CustomReminderExample/Application.xaml index ebf10fb..e8b5591 100644 --- a/VB/CustomReminderExample/Application.xaml +++ b/VB/CustomReminderExample/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/CustomReminderExample/CustomReminderExample.Net5.vbproj b/VB/CustomReminderExample/CustomReminderExample.Net5.vbproj index 9f3e26e..dc019ee 100644 --- a/VB/CustomReminderExample/CustomReminderExample.Net5.vbproj +++ b/VB/CustomReminderExample/CustomReminderExample.Net5.vbproj @@ -1,3 +1,4 @@ + net5.0-windows @@ -11,31 +12,15 @@ x86;AnyCPU false obj*/** + On + Binary + Off + On true + true - - - - - - - - - - - - - - - - - - - - - diff --git a/VB/CustomReminderExample/CustomReminderExample.vbproj b/VB/CustomReminderExample/CustomReminderExample.vbproj index 00445f6..a5ca013 100644 --- a/VB/CustomReminderExample/CustomReminderExample.vbproj +++ b/VB/CustomReminderExample/CustomReminderExample.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 @@ -28,6 +28,7 @@ true prompt true + true AnyCPU @@ -37,56 +38,79 @@ false true prompt + true - + + + + - - + - - + False + True + C:\DXDlls\21.1.5\DevExpress.Data.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.Mvvm.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Printing.v21.1.Core.dll - False + True + C:\DXDlls\21.1.5\DevExpress.Data.Desktop.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Core.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.Xpf.LayoutControl.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Ribbon.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Scheduling.v21.1.dll False + True + C:\DXDlls\21.1.5\DevExpress.XtraScheduler.v21.1.Core.Desktop.dll False + True + C:\DXDlls\21.1.5\DevExpress.XtraScheduler.v21.1.Core.dll @@ -157,6 +181,7 @@ SettingsSingleFileGenerator Settings.Designer.vb + My @@ -164,11 +189,11 @@ - \ No newline at end of file diff --git a/VB/CustomReminderExample/CustomReminderWindow.xaml b/VB/CustomReminderExample/CustomReminderWindow.xaml index c738d58..12e9198 100644 --- a/VB/CustomReminderExample/CustomReminderWindow.xaml +++ b/VB/CustomReminderExample/CustomReminderWindow.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for CustomReminderWindow.xaml - ''' - Partial Public Class CustomReminderWindow - Inherits DXWindow + ''' + ''' Interaction logic for CustomReminderWindow.xaml + ''' + Partial Public Class CustomReminderWindow + Inherits DXWindow - Public Sub New() - InitializeComponent() - End Sub - End Class + Public Sub New() + InitializeComponent() + End Sub + End Class End Namespace diff --git a/VB/CustomReminderExample/MainWindow.xaml b/VB/CustomReminderExample/MainWindow.xaml index 38b1d92..dc118d5 100644 --- a/VB/CustomReminderExample/MainWindow.xaml +++ b/VB/CustomReminderExample/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 - Public Sub New() - InitializeComponent() - End Sub - #Region "#RemindersWindowShowing" - Private Sub Scheduler_RemindersWindowShowing(ByVal sender As Object, ByVal e As DevExpress.Xpf.Scheduling.RemindersWindowShowingEventArgs) - If e.TriggeredReminders.Any(Function(r) r.Appointment.Subject.Contains("test")) Then - Dim reminderWindow As New DevExpress.Xpf.Scheduling.Visual.RemindersWindow() - reminderWindow.DataContext = New DevExpress.Xpf.Scheduling.VisualData.RemindersWindowViewModel(scheduler) - e.Window = reminderWindow - End If - End Sub - #End Region ' #RemindersWindowShowing + Public Sub New() + InitializeComponent() + End Sub + #Region "#RemindersWindowShowing" + Private Sub Scheduler_RemindersWindowShowing(ByVal sender As Object, ByVal e As DevExpress.Xpf.Scheduling.RemindersWindowShowingEventArgs) + If e.TriggeredReminders.Any(Function(r) r.Appointment.Subject.Contains("test")) Then + Dim reminderWindow As New DevExpress.Xpf.Scheduling.Visual.RemindersWindow() + reminderWindow.DataContext = New DevExpress.Xpf.Scheduling.VisualData.RemindersWindowViewModel(scheduler) + e.Window = reminderWindow + End If + End Sub + #End Region ' #RemindersWindowShowing - Private Sub Scheduler_InitNewAppointment(ByVal sender As Object, ByVal e As DevExpress.Xpf.Scheduling.AppointmentItemEventArgs) - AddAppointmentReminders(e.Appointment) - End Sub + Private Sub Scheduler_InitNewAppointment(ByVal sender As Object, ByVal e As DevExpress.Xpf.Scheduling.AppointmentItemEventArgs) + AddAppointmentReminders(e.Appointment) + End Sub - Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - Dim apt As New AppointmentItem(AppointmentType.Normal) With { _ - .Start = Date.Today.AddHours(Date.Now.Hour), _ - .End = Date.Today.AddHours(Date.Now.Hour + 1), _ - .Subject = "Reminder Test" _ - } - AddAppointmentReminders(apt) - scheduler.AppointmentItems.Add(apt) - End Sub + Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) + Dim apt As New AppointmentItem(AppointmentType.Normal) With { + .Start = DateTime.Today.AddHours(DateTime.Now.Hour), + .End = DateTime.Today.AddHours(DateTime.Now.Hour + 1), + .Subject = "Reminder Test" + } + AddAppointmentReminders(apt) + scheduler.AppointmentItems.Add(apt) + End Sub - Private Shared Sub AddAppointmentReminders(ByVal appointment As AppointmentItem) -' #Region "#AddAppointmentReminders" - ' Remove previous reminders - appointment.Reminders.Clear() - ' Set multiple reminders for an appointment - Dim reminder1 As ReminderItem = appointment.CreateNewReminder() - Dim reminder2 As ReminderItem = appointment.CreateNewReminder() - reminder1.AlertTime = Date.Now.AddMinutes(15) - reminder2.TimeBeforeStart = New TimeSpan(0, 30, 0) + Private Shared Sub AddAppointmentReminders(ByVal appointment As AppointmentItem) +' #Region "#AddAppointmentReminders" + ' Remove previous reminders + appointment.Reminders.Clear() + ' Set multiple reminders for an appointment + Dim reminder1 As ReminderItem = appointment.CreateNewReminder() + Dim reminder2 As ReminderItem = appointment.CreateNewReminder() + reminder1.AlertTime = DateTime.Now.AddMinutes(15) + reminder2.TimeBeforeStart = New TimeSpan(0, 30, 0) - appointment.Reminders.Add(reminder1) - appointment.Reminders.Add(reminder2) -' #End Region ' #AddAppointmentReminders - End Sub - End Class + appointment.Reminders.Add(reminder1) + appointment.Reminders.Add(reminder2) +' #End Region ' #AddAppointmentReminders + End Sub + End Class End Namespace diff --git a/VB/CustomReminderExample/My Project/AssemblyInfo.vb b/VB/CustomReminderExample/My Project/AssemblyInfo.vb index bbb91f7..ac25d41 100644 --- a/VB/CustomReminderExample/My Project/AssemblyInfo.vb +++ b/VB/CustomReminderExample/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/CustomReminderExample/My Project/Resources.Designer.vb b/VB/CustomReminderExample/My Project/Resources.Designer.vb index 44e28ed..194cb05 100644 --- a/VB/CustomReminderExample/My Project/Resources.Designer.vb +++ b/VB/CustomReminderExample/My Project/Resources.Designer.vb @@ -13,51 +13,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 Object.ReferenceEquals(resourceMan, 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 Object.ReferenceEquals(resourceMan, 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/CustomReminderExample/My Project/Settings.Designer.vb b/VB/CustomReminderExample/My Project/Settings.Designer.vb index dc0a7d6..4cfa22b 100644 --- a/VB/CustomReminderExample/My Project/Settings.Designer.vb +++ b/VB/CustomReminderExample/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/CustomReminderExample/NumberToTimeSpanConverter.vb b/VB/CustomReminderExample/NumberToTimeSpanConverter.vb index 56c94ad..f28edb2 100644 --- a/VB/CustomReminderExample/NumberToTimeSpanConverter.vb +++ b/VB/CustomReminderExample/NumberToTimeSpanConverter.vb @@ -7,15 +7,15 @@ Imports System.Threading.Tasks Imports System.Windows.Data Namespace CustomReminderExample - Public Class TimeSpanToNumberConverter - Implements IValueConverter + Public Class TimeSpanToNumberConverter + Implements IValueConverter - Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert - Return DirectCast(value, TimeSpan).Minutes - End Function + Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object + Return DirectCast(value, TimeSpan).Minutes + End Function - Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack - Return TimeSpan.FromMinutes(System.Convert.ToDouble(value)) - End Function - End Class + Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object + Return TimeSpan.FromMinutes(System.Convert.ToDouble(value)) + End Function + End Class End Namespace From 8840cbd5b1d03c56d8e3a81a9cc752cf2dcc8671 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Mon, 6 Sep 2021 21:10:23 +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 1d5d11c..09851bf 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128655841/17.2.3%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/T555815) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)