From c396f63f9d779eeb60ff04435dea92affc7820a9 Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Mon, 14 Mar 2016 00:35:07 +0100 Subject: [PATCH] mnuStrip cleanup; Row deletion algo re-written; blub its late now --- .vs/Gästeliste/v14/.suo | Bin 61440 -> 62464 bytes Gästeliste/GästeDataSet.Designer.vb | 2 + Gästeliste/GästeDataSet.xsd | 12 +- Gästeliste/GästeDataSet.xss | 2 +- Gästeliste/Gästeliste.vbproj | 2 +- Gästeliste/frmMain.Designer.vb | 159 ++++++++++++-------------- Gästeliste/frmMain.resx | 6 +- Gästeliste/frmMain.vb | 44 +++---- 8 files changed, 105 insertions(+), 122 deletions(-) diff --git a/.vs/Gästeliste/v14/.suo b/.vs/Gästeliste/v14/.suo index 6cb93cc4e676e10f875225ff017bc5779dfc3ab3..64d4330e51eba2a7d2d1b4acd753547eda7bbb0c 100644 GIT binary patch delta 2530 zcmeHIeQZ-z6u_1=FtU%Ihl`%^aOp_+!CLK;&!C4u=~ovx8B# ztbC0LitHT|4a_(n#E2|m+vC%rD}xy{A_GxTh}j5<{DA}wOOQP&;{GKWn%wlFH>ZeuvVJu_J*s9v&QU9eT=v3cb9P3p(8TB~Ci?D@%FFt@4i$boZ z4C-@I>6+F#rJA+O+ghF@aaGCf^QUi$B3l#s9$~B7H76DQX$aQRfchzfQ5`3$n#Fju zStpI^i$|TH+A~zmc&9@sz6mURyn)SP;=?H1jvs*2IfkTqHI)VK!canv$cm0dGiGc> zv>@I@Y(s2EyoGohu>Tc{F}e{+y)aq=~m^wlX|XPbJ%J&YPgzv6-ln>bS|+!n{e< zFvz7TQFoNeR<5h8gSOU`N#bSA^!jz_f-)p#QaPK0p*hE(z zo+!#aFXf=N)2J8&*Qr!EhG@|@{6jAOOr1Q7m&?p@7?T&xg@ItAvUF~{PHI>T)7q7 zOejZ)pr$ibibz5D&ogSuNY^V=?xf)8Se&GP;pE;o!l9~4{FK8`>}43}Fwjv8HXodw z(y-n&)0sbwRbm3p17>h^TXpl#vS)|D)EQ|R?QyM!J&4_--igPxU^`-hjXiDY&ygDZImmLdnyexfq>`+_T=vL)J(_=`!KB*vD6KENhP4E6Z zMuGEMz~(dR9i*OAlPYYP1R1>mMg5uZTW?wd+jd5z2u}11RFF?`QY=8H;#Q^SjoCX# zeKng)w1uncs;Yb>_qA}iW_n&;I8g2rl;$ujmmy`S4Mn znO0!6Qsw=a!gb3<+9&yNf&Zs*iSuxs?9cE2JYxP~kv*BY(-{@isf0Zr@glQY}aVTu5QeN!NOG9z)p h+=9)umwNUemf`e!Xx3Z?uRgpM&}B!yDiQVcR$Dl%|Rw}zO7R8YWRU=pcwb|@7m zGPm*Pon^_4ar5au42*+!aY6huMVMqC1hZuyjLF8A#cZ%NZY1gycV4Lmvn*Noy4~cL z-+AZUbItX=9FLsRw<#en4GlxYsX~4z&%&{=NROUD--<|Fhg=Q^OmXlL-=&sk zyo?^mPH|fzIhmfnSjBsp(jS-e( z(P;Asxu^nJy(FfI*s}Cus8_ce)+~w2*>V=#RZr`8W5ADi3(<-|nX3d1|3U}a2NCZg z4k0=bhY?+f_Yg-A?*q}qL6PQxLSAkGX4G+gErUX|UonMIJ=+`oCsFpGX;DEy7a-j* zuWKhC!tRyr_7Bi4%a_Li#PaKjv2;nv#KS}|{6U^&^9C&ubpC&+uL##?_u^GliXEpg zo@pV^vH46b5tFH8nxwo5MZvU`r8tMiZ=erV!ldK`Q>Z-57RrkmRLHtZd$jC+mXWX+ zV@OUGv#DsJL*CP*uf+?#xpYkNv0zS+2eHQvvNxPceFMi3jUpnfBTZK#q| z;tneMl!D*K45M{~4st+d9T2iB#WpI|QE@*N8+f?0#R;J9?y){^k^5mSi!;EKr^f8KS{{vik!lSW77Rd9QCoFIMvgPU5g*WEGjlI6Ou^QNU?NvC#l<@0>mOS+YLql1K z7H7V_Eh1wHd7z?y3VuH`B1!}XzO2wImjn}Jn<)qH6L>J-10RbfTO(z((A%$~*|kd_ zA!oQ!(bR}998R!Ac>;P?gwGwkG`t$GvdvTSWx>J2kwW2Y7WmF3;{E74J3*yLW2~!# z>I=pwJgqEmFnx0jM>m%L0m z1TR%U)0OljFIUesb1hsoUO3zE;*mdtET9CgTy+qKFkVg?Q;bbZV*Sy=nS^zkX8*Nn@+P{Eb>1qe7?z#`nh%4d^p-r8_|a!qF6# pB4()nZ%908PqpB38}hpak5AOf~ diff --git a/Gästeliste/GästeDataSet.Designer.vb b/Gästeliste/GästeDataSet.Designer.vb index a613b04..2836632 100644 --- a/Gästeliste/GästeDataSet.Designer.vb +++ b/Gästeliste/GästeDataSet.Designer.vb @@ -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 diff --git a/Gästeliste/GästeDataSet.xsd b/Gästeliste/GästeDataSet.xsd index 4ca938d..a339d51 100644 --- a/Gästeliste/GästeDataSet.xsd +++ b/Gästeliste/GästeDataSet.xsd @@ -12,16 +12,22 @@ - + - + + + + + + + - + diff --git a/Gästeliste/GästeDataSet.xss b/Gästeliste/GästeDataSet.xss index 530de8c..2ebf3d7 100644 --- a/Gästeliste/GästeDataSet.xss +++ b/Gästeliste/GästeDataSet.xss @@ -6,7 +6,7 @@ --> - + \ No newline at end of file diff --git a/Gästeliste/Gästeliste.vbproj b/Gästeliste/Gästeliste.vbproj index e518020..61320d7 100644 --- a/Gästeliste/Gästeliste.vbproj +++ b/Gästeliste/Gästeliste.vbproj @@ -32,7 +32,7 @@ Dominic Reich 1.0.0.0 false - 7 + 8 1.0.0.%2a true true diff --git a/Gästeliste/frmMain.Designer.vb b/Gästeliste/frmMain.Designer.vb index 39272eb..ca8379a 100644 --- a/Gästeliste/frmMain.Designer.vb +++ b/Gästeliste/frmMain.Designer.vb @@ -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 diff --git a/Gästeliste/frmMain.resx b/Gästeliste/frmMain.resx index 7d17b6f..180a11f 100644 --- a/Gästeliste/frmMain.resx +++ b/Gästeliste/frmMain.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 407, 17 + 142, 17 @@ -126,9 +129,6 @@ 303, 17 - - 407, 17 - diff --git a/Gästeliste/frmMain.vb b/Gästeliste/frmMain.vb index db3f807..7d74ef4 100644 --- a/Gästeliste/frmMain.vb +++ b/Gästeliste/frmMain.vb @@ -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?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