mnuStrip cleanup; Row deletion algo re-written; blub its late now

master
Dominic Reich 9 years ago
parent 6574b20ff9
commit c396f63f9d

Binary file not shown.

@ -557,8 +557,10 @@ Partial Public Class GästeDataSet
Me.columnVorname.AllowDBNull = false
Me.columnStraße.AllowDBNull = false
Me.columnPLZ.AllowDBNull = false
Me.columnPLZ.MaxLength = 15
Me.columnOrt.AllowDBNull = false
Me.columnLand.AllowDBNull = false
Me.columnLand.DefaultValue = CType("D",String)
Me.CaseSensitive = false
End Sub

@ -12,16 +12,22 @@
<xs:element name="GästeDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="GästeDataSet" msprop:Generator_UserDSName="GästeDataSet">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Gäste" msdata:CaseSensitive="False" msprop:Generator_TableClassName="GästeDataTable" msprop:Generator_TableVarName="tableGäste" msprop:Generator_RowChangedName="GästeRowChanged" msprop:Generator_TablePropName="Gäste" msprop:Generator_RowDeletingName="GästeRowDeleting" msprop:Generator_RowChangingName="GästeRowChanging" msprop:Generator_RowEvHandlerName="GästeRowChangeEventHandler" msprop:Generator_RowDeletedName="GästeRowDeleted" msprop:Generator_RowClassName="GästeRow" msprop:Generator_UserTableName="Gäste" msprop:Generator_RowEvArgName="GästeRowChangeEvent">
<xs:element name="Gäste" msdata:CaseSensitive="False" msprop:Generator_TableClassName="GästeDataTable" msprop:Generator_TableVarName="tableGäste" msprop:Generator_TablePropName="Gäste" msprop:Generator_RowDeletingName="GästeRowDeleting" msprop:Generator_RowChangingName="GästeRowChanging" msprop:Generator_RowEvHandlerName="GästeRowChangeEventHandler" msprop:Generator_RowDeletedName="GästeRowDeleted" msprop:Generator_UserTableName="Gäste" msprop:Generator_RowChangedName="GästeRowChanged" msprop:Generator_RowEvArgName="GästeRowChangeEvent" msprop:Generator_RowClassName="GästeRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="1" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:int" />
<xs:element name="Nachname" msprop:Generator_ColumnVarNameInTable="columnNachname" msprop:Generator_ColumnPropNameInRow="Nachname" msprop:Generator_ColumnPropNameInTable="NachnameColumn" msprop:Generator_UserColumnName="Nachname" type="xs:string" />
<xs:element name="Vorname" msprop:Generator_ColumnVarNameInTable="columnVorname" msprop:Generator_ColumnPropNameInRow="Vorname" msprop:Generator_ColumnPropNameInTable="VornameColumn" msprop:Generator_UserColumnName="Vorname" type="xs:string" />
<xs:element name="Straße" msprop:Generator_ColumnVarNameInTable="columnStraße" msprop:Generator_ColumnPropNameInRow="Straße" msprop:Generator_ColumnPropNameInTable="StraßeColumn" msprop:Generator_UserColumnName="Straße" type="xs:string" />
<xs:element name="PLZ" msprop:Generator_ColumnVarNameInTable="columnPLZ" msprop:Generator_ColumnPropNameInRow="PLZ" msprop:Generator_ColumnPropNameInTable="PLZColumn" msprop:Generator_UserColumnName="PLZ" type="xs:string" />
<xs:element name="PLZ" msprop:Generator_ColumnVarNameInTable="columnPLZ" msprop:Generator_ColumnPropNameInRow="PLZ" msprop:Generator_ColumnPropNameInTable="PLZColumn" msprop:Generator_UserColumnName="PLZ">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Ort" msprop:Generator_ColumnVarNameInTable="columnOrt" msprop:Generator_ColumnPropNameInRow="Ort" msprop:Generator_ColumnPropNameInTable="OrtColumn" msprop:Generator_UserColumnName="Ort" type="xs:string" />
<xs:element name="Land" msprop:Generator_ColumnVarNameInTable="columnLand" msprop:Generator_ColumnPropNameInRow="Land" msprop:Generator_ColumnPropNameInTable="LandColumn" msprop:Generator_UserColumnName="Land" type="xs:string" />
<xs:element name="Land" msprop:Generator_ColumnVarNameInTable="columnLand" msprop:Generator_ColumnPropNameInRow="Land" msprop:Generator_ColumnPropNameInTable="LandColumn" msprop:Generator_UserColumnName="Land" type="xs:string" default="D" />
<xs:element name="Telefon" msprop:Generator_ColumnVarNameInTable="columnTelefon" msprop:Generator_ColumnPropNameInRow="Telefon" msprop:Generator_ColumnPropNameInTable="TelefonColumn" msprop:Generator_UserColumnName="Telefon" type="xs:string" minOccurs="0" />
<xs:element name="Email" msprop:Generator_ColumnVarNameInTable="columnEmail" msprop:Generator_ColumnPropNameInRow="Email" msprop:Generator_ColumnPropNameInTable="EmailColumn" msprop:Generator_UserColumnName="Email" type="xs:string" minOccurs="0" />
<xs:element name="Anmerkung" msprop:Generator_ColumnVarNameInTable="columnAnmerkung" msprop:Generator_ColumnPropNameInRow="Anmerkung" msprop:Generator_ColumnPropNameInTable="AnmerkungColumn" msprop:Generator_UserColumnName="Anmerkung" type="xs:string" minOccurs="0" />

