Imports System.ComponentModel Imports System.Resources Module ClassControlProperties ' ++++++ LOCALIZE PROPERTIES ++++++ Private Function Lookup(key As String) Try Return My.Resources.ControlProperties.ResourceManager.GetString(key) Catch ex As Exception Return key End Try End Function Public Class LocalizedDescriptionAttribute Inherits DescriptionAttribute Public Sub New(key As String) MyBase.New(Lookup(key)) End Sub End Class Public Class LocalizedCategoryAttribute Inherits CategoryAttribute Public Sub New(key As String) MyBase.New(Lookup(key)) End Sub End Class ' +++++ END LOCALIZE PROPERTIES +++++ ' +++++ ABSTRACT CLASSES +++++ Public MustInherit Class BaseProperties Private _id As Integer Private _type As String Private _size As Size Private _location As Point Private _name As String Private _hint As String Private _visible As Boolean Private _tree_view As Boolean Public Property TreeView() As Boolean Get Return _tree_view End Get Set(value As Boolean) _tree_view = value End Set End Property Public Property ID() As Integer Get Return _id End Get Set(value As Integer) _id = value End Set End Property Public Property ControlType() As String Get Return _type End Get Set(value As String) _type = value End Set End Property Public Property Hint() As String Get Return _hint End Get Set(value As String) _hint = value End Set End Property Public Property Visible() As Boolean Get Return _visible End Get Set(value As Boolean) _visible = value End Set End Property Public Property Size() As Size Get Return _size End Get Set(value As Size) _size = value End Set End Property Public Property Location() As Point Get Return _location End Get Set(value As Point) _location = value End Set End Property Public Property Name() As String Get Return _name End Get Set(value As String) _name = value End Set End Property End Class Public MustInherit Class CommonProperties Inherits BaseProperties Private _id As Integer ' ViewConfigurations Private _size As Size Private _location As Point Private _name As String = "" Private _column_title = "" ' Database Configurations Private _sql_command As String = "" Private _sql_command_2 As String = "" 'EnabledWhen ' Font Configurations Private _font As Font Private _font_color As Color Public Property ColumnTitle() As String Get Return _column_title End Get Set(value As String) _column_title = value End Set End Property Public Property SQLCommand() As SQLValue Get Return New SQLValue(_sql_command) End Get Set(value As SQLValue) _sql_command = value.Value End Set End Property Public Property EnabledWhen() As SQLValue Get Return New SQLValue(_sql_command_2) End Get Set(value As SQLValue) _sql_command_2 = value.Value End Set End Property Public Property Font() As Font Get Return _font End Get Set(value As Font) _font = value End Set End Property Public Property FontColor() As Color Get Return _font_color End Get Set(value As Color) _font_color = value End Set End Property End Class Public MustInherit Class InputControlProperties Inherits CommonProperties Private _default_Value As String Private _tab_index As Integer Private _tab_stop As Boolean Private _show_column As Boolean ' Other Configurations Private _required As Boolean = False Private _read_only As Boolean = False Public Property IsRequired() As Boolean Get Return _required End Get Set(value As Boolean) _required = value End Set End Property Public Property IsReadOnly() As Boolean Get Return _read_only End Get Set(value As Boolean) _read_only = value End Set End Property Public Property TabIndex() As Integer Get Return _tab_index End Get Set(value As Integer) _tab_index = value End Set End Property Public Property TabStop() As Boolean Get Return _tab_stop End Get Set(value As Boolean) _tab_stop = value End Set End Property Public Property DefaultValue() As String Get Return _default_Value End Get Set(value As String) _default_Value = value End Set End Property Public Property ShowColumn() As Boolean Get Return _show_column End Get Set(value As Boolean) _show_column = value End Set End Property End Class ' +++++ CONTROL CLASSES +++++ Public Class LabelProperties Inherits CommonProperties Private _caption As String = "" Public Overloads Property ColumnTitle() As String Get Return "" End Get Set(value As String) '_column_title = value End Set End Property Public Overloads Property TreeView() As Boolean Get Return False End Get Set(value As Boolean) '_tree_view = value End Set End Property Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property End Class Public Class LineProperties Inherits CommonProperties Public Overloads Property ColumnTitle() As String Get Return "" End Get Set(value As String) '_column_title = value End Set End Property Public Overloads Property TreeView() As Boolean Get Return False End Get Set(value As Boolean) '_tree_view = value End Set End Property End Class Public Class TextBoxProperties Inherits InputControlProperties Private _multiline As Boolean Private _autosuggest As Boolean Private _format As String Public Property Format() As EnumFormatOptions Get Return _format End Get Set(value As EnumFormatOptions) _format = value End Set End Property Public Property Multiline() As Boolean Get Return _multiline End Get Set(value As Boolean) _multiline = value End Set End Property Public Property AutoSuggest() As Boolean Get Return _autosuggest End Get Set(value As Boolean) _autosuggest = value End Set End Property End Class Public Class ComboBoxProperties Inherits InputControlProperties Private _master_data_id As Integer Private _static_list As String Private _format As EnumFormatOptions Private _select_only As Boolean Public Property IsSelectOnly() As Boolean Get Return _select_only End Get Set(value As Boolean) _select_only = value End Set End Property Public Property Format() As EnumFormatOptions Get Return _format End Get Set(value As EnumFormatOptions) _format = value End Set End Property Public Property MasterDataId() As Integer Get Return _master_data_id End Get Set(value As Integer) _master_data_id = value End Set End Property Public Property StaticList() As StaticListValue Get Return New StaticListValue(_static_list) End Get Set(value As StaticListValue) _static_list = value.Value End Set End Property End Class Public Class DateTimePickerProperties Inherits InputControlProperties Private _default_value As EnumDateTimePickerDefaultValueOptions = EnumDateTimePickerDefaultValueOptions.Empty Public Overloads Property DefaultValue() As EnumDateTimePickerDefaultValueOptions Get Return _default_value End Get Set(value As EnumDateTimePickerDefaultValueOptions) _default_value = value End Set End Property End Class Public Class CheckBoxProperties Inherits InputControlProperties Private _caption As String = "" Private _default_value As Boolean = False Public Overloads Property TreeView() As Boolean Get Return False End Get Set(value As Boolean) 'noop End Set End Property Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property Public Overloads Property DefaultValue As Boolean Get Return _default_value End Get Set(value As Boolean) _default_value = value End Set End Property End Class Public Class RadioButtonProperties Inherits InputControlProperties Private _caption As String = "" Private _default_value As Boolean = False Public Overloads Property TreeView() As Boolean Get Return False End Get Set(value As Boolean) 'noop End Set End Property Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property Public Overloads Property DefaultValue As Boolean Get Return _default_value End Get Set(value As Boolean) _default_value = value End Set End Property End Class Public Class DataGridViewProperties Inherits CommonProperties Private _show_column As Boolean Private _required As Boolean Private _read_only As Boolean Private _tree_view As Boolean Public Property ShowColumn() As Boolean Get Return _show_column End Get Set(value As Boolean) _show_column = value End Set End Property Public Property IsRequired() As Boolean Get Return _required End Get Set(value As Boolean) _required = value End Set End Property Public Property IsReadOnly() As Boolean Get Return _read_only End Get Set(value As Boolean) _read_only = value End Set End Property End Class Public Class PictureBoxProperties Inherits CommonProperties Private _required As Boolean Private _read_only As Boolean Public Property IsRequired() As Boolean Get Return _required End Get Set(value As Boolean) _required = value End Set End Property Public Property IsReadOnly() As Boolean Get Return _read_only End Get Set(value As Boolean) _read_only = value End Set End Property End Class Public Class GroupBoxProperties Inherits CommonProperties Private _caption As String = "" Private _back_color As Color Public Overloads Property TreeView() As Boolean Get Return False End Get Set(value As Boolean) 'noop End Set End Property Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property Public Property BackColor() As Color Get Return _back_color End Get Set(value As Color) _back_color = value End Set End Property End Class ' +++++ FUNCTION CLASSES +++++ Public Class FunctionAddAppointmentProperties Inherits BaseProperties Private _caption As String Private _subject As String Private _subject2 As String Private _from_date As String Private _from_time As String Private _to_date As String Private _to_time As String Private _place As String Private _description As String Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property Public Property Subject() As String Get Return _subject End Get Set(value As String) _subject = value End Set End Property Public Property Subject2() As String Get Return _subject2 End Get Set(value As String) _subject2 = value End Set End Property Public Property Place() As String Get Return _place End Get Set(value As String) _place = value End Set End Property Public Property Description() As String Get Return _description End Get Set(value As String) _description = value End Set End Property Public Property FromDate() As String Get Return _from_date End Get Set(value As String) _from_date = value End Set End Property Public Property ToDate() As String Get Return _to_date End Get Set(value As String) _to_date = value End Set End Property End Class Public Class FunctionAddFormDataProperties Inherits BaseProperties Private _caption As String Private _form_id As Integer Private _screen_id As Integer Public Property Caption() As String Get Return _caption End Get Set(value As String) _caption = value End Set End Property Public Property FormID() As Integer Get Return _form_id End Get Set(value As Integer) _form_id = value End Set End Property Public Property ScreenID() As Integer Get Return _screen_id End Get Set(value As Integer) _screen_id = value End Set End Property End Class End Module