diff --git a/.vs/Gästeliste/v14/.suo b/.vs/Gästeliste/v14/.suo index 0021508..6a612cb 100644 Binary files a/.vs/Gästeliste/v14/.suo and b/.vs/Gästeliste/v14/.suo differ diff --git a/Gästeliste/GästeDataSet.Designer.vb b/Gästeliste/GästeDataSet.Designer.vb index 1a58ccb..cd7f932 100644 --- a/Gästeliste/GästeDataSet.Designer.vb +++ b/Gästeliste/GästeDataSet.Designer.vb @@ -27,6 +27,8 @@ Partial Public Class GästeDataSet Private tableGäste As GästeDataTable + Private tableLänder As LänderDataTable + Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema _ + Public ReadOnly Property Länder() As LänderDataTable + Get + Return Me.tableLänder + End Get + End Property + _ + Private Function ShouldSerializeLänder() As Boolean + Return false + End Function + _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) @@ -275,6 +307,9 @@ Partial Public Class GästeDataSet _ Public Delegate Sub GästeRowChangeEventHandler(ByVal sender As Object, ByVal e As GästeRowChangeEvent) + _ + Public Delegate Sub LänderRowChangeEventHandler(ByVal sender As Object, ByVal e As LänderRowChangeEvent) + ''' '''Represents the strongly named DataTable class. ''' @@ -695,6 +730,258 @@ Partial Public Class GästeDataSet End Function End Class + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class LänderDataTable + Inherits Global.System.Data.TypedTableBase(Of LänderRow) + + Private columnLand As Global.System.Data.DataColumn + + _ + Public Sub New() + MyBase.New + Me.TableName = "Länder" + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive + End If + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale + End If + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub + + _ + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars + End Sub + + _ + Public ReadOnly Property LandColumn() As Global.System.Data.DataColumn + Get + Return Me.columnLand + End Get + End Property + + _ + Public ReadOnly Property Count() As Integer + Get + Return Me.Rows.Count + End Get + End Property + + _ + Public Default ReadOnly Property Item(ByVal index As Integer) As LänderRow + Get + Return CType(Me.Rows(index),LänderRow) + End Get + End Property + + _ + Public Event LänderRowChanging As LänderRowChangeEventHandler + + _ + Public Event LänderRowChanged As LänderRowChangeEventHandler + + _ + Public Event LänderRowDeleting As LänderRowChangeEventHandler + + _ + Public Event LänderRowDeleted As LänderRowChangeEventHandler + + _ + Public Overloads Sub AddLänderRow(ByVal row As LänderRow) + Me.Rows.Add(row) + End Sub + + _ + Public Overloads Function AddLänderRow(ByVal Land As String) As LänderRow + Dim rowLänderRow As LänderRow = CType(Me.NewRow,LänderRow) + Dim columnValuesArray() As Object = New Object() {Land} + rowLänderRow.ItemArray = columnValuesArray + Me.Rows.Add(rowLänderRow) + Return rowLänderRow + End Function + + _ + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As LänderDataTable = CType(MyBase.Clone,LänderDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New LänderDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnLand = MyBase.Columns("Land") + End Sub + + _ + Private Sub InitClass() + Me.columnLand = New Global.System.Data.DataColumn("Land", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnLand) + End Sub + + _ + Public Function NewLänderRow() As LänderRow + Return CType(Me.NewRow,LänderRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New LänderRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(LänderRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.LänderRowChangedEvent) Is Nothing) Then + RaiseEvent LänderRowChanged(Me, New LänderRowChangeEvent(CType(e.Row,LänderRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.LänderRowChangingEvent) Is Nothing) Then + RaiseEvent LänderRowChanging(Me, New LänderRowChangeEvent(CType(e.Row,LänderRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.LänderRowDeletedEvent) Is Nothing) Then + RaiseEvent LänderRowDeleted(Me, New LänderRowChangeEvent(CType(e.Row,LänderRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.LänderRowDeletingEvent) Is Nothing) Then + RaiseEvent LänderRowDeleting(Me, New LänderRowChangeEvent(CType(e.Row,LänderRow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveLänderRow(ByVal row As LänderRow) + Me.Rows.Remove(row) + End Sub + + _ + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As GästeDataSet = New GästeDataSet() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "LänderDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If + End Try + End If + xs.Add(dsSchema) + Return type + End Function + End Class + ''' '''Represents strongly named DataRow class. ''' @@ -891,6 +1178,49 @@ Partial Public Class GästeDataSet End Sub End Class + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class LänderRow + Inherits Global.System.Data.DataRow + + Private tableLänder As LänderDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableLänder = CType(Me.Table,LänderDataTable) + End Sub + + _ + Public Property Land() As String + Get + If Me.IsLandNull Then + Return String.Empty + Else + Return CType(Me(Me.tableLänder.LandColumn),String) + End If + End Get + Set + Me(Me.tableLänder.LandColumn) = value + End Set + End Property + + _ + Public Function IsLandNull() As Boolean + Return Me.IsNull(Me.tableLänder.LandColumn) + End Function + + _ + Public Sub SetLandNull() + Me(Me.tableLänder.LandColumn) = Global.System.Convert.DBNull + End Sub + End Class + ''' '''Row event argument class ''' @@ -926,4 +1256,40 @@ Partial Public Class GästeDataSet End Get End Property End Class + + ''' + '''Row event argument class + ''' + _ + Public Class LänderRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As LänderRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As LänderRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As LänderRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class End Class diff --git a/Gästeliste/GästeDataSet.vb b/Gästeliste/GästeDataSet.vb index f410a09..8eef3b0 100644 --- a/Gästeliste/GästeDataSet.vb +++ b/Gästeliste/GästeDataSet.vb @@ -4,8 +4,6 @@ If (e.Column.ColumnName = Me.IDColumn.ColumnName) Then 'Benutzercode hier einfügen End If - End Sub - End Class End Class diff --git a/Gästeliste/GästeDataSet.xsd b/Gästeliste/GästeDataSet.xsd index a6db2d3..9030dcf 100644 --- a/Gästeliste/GästeDataSet.xsd +++ b/Gästeliste/GästeDataSet.xsd @@ -36,6 +36,13 @@ + + + + + + + diff --git a/Gästeliste/GästeDataSet.xss b/Gästeliste/GästeDataSet.xss index 9cfe2c1..33df4cf 100644 --- a/Gästeliste/GästeDataSet.xss +++ b/Gästeliste/GästeDataSet.xss @@ -6,7 +6,8 @@ --> - + + \ No newline at end of file diff --git a/Gästeliste/Gästeliste.vbproj b/Gästeliste/Gästeliste.vbproj index 7fb2083..6737021 100644 --- a/Gästeliste/Gästeliste.vbproj +++ b/Gästeliste/Gästeliste.vbproj @@ -26,13 +26,13 @@ false http://tools.dominicreich.com/Gaesteliste/ http://tools.dominicreich.com/Gaesteliste/ - http://tmsn.at/%3ftools&gaesteliste + http://klamm.io https://github.com/freefallcid/Gaesteliste/issues Gästeliste Dominic Reich 1.0.0.0 false - 21 + 22 1.0.1.%2a true true diff --git a/Gästeliste/Gästeliste.vbproj.user b/Gästeliste/Gästeliste.vbproj.user index 4760691..ba260d5 100644 --- a/Gästeliste/Gästeliste.vbproj.user +++ b/Gästeliste/Gästeliste.vbproj.user @@ -3,7 +3,7 @@ Z:\Gaesteliste\|publish\ http://tools.dominicreich.com/Gaesteliste/ - http://tmsn.at/%3ftools&gaesteliste + http://klamm.io|http://tmsn.at/%3ftools&gaesteliste http://tools.dominicreich.com/Gaesteliste/ https://github.com/freefallcid/Gaesteliste/issues diff --git a/Gästeliste/frmAbout.resx b/Gästeliste/frmAbout.resx index 00f6f1b..ee96ea4 100644 --- a/Gästeliste/frmAbout.resx +++ b/Gästeliste/frmAbout.resx @@ -608,23 +608,23 @@ Passen Sie die Assemblyinformationen der Anwendung im Anwendungsbereich des Proj - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAANrSURBVDhPdZB7TJNXGIdPJskgklJDIBCoTgQvEIgoQ9DB - 7MR6A29QRoQ/jOj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5jE9IQECAMiSQhTXb87Cj3owdNXrsrDWARz/EkzzH7ktj2HN5AnsaJrH/2iyi + DwrqSXi4H6N7g5QGsv0RvD4ZSReN2FppwDa6Uqv0SBPrkS4ZRU6DHgUtBhTSYa5JKxAy6gfoIAsDV7Dx + yYZ45NSpcbptDKW3n0PUZUB1pxaV8gGcb1T8XVjR9jJPUK1lha/bxaj/cICfnY2Sc+ffFpW3vDpRJNZl + 5J5VJKV9Wb8yJkXgHxKZSXxYifTcKrqWe43/wPLz88ugN0mlz6vf93R99P7i/yHkHRCJ8/TOfTc4AAAA + AElFTkSuQmCC \ No newline at end of file diff --git a/Gästeliste/frmAbout.vb b/Gästeliste/frmAbout.vb index 01fe0a9..ee35c41 100644 --- a/Gästeliste/frmAbout.vb +++ b/Gästeliste/frmAbout.vb @@ -22,7 +22,7 @@ End Sub Private Sub lnkWebsite_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lnkWebsite.LinkClicked - Process.Start("http://tmsn.at/?tools&gaesteliste") + Process.Start("http://klamm.io") End Sub Private Sub lnkIcons_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lnkIcons.LinkClicked diff --git a/Gästeliste/frmMain.Designer.vb b/Gästeliste/frmMain.Designer.vb index ec24014..55c24c9 100644 --- a/Gästeliste/frmMain.Designer.vb +++ b/Gästeliste/frmMain.Designer.vb @@ -232,27 +232,27 @@ Partial Class frmMain ' Me.InfoToolStripMenuItem.Name = "InfoToolStripMenuItem" Me.InfoToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No - Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(172, 22) Me.InfoToolStripMenuItem.Text = "Info" ' 'OnlineHilfeToolStripMenuItem ' Me.OnlineHilfeToolStripMenuItem.Name = "OnlineHilfeToolStripMenuItem" Me.OnlineHilfeToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No - Me.OnlineHilfeToolStripMenuItem.Size = New System.Drawing.Size(152, 22) - Me.OnlineHilfeToolStripMenuItem.Text = "Online-Hilfe" + Me.OnlineHilfeToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.OnlineHilfeToolStripMenuItem.Text = "Webseite anzeigen" ' 'ToolStripMenuItem1 ' Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" Me.ToolStripMenuItem1.RightToLeft = System.Windows.Forms.RightToLeft.No - Me.ToolStripMenuItem1.Size = New System.Drawing.Size(149, 6) + Me.ToolStripMenuItem1.Size = New System.Drawing.Size(169, 6) ' 'UpdateToolStripMenuItem ' Me.UpdateToolStripMenuItem.Name = "UpdateToolStripMenuItem" Me.UpdateToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No - Me.UpdateToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.UpdateToolStripMenuItem.Size = New System.Drawing.Size(172, 22) Me.UpdateToolStripMenuItem.Text = "Update" ' 'StatusStrip1 diff --git a/Gästeliste/frmMain.resx b/Gästeliste/frmMain.resx index 42bbb55..b77fba3 100644 --- a/Gästeliste/frmMain.resx +++ b/Gästeliste/frmMain.resx @@ -120,6 +120,12 @@ 142, 17 + + 142, 17 + + + 17, 17 + 17, 17 diff --git a/Gästeliste/frmMain.vb b/Gästeliste/frmMain.vb index 680e446..a261448 100644 --- a/Gästeliste/frmMain.vb +++ b/Gästeliste/frmMain.vb @@ -79,7 +79,7 @@ Public Class frmMain End Sub Private Sub OnlineHilfeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OnlineHilfeToolStripMenuItem.Click - Process.Start("http://tmsn.at/?tools&gaesteliste&hilfe") + Process.Start("http://klamm.io") End Sub Private Sub UpdateToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UpdateToolStripMenuItem.Click diff --git a/Gästeliste/frmPerson.designer.vb b/Gästeliste/frmPerson.designer.vb index 2bc7d2d..0cc14f6 100644 --- a/Gästeliste/frmPerson.designer.vb +++ b/Gästeliste/frmPerson.designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class frmPerson Inherits System.Windows.Forms.Form 'Das Formular ü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 @@ -20,7 +20,7 @@ Partial Class frmPerson '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.components = New System.ComponentModel.Container() Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() @@ -50,9 +50,9 @@ Partial Class frmPerson Me.txtAnmerkung = New System.Windows.Forms.TextBox() Me.chkStammgast = New System.Windows.Forms.CheckBox() Me.chkBlacklist = New System.Windows.Forms.CheckBox() + Me.cboLand = New System.Windows.Forms.ComboBox() Me.GästeBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.GästeDataSet = New Gästeliste.GästeDataSet() - Me.cboLand = New System.Windows.Forms.ComboBox() Me.TableLayoutPanel1.SuspendLayout() Me.TableLayoutPanel2.SuspendLayout() CType(Me.GästeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() @@ -343,6 +343,16 @@ Partial Class frmPerson Me.chkBlacklist.TabIndex = 2 Me.chkBlacklist.UseVisualStyleBackColor = True ' + 'cboLand + ' + Me.cboLand.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems + Me.cboLand.Dock = System.Windows.Forms.DockStyle.Fill + Me.cboLand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cboLand.Location = New System.Drawing.Point(103, 177) + Me.cboLand.Name = "cboLand" + Me.cboLand.Size = New System.Drawing.Size(234, 21) + Me.cboLand.TabIndex = 3 + ' 'GästeBindingSource ' Me.GästeBindingSource.DataMember = "Gäste" @@ -353,20 +363,6 @@ Partial Class frmPerson Me.GästeDataSet.DataSetName = "GästeDataSet" Me.GästeDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema ' - 'cboLand - ' - Me.cboLand.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest - Me.cboLand.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems - Me.cboLand.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.GästeBindingSource, "Land", True)) - Me.cboLand.Dock = System.Windows.Forms.DockStyle.Fill - Me.cboLand.FormattingEnabled = True - Me.cboLand.Items.AddRange(New Object() {"Deutschland", "Österreich", "Schweiz", "Niederlande"}) - Me.cboLand.Location = New System.Drawing.Point(103, 177) - Me.cboLand.Name = "cboLand" - Me.cboLand.Size = New System.Drawing.Size(234, 21) - Me.cboLand.TabIndex = 3 - Me.cboLand.Text = "Deutschland" - ' 'frmPerson ' Me.AcceptButton = Me.OK_Button diff --git a/Gästeliste/frmPerson.vb b/Gästeliste/frmPerson.vb index fce5e03..87930ca 100644 --- a/Gästeliste/frmPerson.vb +++ b/Gästeliste/frmPerson.vb @@ -11,4 +11,39 @@ Public Class frmPerson Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() End Sub + + Private Sub frmPerson_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If Me.Tag = "add" Then + Me.Text = "Gast hinzufügen" + ElseIf Me.Tag = "edit" Then + Me.Text = "Gast bearbeiten" + End If + 'Dim dt As DataTable = GästeDataSet.Tables("Länder") + 'Dim dr As DataRow = dt.NewRow() + + 'With dr + '.Item("Land") = 'unfinished + 'End With + 'cboLand.Items.Add("Neues Land eintragen") + End Sub + + Private Sub cboLand_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboLand.SelectedIndexChanged + If cboLand.Text = "Neues Land eintragen" Then + Dim NeuesLand As String = InputBox("Name des neuen Landes:", "Neues Land eintragen") + If NeuesLand <> "" Then + ' eintragen + If Not cboLand.Items.Contains(NeuesLand) Then + Dim Anzahl As Integer = cboLand.Items.Count + cboLand.Items.Insert(Anzahl - 1, NeuesLand.ToString) + cboLand.Text = NeuesLand.ToString + Else + MsgBox("Tut mir leid, das Land ist doch schon in der Liste!") + Exit Sub + End If + Else + ' abbruch + Exit Sub + End If + End If + End Sub End Class