Imports System
Imports System.ComponentModel

Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering

Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports System.Drawing

<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class ProjectType
    Inherits BaseObject

    Private _CustomersFrom As CustomersFrom
    Private _ShortName As String
    Private _NumberGenerator As NumberGenerator
    Private _SeparatorChar As String

    <Persistent("DutyColorNotSet")> Private _DutyColorNotSet As Int32
    <Persistent("DutyColorPartnerTask")> Private _DutyColorPartnerTask As Int32
    <Persistent("DutyColorMyTask")> Private _DutyColorMyTask As Int32
    <Persistent("DutyColorSubcontractorTask")> Private _DutyColorSubcontractorTask As Int32

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        SeparatorChar = "."
    End Sub

    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    Property ShortName As String
        Get
            Return _ShortName
        End Get
        Set(value As String)
            SetPropertyValue("ShortName", _ShortName, value)
        End Set
    End Property
    Property NumberGenerator As NumberGenerator
        Get
            Return _NumberGenerator
        End Get
        Set(value As NumberGenerator)
            SetPropertyValue("NumberGenerator", _NumberGenerator, value)
        End Set
    End Property
    Property SeparatorChar As String
        Get
            Return _SeparatorChar
        End Get
        Set(value As String)
            SetPropertyValue("SeparatorChar", _SeparatorChar, value)
        End Set
    End Property

    <NonPersistent()> _
    Public Property DutyColorPartnerTask_NP() As Color
        Get
            Return Color.FromArgb(_DutyColorPartnerTask)
        End Get
        Set(ByVal value As Color)
            _DutyColorPartnerTask = value.ToArgb()
            OnChanged("DutyColorPartnerTask")
        End Set
    End Property
    <NonPersistent()> _
    Public Property DutyColorNotSet_NP() As Color
        Get
            Return Color.FromArgb(_DutyColorNotSet)
        End Get
        Set(ByVal value As Color)
            _DutyColorNotSet = value.ToArgb()
            OnChanged("DutyColorNotSet")
        End Set
    End Property
    <NonPersistent()> _
    Public Property DutyColorMyTask_NP() As Color
        Get
            Return Color.FromArgb(_DutyColorMyTask)
        End Get
        Set(ByVal value As Color)
            _DutyColorMyTask = value.ToArgb()
            OnChanged("DutyColorMyTask")
        End Set
    End Property
    <NonPersistent()> _
    Public Property DutyColorSubcontractorTask_NP() As Color
        Get
            Return Color.FromArgb(_DutyColorSubcontractorTask)
        End Get
        Set(ByVal value As Color)
            _DutyColorSubcontractorTask = value.ToArgb()
            OnChanged("DutyColorSubcontractorTask")
        End Set
    End Property

End Class
