Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!-- default badges list -->
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128633613/18.1.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/E4107)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
<!-- default badges end -->
Expand Down
2 changes: 1 addition & 1 deletion VB/XtraSchedulerEFTest.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "XtraSchedulerEFTest", "XtraSchedulerEFTest\XtraSchedulerEFTest.vbproj", "{774DF92E-B1E1-4F83-A55D-61ECC674F2D6}"
EndProject
Expand Down
54 changes: 33 additions & 21 deletions VB/XtraSchedulerEFTest/EFAppointment.vb
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
Imports System
Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema


Namespace XtraSchedulerEFTest
#Region "#efappointment"

'#Region "#efappointment"
Friend Class EFAppointment
<Key> _
Public Property UniqueID() As Integer
<Required> _
Public Property Type() As Integer
<Required> _
Public Property StartDate() As Date
<Required> _
Public Property EndDate() As Date
Public Property AllDay() As Boolean
Public Property Subject() As String
Public Property Location() As String
Public Property Description() As String
Public Property Status() As Integer
Public Property Label() As Integer
Public Property ResourceIDs() As String
Public Property ReminderInfo() As String
Public Property RecurrenceInfo() As String

<Key>
Public Property UniqueID As Integer

<Required>
Public Property Type As Integer

<Required>
Public Property StartDate As Date

<Required>
Public Property EndDate As Date

Public Property AllDay As Boolean

Public Property Subject As String

Public Property Location As String

Public Property Description As String

Public Property Status As Integer

Public Property Label As Integer

Public Property ResourceIDs As String

Public Property ReminderInfo As String

Public Property RecurrenceInfo As String
End Class
#End Region ' #efappointment
'#End Region ' #efappointment
End Namespace
50 changes: 32 additions & 18 deletions VB/XtraSchedulerEFTest/EFResource.vb
Original file line number Diff line number Diff line change
@@ -1,49 +1,63 @@
Imports System
Imports System
Imports System.ComponentModel.DataAnnotations
Imports System.Drawing

Namespace XtraSchedulerEFTest
#Region "#efresource"

'#Region "#efresource"
Friend Class EFResource
<Key> _
Public Property UniqueID() As Integer
Public Property ResourceID() As Integer
Public Property ResourceName() As String
Public Property Image() As Byte()
Public Property Color() As Integer

<Key>
Public Property UniqueID As Integer

Public Property ResourceID As Integer

Public Property ResourceName As String

Public Property Image As Byte()

Public Property Color As Integer
Get
Return ColorEx.ToArgb()
End Get

Set(ByVal value As Integer)
ColorEx = New MyColor(value)
End Set
End Property
Public Property ColorEx() As MyColor

Public Property ColorEx As MyColor
End Class

Friend Class MyColor
Public Property A() As Byte
Public Property R() As Byte
Public Property G() As Byte
Public Property B() As Byte

Public Property A As Byte

Public Property R As Byte

Public Property G As Byte

Public Property B As Byte

Public Sub New()
End Sub

Public Sub New(ByVal a As Byte, ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
Me.A = a
Me.R = r
Me.G = g
Me.B = b
End Sub

Public Sub New(ByVal color As Color)
A = color.A
R = color.R
G = color.G
B = color.B
End Sub

Public Sub New(ByVal argb As Integer)
Dim bytes() As Byte = BitConverter.GetBytes(argb)
Dim bytes As Byte() = BitConverter.GetBytes(argb)
A = bytes(0)
R = bytes(1)
G = bytes(2)
Expand All @@ -53,15 +67,15 @@ Namespace XtraSchedulerEFTest
Public Function ToColor() As Color
Return Color.FromArgb(A, R, G, B)
End Function

Public Shared Function FromColor(ByVal color As Color) As MyColor
Return New MyColor(color.A, color.R, color.G, color.B)
End Function

Public Function ToArgb() As Integer
Dim bytes() As Byte = { A, R, G, B }
Dim bytes As Byte() = New Byte() {A, R, G, B}
Return BitConverter.ToInt32(bytes, 0)
End Function

End Class
#End Region ' #efresource

'#End Region ' #efresource
End Namespace
56 changes: 31 additions & 25 deletions VB/XtraSchedulerEFTest/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading