diff --git a/Controls.LookupGrid/LookupControl.Designer.vb b/Controls.LookupGrid/LookupControl.Designer.vb deleted file mode 100644 index ffdedd38..00000000 --- a/Controls.LookupGrid/LookupControl.Designer.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Partial Class LookupControl - Inherits System.Windows.Forms.UserControl - - 'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - - Private Sub InitializeComponent() - Me.SuspendLayout() - ' - 'LookupControl - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.BackColor = System.Drawing.Color.Transparent - Me.Name = "LookupControl" - Me.Size = New System.Drawing.Size(270, 35) - Me.ResumeLayout(False) - - End Sub -End Class diff --git a/Controls.LookupGrid/LookupControl.resx b/Controls.LookupGrid/LookupControl.resx deleted file mode 100644 index 1af7de15..00000000 --- a/Controls.LookupGrid/LookupControl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Controls.LookupGrid/LookupControl.vb b/Controls.LookupGrid/LookupControl.vb deleted file mode 100644 index 7815ecb5..00000000 --- a/Controls.LookupGrid/LookupControl.vb +++ /dev/null @@ -1,137 +0,0 @@ - -Imports System.ComponentModel -Imports DevExpress.XtraEditors -Imports DevExpress.XtraEditors.Controls - -Public Class LookupControl - - Public Property MultiSelect As Boolean - - Public Property AllowAddNewValues As Boolean - - Public Property PreventDuplicates As Boolean - - - Public Property DataSource As DataTable - - Public Property SelectedValues As List(Of String) - Get - If _selectedValues Is Nothing Then - Return New List(Of String) - End If - - Return _selectedValues - End Get - Set(value As List(Of String)) - _selectedValues = value - - UpdateSelectedValues(value) - End Set - End Property - Private _selectedValues As List(Of String) - - Private _lookupControlMulti As GridLookUpEdit - Private _lookupControlSingle As ButtonEdit - - Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm" - Private Const TEXT_NO_RECORDS = "Keine Datensätze ausgewählt" - Private Const TEXT_N_RECORDS = "{0} Datensätze ausgewählt" - - Private Function GetLookupForm() As frmLookupGrid - Dim oForm As New frmLookupGrid() With { - .MultiSelect = MultiSelect, - .AddNewValues = AllowAddNewValues, - .PreventDuplicates = PreventDuplicates, - .DataSource = DataSource, - .SelectedValues = SelectedValues, - .StartPosition = Windows.Forms.FormStartPosition.Manual, - .Location = PointToScreen(New System.Drawing.Point(Width, 0)) - } - - Return oForm - End Function - - Private Sub Grid_Load(sender As Object, e As EventArgs) Handles Me.Load - If MultiSelect = False Then - _lookupControlSingle = New ButtonEdit With { - .Dock = Windows.Forms.DockStyle.Fill - } - - AddHandler _lookupControlSingle.ButtonClick, AddressOf lookupControlSingle_ButtonClick - - Controls.Add(_lookupControlSingle) - Else - _lookupControlMulti = New GridLookUpEdit With { - .Dock = Windows.Forms.DockStyle.Fill - } - - With _lookupControlMulti.Properties - .View.OptionsBehavior.ReadOnly = True - .View.OptionsBehavior.Editable = False - .View.OptionsView.ShowColumnHeaders = False - .PopupFormSize = New System.Drawing.Size(.PopupFormSize.Width, 100) - End With - - _lookupControlMulti.Properties.Buttons.Add(New EditorButton() With { - .Kind = ButtonPredefines.Ellipsis, - .Tag = TAG_BUTTON_LOOKUP_FORM - }) - - AddHandler _lookupControlMulti.ButtonClick, AddressOf lookupControlMulti_ButtonClick - AddHandler _lookupControlMulti.EditValueChanging, AddressOf lookupControlMulti_EditValueChanging - - Controls.Add(_lookupControlMulti) - End If - - UpdateSelectedValues(SelectedValues) - End Sub - - Private Sub UpdateSelectedValues(Values As List(Of String)) - If MultiSelect = True Then - _lookupControlMulti.Properties.DataSource = Values - _lookupControlMulti.Properties.NullText = IIf(Values.Count = 0, TEXT_NO_RECORDS, String.Format(TEXT_N_RECORDS, Values.Count)) - Else - _lookupControlSingle.Text = Values.FirstOrDefault() - End If - End Sub - - Private Sub lookupControlMulti_EditValueChanging(sender As Object, e As ChangingEventArgs) - e.Cancel = True - End Sub - - Private Sub lookupControlMulti_ButtonClick(sender As Object, e As ButtonPressedEventArgs) - If e.Button.Tag <> TAG_BUTTON_LOOKUP_FORM Then - Exit Sub - End If - - Dim oForm As frmLookupGrid = GetLookupForm() - Dim oResult = oForm.ShowDialog() - - If oResult = Windows.Forms.DialogResult.OK Then - Dim oValues = oForm.SelectedValues - - UpdateSelectedValues(oValues) - - SelectedValues = oValues - End If - - oForm.Dispose() - End Sub - - Private Sub lookupControlSingle_ButtonClick(sender As Object, e As ButtonPressedEventArgs) - Dim oForm As frmLookupGrid = GetLookupForm() - Dim oResult = oForm.ShowDialog() - - If oResult = Windows.Forms.DialogResult.OK Then - Dim oValues = oForm.SelectedValues - - UpdateSelectedValues(oValues) - - SelectedValues = oValues - End If - - oForm.Dispose() - End Sub -End Class - - diff --git a/Controls.LookupGrid/LookupControl.vbproj b/Controls.LookupGrid/LookupControl.vbproj index 38f00b9a..e025f218 100644 --- a/Controls.LookupGrid/LookupControl.vbproj +++ b/Controls.LookupGrid/LookupControl.vbproj @@ -98,23 +98,7 @@ Form - - LookupControl.vb - - - UserControl - - - Component - - - - - LookupGridView.vb - - - Component - + True @@ -154,12 +138,6 @@ frmLookupGrid.vb - - LookupControl.vb - - - LookupControl2.vb - LookupControl3.vb diff --git a/Controls.LookupGrid/LookupControl.vbproj.bak b/Controls.LookupGrid/LookupControl.vbproj.bak deleted file mode 100644 index 42070850..00000000 --- a/Controls.LookupGrid/LookupControl.vbproj.bak +++ /dev/null @@ -1,180 +0,0 @@ - - - - - Debug - AnyCPU - {3DCD6D1A-C830-4241-B7E4-27430E7EA483} - Library - DigitalData.Controls.LookupGrid - DigitalData.Controls.LookupGrid - 512 - Windows - v4.6.1 - - - true - full - true - true - bin\Debug\ - DigitalData.Controls.LookupGrid.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - DigitalData.Controls.LookupGrid.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - False - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.Office.v18.1.Core.dll - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.Pdf.v18.1.Core.dll - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.Printing.v18.1.Core.dll - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.RichEdit.v18.1.Core.dll - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.RichEdit.v18.1.Export.dll - - - - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.XtraLayout.v18.1.dll - - - False - D:\ProgramFiles\DevExpress 18.1\Components\Bin\Framework\DevExpress.XtraPrinting.v18.1.dll - - - - - - - - - - - - - - - - - - - - - - - - - frmLookupGrid.vb - - - Form - - - LookupControl.vb - - - UserControl - - - Component - - - - - LookupGridView.vb - - - Component - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - LookupGridControl.vb - - - Component - - - - - frmLookupGrid.vb - - - LookupControl.vb - - - LookupControl2.vb - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - - \ No newline at end of file diff --git a/Controls.LookupGrid/LookupControl2.resx b/Controls.LookupGrid/LookupControl2.resx deleted file mode 100644 index e5858cc2..00000000 --- a/Controls.LookupGrid/LookupControl2.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/Controls.LookupGrid/LookupControl2.vb b/Controls.LookupGrid/LookupControl2.vb deleted file mode 100644 index c3662fa3..00000000 --- a/Controls.LookupGrid/LookupControl2.vb +++ /dev/null @@ -1,272 +0,0 @@ -Imports System.ComponentModel -Imports System.Drawing -Imports System.Windows.Forms -Imports DevExpress.Accessibility -Imports DevExpress.XtraEditors -Imports DevExpress.XtraEditors.Drawing -Imports DevExpress.XtraEditors.Registrator -Imports DevExpress.XtraEditors.Repository -Imports DevExpress.XtraEditors.ViewInfo -Imports DevExpress.XtraEditors.Controls - - -Public Class LookupControl2 - Inherits GridLookUpEdit - - Public Delegate Sub SelectedValuesChangedHandler(sender As Object, SelectedValues As List(Of String)) - Public Event SelectedValuesChanged As SelectedValuesChangedHandler - - Public Property AllowAddNewValues As Boolean - Public Property PreventDuplicates As Boolean - Public Property DataSource As DataTable - - Public Property MultiSelect As Boolean - Get - Return _Multiselect - End Get - Set(value As Boolean) - SetDropdownButtonEnabled(value) - _MultiSelect = value - End Set - End Property - - Public Property SelectedValues As List(Of String) - Get - Return _SelectedValues - End Get - Set(value As List(Of String)) - UpdateSelectedValues(value) - End Set - End Property - - Public Overloads Property [ReadOnly] As Boolean - Get - Return _ReadOnly - End Get - Set(value As Boolean) - SetFormButtonEnabled(Not value) - _ReadOnly = value - End Set - End Property - - Private ReadOnly _LookupFormButton As EditorButton - - Private Const TAG_DROPDOWN = "openDropdown" - Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm" - - Private _R As Resources.ResourceManager = My.Resources.Strings.ResourceManager - Private _SelectedValues As New List(Of String) - Private _MultiSelect As Boolean - - Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents fProperties As RepositoryItemGridLookUpEdit - Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView - Private _ReadOnly As Boolean = False - - Shared Sub New() - RepositoryItemLookupControl2.RegisterLookupControl2() - End Sub - - Public Sub New() - MyClass.New(MultiSelect:=False) - End Sub - - Public Sub New(MultiSelect As Boolean) - _LookupFormButton = New EditorButton() With { - .Kind = ButtonPredefines.Search, - .Tag = TAG_BUTTON_LOOKUP_FORM, - .Width = 20 - } - - Properties.Buttons.Item(0).Tag = TAG_DROPDOWN - Properties.Buttons.AddRange({_LookupFormButton}) - Properties.NullText = _R.GetString("LookupControl_NoRecords") - - AddHandler ButtonClick, AddressOf HandleButtonClick - AddHandler EditValueChanging, AddressOf HandleEditValueChanging - AddHandler QueryPopUp, AddressOf HandleQueryPopup - End Sub - - Private Sub SetFormButtonEnabled(pVisible As Boolean) - Dim oButton As EditorButton = Properties.Buttons. - Where(Function(b) b.Tag = TAG_BUTTON_LOOKUP_FORM). - FirstOrDefault() - - If oButton IsNot Nothing Then - oButton.Visible = pVisible - End If - End Sub - - Private Sub SetDropdownButtonEnabled(pVisible As Boolean) - Dim oButton As EditorButton = Properties.Buttons. - Where(Function(b) b.Tag = TAG_DROPDOWN). - FirstOrDefault() - - If oButton IsNot Nothing Then - oButton.Visible = pVisible - End If - End Sub - - ''' - ''' Prevents popup from opening when multiselect is false - ''' - Private Sub HandleQueryPopup(sender As Object, e As CancelEventArgs) - If MultiSelect = False Then - e.Cancel = True - End If - End Sub - - ''' - ''' Prevents Editvalue changing when multiselect is true - ''' - Private Sub HandleEditValueChanging(sender As Object, e As ChangingEventArgs) - If MultiSelect Then - e.Cancel = True - End If - End Sub - - ''' - ''' Handles opening frmLookup when ellipsis button is clicked - ''' - Private Sub HandleButtonClick(sender As Object, e As ButtonPressedEventArgs) - Select Case e.Button.Tag - Case TAG_BUTTON_LOOKUP_FORM - Using oForm = GetLookupForm() - Dim oResult = oForm.ShowDialog() - - If oResult = Windows.Forms.DialogResult.OK Then - Dim oValues = oForm.SelectedValues - UpdateSelectedValues(oValues) - End If - End Using - End Select - End Sub - - Private Sub UpdateSelectedValues(Values As List(Of String)) - If Values Is Nothing Then - Exit Sub - End If - - Values.RemoveAll(Function(v) String.IsNullOrEmpty(v)) - - If MultiSelect = True Then - Properties.DataSource = Values - - Select Case Values.Count - Case 0 - Properties.NullText = _R.GetString("LookupControl_NoRecords") - Case 1 - Properties.NullText = _R.GetString("LookupControl_OneRecord") - Case Else - Properties.NullText = String.Format(_R.GetString("LookupControl_NRecords"), Values.Count) - End Select - Else - Properties.NullText = Values.FirstOrDefault() - Text = Values.FirstOrDefault() - EditValue = Nothing - End If - - _SelectedValues = Values - - RaiseEvent SelectedValuesChanged(Me, Values) - End Sub - - Private Function GetLookupForm() As frmLookupGrid - Dim oForm As New frmLookupGrid() With { - .MultiSelect = MultiSelect, - .AddNewValues = AllowAddNewValues, - .PreventDuplicates = PreventDuplicates, - .DataSource = DataSource, - .SelectedValues = SelectedValues, - .StartPosition = FormStartPosition.Manual, - .Location = PointToScreen(New Point(Width, 0)) - } - - Return oForm - End Function - - - Public Shadows ReadOnly Property Properties As RepositoryItemLookupControl2 - Get - Return TryCast(MyBase.Properties, RepositoryItemLookupControl2) - End Get - End Property - - Public Overrides ReadOnly Property EditorTypeName As String - Get - Return RepositoryItemLookupControl2.CustomEditName - End Get - End Property - - Private Sub InitializeComponent() - Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit() - Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView() - CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'fProperties - ' - Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.fProperties.Name = "fProperties" - Me.fProperties.PopupView = Me.fPropertiesView - ' - 'fPropertiesView - ' - Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.fPropertiesView.Name = "fPropertiesView" - Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False - Me.fPropertiesView.OptionsView.ShowGroupPanel = False - CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - - End Sub -End Class - - -Public Class RepositoryItemLookupControl2 - Inherits RepositoryItemGridLookUpEdit - - Shared Sub New() - RegisterLookupControl2() - End Sub - - Public Const CustomEditName As String = "LookupControl2" - - Public Overrides ReadOnly Property EditorTypeName As String - Get - Return CustomEditName - End Get - End Property - - Public Shared Sub RegisterLookupControl2() - Dim img As Image = Nothing - EditorRegistrationInfo.Default.Editors.Add( - New EditorClassInfo( - CustomEditName, - GetType(LookupControl2), - GetType(RepositoryItemLookupControl2), - GetType(GridLookUpEditBaseViewInfo), - New ButtonEditPainter(), - True, - img, - GetType(ButtonEditAccessible) - ) - ) - End Sub - - Public Overrides Sub Assign(item As RepositoryItem) - BeginUpdate() - Try - MyBase.Assign(item) - Dim source As RepositoryItemLookupControl2 = TryCast(item, RepositoryItemLookupControl2) - If source Is Nothing Then - Return - End If - Finally - EndUpdate() - End Try - End Sub -End Class diff --git a/Controls.LookupGrid/LookupControl3.vb b/Controls.LookupGrid/LookupControl3.vb index 11852848..a107ee38 100644 --- a/Controls.LookupGrid/LookupControl3.vb +++ b/Controls.LookupGrid/LookupControl3.vb @@ -47,6 +47,7 @@ Public Class RepositoryItemLookupControl3 Public Sub New() SetDropdownButtonEnabled(_MultiSelect) + End Sub Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__" @@ -114,6 +115,8 @@ Public Class RepositoryItemLookupControl3 GetType(ButtonEditAccessible) ) EditorRegistrationInfo.Default.Editors.Add(oClassInfo) + + End Sub Private Sub SetFormButtonEnabled(pVisible As Boolean) diff --git a/Controls.LookupGrid/LookupGridHandler.vb b/Controls.LookupGrid/LookupGridHandler.vb deleted file mode 100644 index 1ff6e7be..00000000 --- a/Controls.LookupGrid/LookupGridHandler.vb +++ /dev/null @@ -1,21 +0,0 @@ -Imports System.Windows.Forms -Imports DevExpress.XtraGrid.Views.Grid - -Namespace LookupGrid - Public Class LookupGridHandler - Inherits Handler.GridHandler - - Public Sub New(ByVal gridView As GridView) - MyBase.New(gridView) - End Sub - - Protected Overrides Sub OnKeyDown(ByVal e As KeyEventArgs) - MyBase.OnKeyDown(e) - If e.KeyData = Keys.Delete AndAlso View.State = GridState.Normal Then - View.DeleteRow(View.FocusedRowHandle) - End If - End Sub - End Class - -End Namespace - diff --git a/Controls.LookupGrid/LookupGridLocalizer.vb b/Controls.LookupGrid/LookupGridLocalizer.vb new file mode 100644 index 00000000..6d47d58c --- /dev/null +++ b/Controls.LookupGrid/LookupGridLocalizer.vb @@ -0,0 +1,24 @@ +Imports DevExpress.XtraEditors.Controls + +Public Class LookupGridLocalizer + Inherits EditResLocalizer + + Private Const LANG_DE = "de-DE" + + Public Overrides Function GetLocalizedString(id As StringId) As String + Dim oResult As String + + Select Case id + Case StringId.LookUpEditValueIsNull + If Language = LANG_DE Then + oResult = "[Kein Wert ausgewählt]" + Else + oResult = "[No Value selected]" + End If + Case Else + oResult = MyBase.GetLocalizedString(id) + End Select + + Return oResult + End Function +End Class diff --git a/Controls.LookupGrid/LookupGridRegistration.vb b/Controls.LookupGrid/LookupGridRegistration.vb deleted file mode 100644 index 44571ac1..00000000 --- a/Controls.LookupGrid/LookupGridRegistration.vb +++ /dev/null @@ -1,26 +0,0 @@ -Imports DevExpress.XtraGrid -Imports DevExpress.XtraGrid.Views.Base -Imports DevExpress.XtraGrid.Views.Base.Handler -Imports DevExpress.XtraGrid.Registrator - -Namespace LookupGrid - Public Class LookupGridViewInfoRegistrator - Inherits GridInfoRegistrator - - Public Overrides ReadOnly Property ViewName() As String - Get - Return "GridView" - End Get - End Property - Public Overrides Function CreateView(ByVal grid As GridControl) As BaseView - Return New LookupGridView(TryCast(grid, GridControl)) - End Function - Public Overrides Function CreateHandler(ByVal view As BaseView) As BaseViewHandler - Return New LookupGridHandler(TryCast(view, LookupGridView)) - End Function - End Class - - - -End Namespace - diff --git a/Controls.LookupGrid/LookupGridView.Designer.vb b/Controls.LookupGrid/LookupGridView.Designer.vb deleted file mode 100644 index d7a21e07..00000000 --- a/Controls.LookupGrid/LookupGridView.Designer.vb +++ /dev/null @@ -1,47 +0,0 @@ -Partial Class LookupGridView - Inherits System.ComponentModel.Component - - - Public Sub New(ByVal container As System.ComponentModel.IContainer) - MyClass.New() - - 'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers - If (container IsNot Nothing) Then - container.Add(Me) - End If - - End Sub - - - Public Sub New() - MyBase.New() - - 'Dieser Aufruf ist für den Komponenten-Designer erforderlich. - InitializeComponent() - - End Sub - - 'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste. - - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Komponenten-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich. - 'Das Bearbeiten ist mit dem Komponenten-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - - Private Sub InitializeComponent() - components = New System.ComponentModel.Container() - End Sub - -End Class diff --git a/Controls.LookupGrid/LookupGridView.vb b/Controls.LookupGrid/LookupGridView.vb deleted file mode 100644 index 101e270f..00000000 --- a/Controls.LookupGrid/LookupGridView.vb +++ /dev/null @@ -1,56 +0,0 @@ -Imports DevExpress.Data.Helpers -Imports DevExpress.Data.Filtering -Imports DevExpress.XtraGrid.Views.Base -Imports System.Reflection - -Namespace LookupGrid - Public Class LookupGridView - Inherits DevExpress.XtraGrid.Views.Grid.GridView - - Private _simpleSearch As Boolean - Public Sub New() - Me.New(Nothing) - End Sub - Public Property SimpleSearch() As Boolean - Get - Return _simpleSearch - End Get - Set(ByVal value As Boolean) - _simpleSearch = value - End Set - End Property - - Public Sub New(ByVal grid As DevExpress.XtraGrid.GridControl) - MyBase.New(grid) - ' put your initialization code here - End Sub - Protected Overrides ReadOnly Property ViewName() As String - Get - Return "LookupGridView" - End Get - End Property - Protected Overrides Function ConvertGridFilterToDataFilter(ByVal criteria As CriteriaOperator) As CriteriaOperator - Dim originalFindFilterText As String = Convert.ToString(GetType(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.GetField, Nothing, Me, New Object() {})) - If SimpleSearch Then - If Not (String.IsNullOrEmpty(originalFindFilterText)) Then - GetType(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.SetField, Nothing, Me, New Object() {String.Concat("""", originalFindFilterText, """")}) - End If - Dim findCriteria As CriteriaOperator = Nothing - Dim _lastParserResults As FindSearchParserResults = Nothing - If Not (String.IsNullOrEmpty(FindFilterText)) Then - _lastParserResults = (New FindSearchParser()).Parse(FindFilterText, GetFindToColumnsCollection()) - GetType(ColumnView).GetField("lastParserResults", BindingFlags.NonPublic Or BindingFlags.Instance).SetValue(Me, _lastParserResults) - If Not IsServerMode Then - _lastParserResults.AppendColumnFieldPrefixes() - End If - findCriteria = DxFtsContainsHelperAlt.Create(_lastParserResults, FilterCondition.Contains, IsServerMode) - End If - GetType(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.SetField, Nothing, Me, New Object() {originalFindFilterText}) - Return criteria And findCriteria - End If - Return MyBase.ConvertGridFilterToDataFilter(criteria) - End Function - End Class - -End Namespace -