@ -6,7 +6,7 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="92" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:Gäste" ZOrder="1" X="166" Y="160" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="24" SplitterPosition="253" />
<Shape ID="DesignTable:Gäste" ZOrder="1" X="143" Y="167" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="24" SplitterPosition="253" />
</Shapes>
<Connectors />
</DiagramLayout>

@ -32,7 +32,7 @@
<PublisherName>Dominic Reich</PublisherName>
<MinimumRequiredVersion>1.0.0.0</MinimumRequiredVersion>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>7</ApplicationRevision>
<ApplicationRevision>8</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

@ -25,17 +25,6 @@ Partial Class frmMain
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
Me.DataGridView1 = New System.Windows.Forms.DataGridView()
Me.mnuMain = New System.Windows.Forms.MenuStrip()
Me.HilfeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.InfoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.OnlineHilfeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripSeparator()
Me.HilfePerEmailAnfordernToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FehlerMeldenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.mnuContext = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.EintragLöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.UpdateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripSeparator()
Me.IDDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.NachnameDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.VornameDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
@ -48,98 +37,42 @@ Partial Class frmMain
Me.StammgastDataGridViewCheckBoxColumn = New System.Windows.Forms.DataGridViewCheckBoxColumn()
Me.BlockiertDataGridViewCheckBoxColumn = New System.Windows.Forms.DataGridViewCheckBoxColumn()
Me.AnmerkungDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.mnuContext = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.EintragLöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.GästeBindingSource = New System.Windows.Forms.BindingSource(Me.components)
Me.GästeDataSet = New Gästeliste.GästeDataSet()
Me.mnuMain = New System.Windows.Forms.MenuStrip()
Me.HilfeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.InfoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.OnlineHilfeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripSeparator()
Me.UpdateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.mnuMain.SuspendLayout()
Me.mnuContext.SuspendLayout()
CType(Me.GästeBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GästeDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
Me.mnuMain.SuspendLayout()
Me.SuspendLayout()
'
'DataGridView1
'
Me.DataGridView1.AllowUserToAddRows = False
Me.DataGridView1.AllowUserToDeleteRows = False
Me.DataGridView1.AllowUserToResizeRows = False
Me.DataGridView1.AutoGenerateColumns = False
Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.IDDataGridViewTextBoxColumn, Me.NachnameDataGridViewTextBoxColumn, Me.VornameDataGridViewTextBoxColumn, Me.StraßeDataGridViewTextBoxColumn, Me.PLZDataGridViewTextBoxColumn, Me.OrtDataGridViewTextBoxColumn, Me.LandDataGridViewTextBoxColumn, Me.TelefonDataGridViewTextBoxColumn, Me.EmailDataGridViewTextBoxColumn, Me.StammgastDataGridViewCheckBoxColumn, Me.BlockiertDataGridViewCheckBoxColumn, Me.AnmerkungDataGridViewTextBoxColumn})
Me.DataGridView1.ContextMenuStrip = Me.mnuContext
Me.DataGridView1.DataSource = Me.GästeBindingSource
Me.DataGridView1.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGridView1.Location = New System.Drawing.Point(0, 24)
Me.DataGridView1.Name = "DataGridView1"
Me.DataGridView1.RowHeadersVisible = False
Me.DataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect
Me.DataGridView1.Size = New System.Drawing.Size(818, 483)
Me.DataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.DataGridView1.Size = New System.Drawing.Size(867, 483)
Me.DataGridView1.TabIndex = 4
'
'mnuMain
'
Me.mnuMain.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.HilfeToolStripMenuItem})
Me.mnuMain.Location = New System.Drawing.Point(0, 0)
Me.mnuMain.Name = "mnuMain"
Me.mnuMain.Size = New System.Drawing.Size(818, 24)
Me.mnuMain.TabIndex = 5
Me.mnuMain.Text = "MenuStrip1"
'
'HilfeToolStripMenuItem
'
Me.HilfeToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.InfoToolStripMenuItem, Me.OnlineHilfeToolStripMenuItem, Me.ToolStripMenuItem1, Me.UpdateToolStripMenuItem, Me.ToolStripMenuItem2, Me.HilfePerEmailAnfordernToolStripMenuItem, Me.FehlerMeldenToolStripMenuItem})
Me.HilfeToolStripMenuItem.Name = "HilfeToolStripMenuItem"
Me.HilfeToolStripMenuItem.Size = New System.Drawing.Size(44, 20)
Me.HilfeToolStripMenuItem.Text = "Hilfe"
'
'InfoToolStripMenuItem
'
Me.InfoToolStripMenuItem.Name = "InfoToolStripMenuItem"
Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(206, 22)
Me.InfoToolStripMenuItem.Text = "Info"
'
'OnlineHilfeToolStripMenuItem
'
Me.OnlineHilfeToolStripMenuItem.Name = "OnlineHilfeToolStripMenuItem"
Me.OnlineHilfeToolStripMenuItem.Size = New System.Drawing.Size(206, 22)
Me.OnlineHilfeToolStripMenuItem.Text = "Online-Hilfe"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(203, 6)
'
'HilfePerEmailAnfordernToolStripMenuItem
'
Me.HilfePerEmailAnfordernToolStripMenuItem.Name = "HilfePerEmailAnfordernToolStripMenuItem"
Me.HilfePerEmailAnfordernToolStripMenuItem.Size = New System.Drawing.Size(206, 22)
Me.HilfePerEmailAnfordernToolStripMenuItem.Text = "Hilfe per Email anfordern"
'
'FehlerMeldenToolStripMenuItem
'
Me.FehlerMeldenToolStripMenuItem.Name = "FehlerMeldenToolStripMenuItem"
Me.FehlerMeldenToolStripMenuItem.Size = New System.Drawing.Size(206, 22)
Me.FehlerMeldenToolStripMenuItem.Text = "Fehler melden"
'
'mnuContext
'
Me.mnuContext.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EintragLöschenToolStripMenuItem})
Me.mnuContext.Name = "mnuContext"
Me.mnuContext.Size = New System.Drawing.Size(156, 26)
'
'EintragLöschenToolStripMenuItem
'
Me.EintragLöschenToolStripMenuItem.Name = "EintragLöschenToolStripMenuItem"
Me.EintragLöschenToolStripMenuItem.Size = New System.Drawing.Size(155, 22)
Me.EintragLöschenToolStripMenuItem.Text = "Eintrag löschen"
'
'UpdateToolStripMenuItem
'
Me.UpdateToolStripMenuItem.Name = "UpdateToolStripMenuItem"
Me.UpdateToolStripMenuItem.Size = New System.Drawing.Size(206, 22)
Me.UpdateToolStripMenuItem.Text = "Update nachholen"
'
'ToolStripMenuItem2
'
Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2"
Me.ToolStripMenuItem2.Size = New System.Drawing.Size(203, 6)
'
'IDDataGridViewTextBoxColumn
'
Me.IDDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells
@ -234,7 +167,19 @@ Partial Class frmMain
Me.AnmerkungDataGridViewTextBoxColumn.DataPropertyName = "Anmerkung"
Me.AnmerkungDataGridViewTextBoxColumn.HeaderText = "Anmerkung"
Me.AnmerkungDataGridViewTextBoxColumn.Name = "AnmerkungDataGridViewTextBoxColumn"
Me.AnmerkungDataGridViewTextBoxColumn.Width = 200
Me.AnmerkungDataGridViewTextBoxColumn.Width = 86
'
'mnuContext
'
Me.mnuContext.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EintragLöschenToolStripMenuItem})
Me.mnuContext.Name = "mnuContext"
Me.mnuContext.Size = New System.Drawing.Size(156, 26)
'
'EintragLöschenToolStripMenuItem
'
Me.EintragLöschenToolStripMenuItem.Name = "EintragLöschenToolStripMenuItem"
Me.EintragLöschenToolStripMenuItem.Size = New System.Drawing.Size(155, 22)
Me.EintragLöschenToolStripMenuItem.Text = "Eintrag löschen"
'
'GästeBindingSource
'
@ -246,11 +191,50 @@ Partial Class frmMain
Me.GästeDataSet.DataSetName = "GästeDataSet"
Me.GästeDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
'
'mnuMain
'
Me.mnuMain.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.HilfeToolStripMenuItem})
Me.mnuMain.Location = New System.Drawing.Point(0, 0)
Me.mnuMain.Name = "mnuMain"
Me.mnuMain.Size = New System.Drawing.Size(867, 24)
Me.mnuMain.TabIndex = 5
Me.mnuMain.Text = "MenuStrip1"
'
'HilfeToolStripMenuItem
'
Me.HilfeToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.InfoToolStripMenuItem, Me.OnlineHilfeToolStripMenuItem, Me.ToolStripMenuItem1, Me.UpdateToolStripMenuItem})
Me.HilfeToolStripMenuItem.Name = "HilfeToolStripMenuItem"
Me.HilfeToolStripMenuItem.Size = New System.Drawing.Size(44, 20)
Me.HilfeToolStripMenuItem.Text = "Hilfe"
'
'InfoToolStripMenuItem
'
Me.InfoToolStripMenuItem.Name = "InfoToolStripMenuItem"
Me.InfoToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.InfoToolStripMenuItem.Text = "Info"
'
'OnlineHilfeToolStripMenuItem
'
Me.OnlineHilfeToolStripMenuItem.Name = "OnlineHilfeToolStripMenuItem"
Me.OnlineHilfeToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.OnlineHilfeToolStripMenuItem.Text = "Online-Hilfe"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(149, 6)
'
'UpdateToolStripMenuItem
'
Me.UpdateToolStripMenuItem.Name = "UpdateToolStripMenuItem"
Me.UpdateToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.UpdateToolStripMenuItem.Text = "Update"
'
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(818, 507)
Me.ClientSize = New System.Drawing.Size(867, 507)
Me.Controls.Add(Me.DataGridView1)
Me.Controls.Add(Me.mnuMain)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
@ -258,11 +242,11 @@ Partial Class frmMain
Me.Name = "frmMain"
Me.Text = "Gästeliste"
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
Me.mnuMain.ResumeLayout(False)
Me.mnuMain.PerformLayout()
Me.mnuContext.ResumeLayout(False)
CType(Me.GästeBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GästeDataSet, System.ComponentModel.ISupportInitialize).EndInit()
Me.mnuMain.ResumeLayout(False)
Me.mnuMain.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@ -286,12 +270,9 @@ Partial Class frmMain
Friend WithEvents AnmerkungDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
Friend WithEvents HilfeToolStripMenuItem As ToolStripMenuItem
Friend WithEvents InfoToolStripMenuItem As ToolStripMenuItem
Friend WithEvents HilfePerEmailAnfordernToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ToolStripMenuItem1 As ToolStripSeparator
Friend WithEvents FehlerMeldenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents mnuContext As ContextMenuStrip
Friend WithEvents EintragLöschenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents OnlineHilfeToolStripMenuItem As ToolStripMenuItem
Friend WithEvents UpdateToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ToolStripMenuItem2 As ToolStripSeparator
End Class

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mnuContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>407, 17</value>
</metadata>
<metadata name="GästeBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>142, 17</value>
</metadata>
@ -126,9 +129,6 @@
<metadata name="mnuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>303, 17</value>
</metadata>
<metadata name="mnuContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>407, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

