You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
7.6 KiB

Public Class frmSBSpaltenDarstellung
Inherits System.Windows.Forms.Form
#Region " Vom Windows Form Designer generierter Code "
Public Sub New()
MyBase.New()
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
End Sub
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
' Für Windows Form-Designer erforderlich
Private components As System.ComponentModel.IContainer
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
'Sie kann mit dem Windows Form-Designer modifiziert werden.
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents ListBox2 As System.Windows.Forms.ListBox
Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmSBSpaltenDarstellung))
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.ListBox2 = New System.Windows.Forms.ListBox()
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.Location = New System.Drawing.Point(16, 56)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.ListBox1.Size = New System.Drawing.Size(184, 329)
Me.ListBox1.Sorted = True
Me.ListBox1.TabIndex = 0
'
'ListBox2
'
Me.ListBox2.Location = New System.Drawing.Point(232, 56)
Me.ListBox2.Name = "ListBox2"
Me.ListBox2.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.ListBox2.Size = New System.Drawing.Size(184, 329)
Me.ListBox2.Sorted = True
Me.ListBox2.TabIndex = 1
'
'ToolBar1
'
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1})
Me.ToolBar1.DropDownArrows = True
Me.ToolBar1.ImageList = Me.ImageList1
Me.ToolBar1.Name = "ToolBar1"
Me.ToolBar1.ShowToolTips = True
Me.ToolBar1.Size = New System.Drawing.Size(432, 25)
Me.ToolBar1.TabIndex = 2
'
'ToolBarButton1
'
Me.ToolBarButton1.ImageIndex = 0
'
'ImageList1
'
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 40)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(144, 16)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Vorhandene Spalten"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(232, 40)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(144, 16)
Me.Label2.TabIndex = 4
Me.Label2.Text = "Anzuzeigende Spalten"
'
'Button1
'
Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Bitmap)
Me.Button1.ImageIndex = 4
Me.Button1.ImageList = Me.ImageList1
Me.Button1.Location = New System.Drawing.Point(200, 176)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(32, 32)
Me.Button1.TabIndex = 5
'
'Button2
'
Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Bitmap)
Me.Button2.ImageIndex = 3
Me.Button2.ImageList = Me.ImageList1
Me.Button2.Location = New System.Drawing.Point(200, 216)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(32, 32)
Me.Button2.TabIndex = 6
'
'frmSpaltenDarstellung
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(432, 397)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button2, Me.Button1, Me.Label2, Me.Label1, Me.ToolBar1, Me.ListBox2, Me.ListBox1})
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmSpaltenDarstellung"
Me.Text = "Spalten-Selektion"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub frmSpaltenDarstellung_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
Dim i As Integer
Select Case ToolBar1.Buttons.IndexOf(e.Button)
Case 0 'close button
Me.Close()
Case Else
End Select
End Sub
Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Dim i As Integer
For i = 0 To Me.ListBox1.SelectedItems.Count - 1
Me.ListBox2.Items.Add(Me.ListBox1.SelectedItems(i))
Next
For i = 0 To Me.ListBox1.SelectedItems.Count - 1
Me.ListBox1.Items.Remove(Me.ListBox1.SelectedItems(0))
Next
'Me.ListBox2.Items.Add(Me.ListBox1.SelectedI
'Me.ListBox1.Items.Remove(Me.ListBox1.SelectedItem)
End Sub
Private Sub ListBox2_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox2.DoubleClick
Dim i As Integer
For i = 0 To Me.ListBox2.SelectedItems.Count - 1
Me.ListBox1.Items.Add(Me.ListBox2.SelectedItems(i))
Next
For i = 0 To Me.ListBox2.SelectedItems.Count - 1
Me.ListBox2.Items.Remove(Me.ListBox2.SelectedItems(0))
Next
'Me.ListBox1.Items.Add(Me.ListBox2.SelectedItem)
'Me.ListBox2.Items.Remove(Me.ListBox2.SelectedItem)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1_DoubleClick(sender, e)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox2_DoubleClick(sender, e)
End Sub
End Class