@ -4,10 +4,13 @@ Imports System.Deployment.Application
Public Class frmMain
Private _dataPath As String = System.IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.MyDocuments, "Gästeliste.xml")
Private _rowIndex As Integer = 0
'I should not need this for now - we do not work with mouse pointer rows index for selection but we select them with left-click.
' and with ctrl select (left click, multi-select!)
'Private _rowIndex As Integer = 0
Private Sub LoadWindowPosition()
'http://christ-offer.blogspot.co.at/2012/02/vbnet-remember-application-window-size.html
'TODO: Change this to get loaded from registry. I'm not a huge fan of my.settings ;)
Dim ptLocation As System.Drawing.Point = My.Settings.WindowLocation
If (ptLocation.X = -1) And (ptLocation.Y = -1) Then
@ -48,6 +51,7 @@ Public Class frmMain
LoadWindowPosition()
' Setting colors of grids to some fancy ones :)
'TODO: Save some colors in registry.
Me.DataGridView1.RowsDefaultCellStyle.BackColor = Color.Azure
Me.DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige
End Sub
@ -59,32 +63,22 @@ Public Class frmMain
oForm = Nothing
End Sub
Private Sub HilfePerEmailAnfordernToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HilfePerEmailAnfordernToolStripMenuItem.Click
If MsgBox("Dies startet dein Emailprogramm, um mir eine Email zu schreiben", vbOKCancel) = vbOK Then
Process.Start("mailto:Dominic%20Reich%20<dominic@tmsn.at>?subject=[FEWO%20Gästeliste]%20Bitte%20um%20Hilfe&body=Hallo%20Dominic,%0Aich%20brauche%20Hilfe%20bei%20%0A%0A--%20%0AEmail%20über%20das%20Programm%20'Gästeliste'%20erstellt.")
End If
End Sub
Private Sub FehlerMeldenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FehlerMeldenToolStripMenuItem.Click
If MsgBox("Dies öffnet deinen Browser und führt dich zur Github-Issues Seite." + Chr(13) + "Ein Github-Konto ist zwingend erforderlich!", vbOKCancel) = vbOK Then
Process.Start("https://github.com/freefallcid/Gaesteliste/issues")
End If
End Sub
Private Sub DataGridView1_CellMouseUp(sender As Object, e As DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseUp
If e.Button = MouseButtons.Right Then
Me.DataGridView1.Rows(e.RowIndex).Selected = True
Me._rowIndex = e.RowIndex
Me.DataGridView1.CurrentCell = Me.DataGridView1.Rows(e.RowIndex).Cells(1)
Me.mnuContext.Show(Me.DataGridView1, e.Location)
mnuContext.Show(Cursor.Position)
End If
End Sub
'We should not have to use this any more. but for backup we left this here...
'Private Sub DataGridView1_CellMouseUp(sender As Object, e As DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseUp
' If e.Button = MouseButtons.Right Then
' Me.DataGridView1.Rows(e.RowIndex).Selected = True
' Me._rowIndex = e.RowIndex
' Me.DataGridView1.CurrentCell = Me.DataGridView1.Rows(e.RowIndex).Cells(1)
' Me.mnuContext.Show(Me.DataGridView1, e.Location)
' mnuContext.Show(Cursor.Position)
' End If
'End Sub
Private Sub EintragLöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EintragLöschenToolStripMenuItem.Click
If Not Me.DataGridView1.Rows(Me._rowIndex).IsNewRow Then
Me.DataGridView1.Rows.RemoveAt(Me._rowIndex)
End If
'TODO: Einen Button zum Hinzufügen, eine eigene Form zum Hinzufügen bzw bearbeiten.
For Each Row As DataGridViewRow In DataGridView1.SelectedRows
Me.DataGridView1.Rows.RemoveAt(Row.Index)
Next
End Sub
Private Sub OnlineHilfeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OnlineHilfeToolStripMenuItem.Click

Loading…
Cancel
Save