From 8c376ffcfc5f677c4a9f037f95fbbba6c7286e85 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Thu, 6 Apr 2023 21:39:33 -0400 Subject: [PATCH] Fixed to TCG+ Output file - Removed extra space from header - Fixed (undiscovered) error with opening staff list with 0 players loaded - Fixes #32 : Penalty details will now be retained on edit. Also enlarged the font of the penalty details entry. Will now set a suggested penalty at the base (but can still be upgrade or downgraded.) - Fixes #25 : Will now check incoming file for duplicates in non-guest Membership Numbers as Needed. - Added shortcut to listbox for adding a player to the tournament. --- TCG+ Registration Helper/PlayerInfo.vb | 2 +- .../Registration - Individual.Designer.vb | 273 +++++++++--------- .../Registration - Individual.resx | 84 ------ .../Registration - Individual.vb | 72 ++++- TCG+ Registration Helper/Staff List.vb | 3 +- TCG+ Registration Helper/StatusDictionary.vb | 12 +- .../Tournament - Penalty Detail.Designer.vb | 1 + .../Tournament - Penalty Detail.vb | 19 +- .../Tournament - Penalty Form.Designer.vb | 10 +- .../Tournament - Penalty Form.vb | 6 +- 10 files changed, 238 insertions(+), 244 deletions(-) diff --git a/TCG+ Registration Helper/PlayerInfo.vb b/TCG+ Registration Helper/PlayerInfo.vb index 81c78d8..c1d7867 100644 --- a/TCG+ Registration Helper/PlayerInfo.vb +++ b/TCG+ Registration Helper/PlayerInfo.vb @@ -8,7 +8,7 @@ Public Property SearchHelper As String Get - Return LastName & ", " & FirstName & ", " & MembershipName + Return (LastName & " " & FirstName & " " & MembershipName).Trim End Get Set(value As String) diff --git a/TCG+ Registration Helper/Registration - Individual.Designer.vb b/TCG+ Registration Helper/Registration - Individual.Designer.vb index 13f313c..eee6582 100644 --- a/TCG+ Registration Helper/Registration - Individual.Designer.vb +++ b/TCG+ Registration Helper/Registration - Individual.Designer.vb @@ -23,12 +23,12 @@ Partial Class frmIndividual Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.btnClear = New System.Windows.Forms.Button() Me.btnAddPlayer = New System.Windows.Forms.Button() @@ -59,6 +59,13 @@ Partial Class frmIndividual Me.ChangePlayerDetails0ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DeletePlayerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.dgvPlayers = New System.Windows.Forms.DataGridView() + Me.dgcListIndex = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.dgcSelect = New System.Windows.Forms.DataGridViewCheckBoxColumn() + Me.dgcIndex = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.dgcTeamId = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.dgcMembershipNo = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.dgcNickname = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.dgcStatus = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.cbSelectAll = New System.Windows.Forms.CheckBox() Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.Panel3 = New System.Windows.Forms.Panel() @@ -86,6 +93,7 @@ Partial Class frmIndividual Me.TournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.PenaltiesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.StaffJudgesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.WaitingListShufflerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.FullNameEntryToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SaveFileDialogCSV = New System.Windows.Forms.SaveFileDialog() @@ -96,6 +104,10 @@ Partial Class frmIndividual Me.OpenFileDialogCSV = New System.Windows.Forms.OpenFileDialog() Me.OpenFileDialogXML = New System.Windows.Forms.OpenFileDialog() Me.cmsTournamentList = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.tsmiPlayerName = New System.Windows.Forms.ToolStripMenuItem() + Me.AddPlayerToTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.DropPlayerFromTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator() Me.ChangeMembershipNumberToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ChangeTeamIDToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DeletePlayerFromTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -111,18 +123,7 @@ Partial Class frmIndividual Me.AdvanceElectedToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ParticipatingInTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DroppedToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.dgcListIndex = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.dgcSelect = New System.Windows.Forms.DataGridViewCheckBoxColumn() - Me.dgcIndex = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.dgcTeamId = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.dgcMembershipNo = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.dgcNickname = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.dgcStatus = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator() - Me.tsmiPlayerName = New System.Windows.Forms.ToolStripMenuItem() - Me.AddPlayerToTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.WaitingListShufflerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.DropPlayerFromTournamentToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem() Me.GroupBox1.SuspendLayout() Me.Panel1.SuspendLayout() Me.GroupBox2.SuspendLayout() @@ -433,20 +434,21 @@ Partial Class frmIndividual ' 'cmsPlayerList ' - Me.cmsPlayerList.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ChangePlayerDetails0ToolStripMenuItem, Me.DeletePlayerToolStripMenuItem}) + Me.cmsPlayerList.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ChangePlayerDetails0ToolStripMenuItem, Me.ToolStripMenuItem3, Me.DeletePlayerToolStripMenuItem}) Me.cmsPlayerList.Name = "cms" - Me.cmsPlayerList.Size = New System.Drawing.Size(225, 48) + Me.cmsPlayerList.Size = New System.Drawing.Size(280, 92) ' 'ChangePlayerDetails0ToolStripMenuItem ' + Me.ChangePlayerDetails0ToolStripMenuItem.Font = New System.Drawing.Font("Segoe UI", 9.0!) Me.ChangePlayerDetails0ToolStripMenuItem.Name = "ChangePlayerDetails0ToolStripMenuItem" - Me.ChangePlayerDetails0ToolStripMenuItem.Size = New System.Drawing.Size(224, 22) + Me.ChangePlayerDetails0ToolStripMenuItem.Size = New System.Drawing.Size(279, 22) Me.ChangePlayerDetails0ToolStripMenuItem.Text = "Change Player Details: {0}" ' 'DeletePlayerToolStripMenuItem ' Me.DeletePlayerToolStripMenuItem.Name = "DeletePlayerToolStripMenuItem" - Me.DeletePlayerToolStripMenuItem.Size = New System.Drawing.Size(224, 22) + Me.DeletePlayerToolStripMenuItem.Size = New System.Drawing.Size(279, 22) Me.DeletePlayerToolStripMenuItem.Text = "Delete Player From Database" ' 'dgvPlayers @@ -460,14 +462,14 @@ Partial Class frmIndividual Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.dgvPlayers.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill Me.dgvPlayers.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable - DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle7.Font = New System.Drawing.Font("Segoe UI", 9.0!) - DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvPlayers.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7 + DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle1.Font = New System.Drawing.Font("Segoe UI", 9.0!) + DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvPlayers.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.dgvPlayers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing Me.dgvPlayers.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.dgcListIndex, Me.dgcSelect, Me.dgcIndex, Me.dgcTeamId, Me.dgcMembershipNo, Me.dgcNickname, Me.dgcStatus}) Me.dgvPlayers.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnKeystroke @@ -482,6 +484,69 @@ Partial Class frmIndividual Me.dgvPlayers.Size = New System.Drawing.Size(731, 539) Me.dgvPlayers.TabIndex = 3 ' + 'dgcListIndex + ' + Me.dgcListIndex.HeaderText = "lstPlayerID" + Me.dgcListIndex.Name = "dgcListIndex" + Me.dgcListIndex.ReadOnly = True + Me.dgcListIndex.Visible = False + ' + 'dgcSelect + ' + Me.dgcSelect.FalseValue = "0" + Me.dgcSelect.FillWeight = 25.0! + Me.dgcSelect.HeaderText = "" + Me.dgcSelect.Name = "dgcSelect" + Me.dgcSelect.TrueValue = "1" + ' + 'dgcIndex + ' + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter + Me.dgcIndex.DefaultCellStyle = DataGridViewCellStyle2 + Me.dgcIndex.FillWeight = 25.0! + Me.dgcIndex.HeaderText = "#" + Me.dgcIndex.Name = "dgcIndex" + Me.dgcIndex.ReadOnly = True + ' + 'dgcTeamId + ' + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter + Me.dgcTeamId.DefaultCellStyle = DataGridViewCellStyle3 + Me.dgcTeamId.FillWeight = 75.0! + Me.dgcTeamId.HeaderText = "Team ID#" + Me.dgcTeamId.Name = "dgcTeamId" + Me.dgcTeamId.ReadOnly = True + ' + 'dgcMembershipNo + ' + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter + DataGridViewCellStyle4.Font = New System.Drawing.Font("Courier New", 9.75!) + Me.dgcMembershipNo.DefaultCellStyle = DataGridViewCellStyle4 + Me.dgcMembershipNo.FillWeight = 80.0! + Me.dgcMembershipNo.HeaderText = "Membership Number" + Me.dgcMembershipNo.Name = "dgcMembershipNo" + Me.dgcMembershipNo.ReadOnly = True + ' + 'dgcNickname + ' + DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgcNickname.DefaultCellStyle = DataGridViewCellStyle5 + Me.dgcNickname.FillWeight = 140.0! + Me.dgcNickname.HeaderText = "Nickname (Player Name)" + Me.dgcNickname.Name = "dgcNickname" + Me.dgcNickname.ReadOnly = True + ' + 'dgcStatus + ' + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgcStatus.DefaultCellStyle = DataGridViewCellStyle6 + Me.dgcStatus.FillWeight = 120.0! + Me.dgcStatus.HeaderText = "Status" + Me.dgcStatus.Name = "dgcStatus" + Me.dgcStatus.ReadOnly = True + Me.dgcStatus.Resizable = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgcStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable + ' 'cbSelectAll ' Me.cbSelectAll.AutoSize = True @@ -611,7 +676,7 @@ Partial Class frmIndividual ' Me.CloseTournamentToolStripMenuItem.MergeAction = System.Windows.Forms.MergeAction.Replace Me.CloseTournamentToolStripMenuItem.Name = "CloseTournamentToolStripMenuItem" - Me.CloseTournamentToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.CloseTournamentToolStripMenuItem.Size = New System.Drawing.Size(170, 22) Me.CloseTournamentToolStripMenuItem.Text = "&Close Tournament" ' 'ToolStripSeparator3 @@ -619,14 +684,14 @@ Partial Class frmIndividual Me.ToolStripSeparator3.MergeAction = System.Windows.Forms.MergeAction.MatchOnly Me.ToolStripSeparator3.MergeIndex = 1 Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator3.Size = New System.Drawing.Size(167, 6) ' 'SaveTournamentToolStripMenuItem ' Me.SaveTournamentToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CommaSeparatedValuesFilecsvToolStripMenuItem, Me.TournamentXMLxmlToolStripMenuItem}) Me.SaveTournamentToolStripMenuItem.MergeAction = System.Windows.Forms.MergeAction.Replace Me.SaveTournamentToolStripMenuItem.Name = "SaveTournamentToolStripMenuItem" - Me.SaveTournamentToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.SaveTournamentToolStripMenuItem.Size = New System.Drawing.Size(170, 22) Me.SaveTournamentToolStripMenuItem.Text = "&Save Tournament" ' 'CommaSeparatedValuesFilecsvToolStripMenuItem @@ -646,7 +711,7 @@ Partial Class frmIndividual Me.ToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CommaSeparatedValuesFilecsvToolStripMenuItem1, Me.TournamentXMLxmlToolStripMenuItem1}) Me.ToolStripMenuItem1.MergeAction = System.Windows.Forms.MergeAction.Replace Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" - Me.ToolStripMenuItem1.Size = New System.Drawing.Size(180, 22) + Me.ToolStripMenuItem1.Size = New System.Drawing.Size(170, 22) Me.ToolStripMenuItem1.Text = "S&ave Copy As..." ' 'CommaSeparatedValuesFilecsvToolStripMenuItem1 @@ -666,7 +731,7 @@ Partial Class frmIndividual Me.ToolStripSeparator1.MergeAction = System.Windows.Forms.MergeAction.MatchOnly Me.ToolStripSeparator1.MergeIndex = 2 Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(177, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(167, 6) ' 'TournamentToolStripMenuItem ' @@ -688,6 +753,13 @@ Partial Class frmIndividual Me.StaffJudgesToolStripMenuItem.Size = New System.Drawing.Size(200, 22) Me.StaffJudgesToolStripMenuItem.Text = "&Staff/Judges" ' + 'WaitingListShufflerToolStripMenuItem + ' + Me.WaitingListShufflerToolStripMenuItem.Name = "WaitingListShufflerToolStripMenuItem" + Me.WaitingListShufflerToolStripMenuItem.Size = New System.Drawing.Size(200, 22) + Me.WaitingListShufflerToolStripMenuItem.Text = "&Build Tournament Pools" + Me.WaitingListShufflerToolStripMenuItem.Visible = False + ' 'ToolStripSeparator2 ' Me.ToolStripSeparator2.Name = "ToolStripSeparator2" @@ -747,7 +819,34 @@ Partial Class frmIndividual ' Me.cmsTournamentList.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmiPlayerName, Me.AddPlayerToTournamentToolStripMenuItem, Me.DropPlayerFromTournamentToolStripMenuItem, Me.ToolStripSeparator4, Me.ChangeMembershipNumberToolStripMenuItem, Me.ChangeTeamIDToolStripMenuItem, Me.DeletePlayerFromTournamentToolStripMenuItem, Me.ChangePlayerStatusToToolStripMenuItem}) Me.cmsTournamentList.Name = "cmsTournamentList" - Me.cmsTournamentList.Size = New System.Drawing.Size(272, 186) + Me.cmsTournamentList.Size = New System.Drawing.Size(272, 164) + ' + 'tsmiPlayerName + ' + Me.tsmiPlayerName.Enabled = False + Me.tsmiPlayerName.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Bold) + Me.tsmiPlayerName.Name = "tsmiPlayerName" + Me.tsmiPlayerName.Size = New System.Drawing.Size(271, 22) + Me.tsmiPlayerName.Text = "{0}" + ' + 'AddPlayerToTournamentToolStripMenuItem + ' + Me.AddPlayerToTournamentToolStripMenuItem.Image = Global.retched.TCGRegManager.My.Resources.Resources.green_check_mark + Me.AddPlayerToTournamentToolStripMenuItem.Name = "AddPlayerToTournamentToolStripMenuItem" + Me.AddPlayerToTournamentToolStripMenuItem.Size = New System.Drawing.Size(271, 22) + Me.AddPlayerToTournamentToolStripMenuItem.Text = "&Add Player to Tournament / Check-In" + ' + 'DropPlayerFromTournamentToolStripMenuItem + ' + Me.DropPlayerFromTournamentToolStripMenuItem.Image = Global.retched.TCGRegManager.My.Resources.Resources.red_cross_mark + Me.DropPlayerFromTournamentToolStripMenuItem.Name = "DropPlayerFromTournamentToolStripMenuItem" + Me.DropPlayerFromTournamentToolStripMenuItem.Size = New System.Drawing.Size(271, 22) + Me.DropPlayerFromTournamentToolStripMenuItem.Text = "Drop Player from Tournament" + ' + 'ToolStripSeparator4 + ' + Me.ToolStripSeparator4.Name = "ToolStripSeparator4" + Me.ToolStripSeparator4.Size = New System.Drawing.Size(268, 6) ' 'ChangeMembershipNumberToolStripMenuItem ' @@ -840,102 +939,13 @@ Partial Class frmIndividual Me.DroppedToolStripMenuItem.Size = New System.Drawing.Size(275, 22) Me.DroppedToolStripMenuItem.Text = "&Dropped" ' - 'dgcListIndex - ' - Me.dgcListIndex.HeaderText = "lstPlayerID" - Me.dgcListIndex.Name = "dgcListIndex" - Me.dgcListIndex.ReadOnly = True - Me.dgcListIndex.Visible = False + 'ToolStripMenuItem3 ' - 'dgcSelect - ' - Me.dgcSelect.FalseValue = "0" - Me.dgcSelect.FillWeight = 25.0! - Me.dgcSelect.HeaderText = "" - Me.dgcSelect.Name = "dgcSelect" - Me.dgcSelect.TrueValue = "1" - ' - 'dgcIndex - ' - DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter - Me.dgcIndex.DefaultCellStyle = DataGridViewCellStyle8 - Me.dgcIndex.FillWeight = 25.0! - Me.dgcIndex.HeaderText = "#" - Me.dgcIndex.Name = "dgcIndex" - Me.dgcIndex.ReadOnly = True - ' - 'dgcTeamId - ' - DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter - Me.dgcTeamId.DefaultCellStyle = DataGridViewCellStyle9 - Me.dgcTeamId.FillWeight = 75.0! - Me.dgcTeamId.HeaderText = "Team ID#" - Me.dgcTeamId.Name = "dgcTeamId" - Me.dgcTeamId.ReadOnly = True - ' - 'dgcMembershipNo - ' - DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter - DataGridViewCellStyle10.Font = New System.Drawing.Font("Courier New", 9.75!) - Me.dgcMembershipNo.DefaultCellStyle = DataGridViewCellStyle10 - Me.dgcMembershipNo.FillWeight = 80.0! - Me.dgcMembershipNo.HeaderText = "Membership Number" - Me.dgcMembershipNo.Name = "dgcMembershipNo" - Me.dgcMembershipNo.ReadOnly = True - ' - 'dgcNickname - ' - DataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgcNickname.DefaultCellStyle = DataGridViewCellStyle11 - Me.dgcNickname.FillWeight = 140.0! - Me.dgcNickname.HeaderText = "Nickname (Player Name)" - Me.dgcNickname.Name = "dgcNickname" - Me.dgcNickname.ReadOnly = True - ' - 'dgcStatus - ' - DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgcStatus.DefaultCellStyle = DataGridViewCellStyle12 - Me.dgcStatus.FillWeight = 120.0! - Me.dgcStatus.HeaderText = "Status" - Me.dgcStatus.Name = "dgcStatus" - Me.dgcStatus.ReadOnly = True - Me.dgcStatus.Resizable = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgcStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable - ' - 'ToolStripSeparator4 - ' - Me.ToolStripSeparator4.Name = "ToolStripSeparator4" - Me.ToolStripSeparator4.Size = New System.Drawing.Size(268, 6) - ' - 'tsmiPlayerName - ' - Me.tsmiPlayerName.Enabled = False - Me.tsmiPlayerName.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Bold) - Me.tsmiPlayerName.Name = "tsmiPlayerName" - Me.tsmiPlayerName.Size = New System.Drawing.Size(271, 22) - Me.tsmiPlayerName.Text = "{0}" - ' - 'AddPlayerToTournamentToolStripMenuItem - ' - Me.AddPlayerToTournamentToolStripMenuItem.Image = Global.retched.TCGRegManager.My.Resources.Resources.green_check_mark - Me.AddPlayerToTournamentToolStripMenuItem.Name = "AddPlayerToTournamentToolStripMenuItem" - Me.AddPlayerToTournamentToolStripMenuItem.Size = New System.Drawing.Size(271, 22) - Me.AddPlayerToTournamentToolStripMenuItem.Text = "&Add Player to Tournament / Check-In" - ' - 'WaitingListShufflerToolStripMenuItem - ' - Me.WaitingListShufflerToolStripMenuItem.Name = "WaitingListShufflerToolStripMenuItem" - Me.WaitingListShufflerToolStripMenuItem.Size = New System.Drawing.Size(200, 22) - Me.WaitingListShufflerToolStripMenuItem.Text = "&Build Tournament Pools" - Me.WaitingListShufflerToolStripMenuItem.Visible = False - ' - 'DropPlayerFromTournamentToolStripMenuItem - ' - Me.DropPlayerFromTournamentToolStripMenuItem.Image = Global.retched.TCGRegManager.My.Resources.Resources.red_cross_mark - Me.DropPlayerFromTournamentToolStripMenuItem.Name = "DropPlayerFromTournamentToolStripMenuItem" - Me.DropPlayerFromTournamentToolStripMenuItem.Size = New System.Drawing.Size(271, 22) - Me.DropPlayerFromTournamentToolStripMenuItem.Text = "Drop Player from Tournament" + Me.ToolStripMenuItem3.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Bold) + Me.ToolStripMenuItem3.Image = Global.retched.TCGRegManager.My.Resources.Resources.green_check_mark + Me.ToolStripMenuItem3.Name = "ToolStripMenuItem3" + Me.ToolStripMenuItem3.Size = New System.Drawing.Size(279, 22) + Me.ToolStripMenuItem3.Text = "&Add Player to Tournament / Check-In" ' 'frmIndividual ' @@ -1071,4 +1081,5 @@ Partial Class frmIndividual Friend WithEvents ToolStripSeparator4 As ToolStripSeparator Friend WithEvents WaitingListShufflerToolStripMenuItem As ToolStripMenuItem Friend WithEvents DropPlayerFromTournamentToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ToolStripMenuItem3 As ToolStripMenuItem End Class diff --git a/TCG+ Registration Helper/Registration - Individual.resx b/TCG+ Registration Helper/Registration - Individual.resx index 8fee9f3..073131f 100644 --- a/TCG+ Registration Helper/Registration - Individual.resx +++ b/TCG+ Registration Helper/Registration - Individual.resx @@ -135,54 +135,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -225,30 +177,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -300,18 +228,6 @@ True - - True - - - True - - - True - - - True - 240, 17 diff --git a/TCG+ Registration Helper/Registration - Individual.vb b/TCG+ Registration Helper/Registration - Individual.vb index c21cd4a..2e60738 100644 --- a/TCG+ Registration Helper/Registration - Individual.vb +++ b/TCG+ Registration Helper/Registration - Individual.vb @@ -633,7 +633,7 @@ Public Class frmIndividual txtCSVFileName = FileName Using csvDoc As IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(FileName, False) - csvDoc.WriteLine("""Team ID"",""Team Name"",""Win Point"",""Status"",""Bye Count"",""Membership Number - 1"",""Player Name - 1"",""Seat Order - 1"",""Memo"",""Deck Recipe - 1"", ""SMS Auth""") + csvDoc.WriteLine("""Team ID"",""Team Name"",""Win Point"",""Status"",""Bye Count"",""Membership Number - 1"",""Player Name - 1"",""Seat Order - 1"",""Memo"",""Deck Recipe - 1"",""SMS Auth""") csvDoc.WriteLine("""Required ※Please set the value to 0 for new registrations."",""Optional ※Required for team competitions only"",""Uneditable @@ -698,7 +698,7 @@ No change in value will have any effect."",""Required Dim FileName As String = SaveFileDialogCSV.FileName Using csvDoc As IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(FileName, False) - csvDoc.WriteLine("""Team ID"",""Team Name"",""Win Point"",""Status"",""Bye Count"",""Membership Number - 1"",""Player Name - 1"",""Seat Order - 1"",""Memo"", ""Deck Recipe - 1"", ""SMS Auth""") + csvDoc.WriteLine("""Team ID"",""Team Name"",""Win Point"",""Status"",""Bye Count"",""Membership Number - 1"",""Player Name - 1"",""Seat Order - 1"",""Memo"", ""Deck Recipe - 1"",""SMS Auth""") csvDoc.WriteLine("""Required ※Please set the value to 0 for new registrations."",""Optional ※Required for team competitions only"",""Uneditable @@ -803,7 +803,8 @@ No change in value will have any effect."",""Required""") New XElement("PlayerFirstName", team.PlayerA.FirstName), New XElement("PlayerLastName", team.PlayerA.LastName), New XElement("SeatOrder", "A"), - New XElement("DeckRecipe", team.PlayerA.DeckRecipe))))) + New XElement("DeckRecipe", team.PlayerA.DeckRecipe), + New XElement("SMSAuth", team.SMSAuth))))) Next 'tournament.Add(playerNode) @@ -891,7 +892,8 @@ No change in value will have any effect."",""Required""") New XElement("PlayerFirstName", team.PlayerA.FirstName), New XElement("PlayerLastName", team.PlayerA.LastName), New XElement("SeatOrder", "A"), - New XElement("DeckRecipe", team.PlayerA.DeckRecipe))))) + New XElement("DeckRecipe", team.PlayerA.DeckRecipe), + New XElement("SMSAuth", team.SMSAuth))))) Next 'tournament.Add(playerNode) @@ -1063,13 +1065,22 @@ No change in value will have any effect."",""Required""") ' status of that player with the incoming file. For Each player In lstFileData - Dim index As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID)) + Dim index As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) + + Dim altIndex As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) + + Dim teamIDSearch As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.TeamID = player.TeamID And p.TeamID <> "0")) If index <> -1 Then If lstTournTeams(index).Status < player.Status Then lstTournTeams(index).Status = player.Status lstTournTeams(index).TeamID = player.TeamID End If + + ElseIf altIndex <> -1 And (player.PlayerA.MembershipNumber <> "GUEST99999" Or player.PlayerA.MembershipNumber <> "0000000986") Then + lstTournTeams(altIndex).TeamID = player.TeamID + lstTournTeams(altIndex).Status = player.Status + Else lstTournTeams.Add(player) End If @@ -1093,13 +1104,22 @@ No change in value will have any effect."",""Required""") ' status of that player with the incoming file. For Each player In lstFileData - Dim index As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID)) + Dim index As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) + + Dim altIndex As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = player.PlayerA.MembershipNumber And p.TeamID = player.TeamID And p.PlayerA.MembershipNumber <> "GUEST99999")) + + Dim teamIDSearch As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.TeamID = player.TeamID And p.TeamID <> "0")) If index <> -1 Then If lstTournTeams(index).Status < player.Status Then lstTournTeams(index).Status = player.Status lstTournTeams(index).TeamID = player.TeamID End If + + ElseIf altIndex <> -1 And (player.PlayerA.MembershipNumber <> "GUEST99999" Or player.PlayerA.MembershipNumber <> "0000000986") Then + lstTournTeams(altIndex).TeamID = player.TeamID + lstTournTeams(altIndex).Status = player.Status + Else lstTournTeams.Add(player) End If @@ -1315,4 +1335,44 @@ No change in value will have any effect."",""Required""") ' Rebuild the list after the change. 'BuildTournamentList() End Sub + + Private Sub ToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem3.Click + ' This should add the selected player on to the current tournament roster + + ' See if the player is already on the tournament list. + Dim intListSearch As Integer = lstTournTeams.IndexOf(lstTournTeams.Find(Function(p) p.PlayerA.MembershipNumber = lbSearchResults.SelectedItem.MembershipNumber.ToString)) + + If intListSearch <> -1 Then + Dim rowIndex As Integer = -1 + + lstTournTeams(intListSearch).Status = 10 + + Dim row As DataGridViewRow = dgvPlayers.Rows.Cast(Of DataGridViewRow)().Where(Function(r) r.Cells("dgcMembershipNo").Value.ToString().Equals(lbSearchResults.SelectedItem.MembershipNumber.ToString)).First() + + dgvPlayers.Rows(row.Index).Cells("dgcStatus").Value = _status(10) + Else + + lstTournTeams.Add(New TournamentTeam() With { + .PlayerA = New PlayerInfo() With { + .FirstName = lstPlayers.Find(Function(x) x.MembershipNumber = lbSearchResults.SelectedValue).FirstName, + .LastName = lstPlayers.Find(Function(x) x.MembershipNumber = lbSearchResults.SelectedValue).LastName, + .MembershipName = lstPlayers.Find(Function(x) x.MembershipNumber = lbSearchResults.SelectedValue).MembershipName, + .MembershipNumber = lstPlayers.Find(Function(x) x.MembershipNumber = lbSearchResults.SelectedValue).MembershipNumber, + .SeatOrder = "A"}, + .PlayerB = New PlayerInfo(), + .PlayerC = New PlayerInfo(), + .ByeRounds = 0, + .Status = 10, + .TeamID = 0 + }) + + BuildTournamentList() + + End If + + dgvPlayers.CurrentRow.Cells("dgcStatus").Value = _status(10) + + ' Rebuild the list after the change. + 'BuildTournamentList() + End Sub End Class diff --git a/TCG+ Registration Helper/Staff List.vb b/TCG+ Registration Helper/Staff List.vb index b5c76f1..052d505 100644 --- a/TCG+ Registration Helper/Staff List.vb +++ b/TCG+ Registration Helper/Staff List.vb @@ -96,7 +96,8 @@ cboStaffPosition.SelectedValue = staffInfo.StaffPosition End If Else - cboStaffMember.SelectedIndex = 0 + + If lstPlayers.Count <> 0 Then cboStaffMember.SelectedIndex = 0 End If diff --git a/TCG+ Registration Helper/StatusDictionary.vb b/TCG+ Registration Helper/StatusDictionary.vb index fe5848b..b646c0c 100644 --- a/TCG+ Registration Helper/StatusDictionary.vb +++ b/TCG+ Registration Helper/StatusDictionary.vb @@ -5,10 +5,10 @@ {3, "Waiting list"}, {4, "Unsuccessful"}, {5, "Cancelled"}, - {6, "Selected + Checked In"}, - {7, "Waiting for Cancellation + Checked In"}, - {8, "Absent on Day of Event"}, - {9, "Advance Elected"}, + {6, "Successful + Checked In"}, + {7, "Waiting list + Checked In"}, + {8, "Absent from the event"}, + {9, "Advance Successful"}, {10, "Participating in Tournament"}, {11, "Dropped"} } @@ -22,7 +22,7 @@ {6, "Floor Judge"} } - Public _infraction As Dictionary(Of Integer, String) = New Dictionary(Of Integer, String) From { + Public _infrac As New Dictionary(Of Integer, String) From { {1, "Failing to Observe Game Rules"}, {2, "Forgetting to Resolve Automatic Actions"}, {3, "Looking at Unnecessary Cards"}, @@ -67,7 +67,7 @@ {19, 4}, {20, 4} } - Public _penalty As Dictionary(Of Integer, String) = New Dictionary(Of Integer, String) From { + Public _pen As Dictionary(Of Integer, String) = New Dictionary(Of Integer, String) From { {0, "Caution"}, {1, "Warning"}, {2, "Game Loss"}, diff --git a/TCG+ Registration Helper/Tournament - Penalty Detail.Designer.vb b/TCG+ Registration Helper/Tournament - Penalty Detail.Designer.vb index 8984297..7e319e0 100644 --- a/TCG+ Registration Helper/Tournament - Penalty Detail.Designer.vb +++ b/TCG+ Registration Helper/Tournament - Penalty Detail.Designer.vb @@ -137,6 +137,7 @@ Partial Class frmPenaltyDetail ' 'txtPenaltyNotes ' + Me.txtPenaltyNotes.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtPenaltyNotes.Location = New System.Drawing.Point(113, 248) Me.txtPenaltyNotes.Multiline = True Me.txtPenaltyNotes.Name = "txtPenaltyNotes" diff --git a/TCG+ Registration Helper/Tournament - Penalty Detail.vb b/TCG+ Registration Helper/Tournament - Penalty Detail.vb index ed60d4b..d1878d5 100644 --- a/TCG+ Registration Helper/Tournament - Penalty Detail.vb +++ b/TCG+ Registration Helper/Tournament - Penalty Detail.vb @@ -1,24 +1,29 @@ Public Class frmPenaltyDetail Public Property EditMode As Boolean = False + Public Property Infraction As Integer = 0 + Public Property Penalty As Integer = 0 Private Sub frmPenaltyDetail_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' Assign the Infraction Types to the field - cboInfraction.DataSource = New BindingSource(_infraction, Nothing) + cboInfraction.DataSource = New BindingSource(_infrac, Nothing) cboInfraction.DisplayMember = "Value" cboInfraction.ValueMember = "Key" ' Assign the Penalty Types to the field - cboPenalty.DataSource = New BindingSource(_penalty, Nothing) + cboPenalty.DataSource = New BindingSource(_pen, Nothing) cboPenalty.DisplayMember = "Value" cboPenalty.ValueMember = "Key" + If EditMode Then + cboInfraction.SelectedValue = Infraction + + cboPenalty.SelectedValue = Penalty + End If + End Sub - Private Sub cboInfraction_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cboInfraction.SelectedIndexChanged - If Not EditMode Then - cboPenalty.SelectedValue = _suggested.Item(cboInfraction.SelectedValue.Key) + Private Sub cboInfraction_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cboInfraction.SelectionChangeCommitted + cboPenalty.SelectedValue = _suggested.Item(cboInfraction.SelectedValue) - EditMode = False - End If End Sub End Class \ No newline at end of file diff --git a/TCG+ Registration Helper/Tournament - Penalty Form.Designer.vb b/TCG+ Registration Helper/Tournament - Penalty Form.Designer.vb index 6d7bd95..812bb62 100644 --- a/TCG+ Registration Helper/Tournament - Penalty Form.Designer.vb +++ b/TCG+ Registration Helper/Tournament - Penalty Form.Designer.vb @@ -62,7 +62,7 @@ Partial Class frmPenalties Me.dgvPenalties.Name = "dgvPenalties" Me.dgvPenalties.RowHeadersVisible = False Me.dgvPenalties.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.dgvPenalties.Size = New System.Drawing.Size(792, 311) + Me.dgvPenalties.Size = New System.Drawing.Size(792, 333) Me.dgvPenalties.TabIndex = 0 ' 'dgcPenaltyID @@ -112,7 +112,7 @@ Partial Class frmPenalties 'btnAddPenalty ' Me.btnAddPenalty.Anchor = System.Windows.Forms.AnchorStyles.Bottom - Me.btnAddPenalty.Location = New System.Drawing.Point(181, 327) + Me.btnAddPenalty.Location = New System.Drawing.Point(181, 351) Me.btnAddPenalty.Name = "btnAddPenalty" Me.btnAddPenalty.Size = New System.Drawing.Size(109, 25) Me.btnAddPenalty.TabIndex = 1 @@ -123,7 +123,7 @@ Partial Class frmPenalties ' Me.btnEditPenalty.Anchor = System.Windows.Forms.AnchorStyles.Bottom Me.btnEditPenalty.Enabled = False - Me.btnEditPenalty.Location = New System.Drawing.Point(295, 327) + Me.btnEditPenalty.Location = New System.Drawing.Point(295, 351) Me.btnEditPenalty.Name = "btnEditPenalty" Me.btnEditPenalty.Size = New System.Drawing.Size(109, 25) Me.btnEditPenalty.TabIndex = 2 @@ -134,7 +134,7 @@ Partial Class frmPenalties ' Me.btnDeletePenalty.Anchor = System.Windows.Forms.AnchorStyles.Bottom Me.btnDeletePenalty.Enabled = False - Me.btnDeletePenalty.Location = New System.Drawing.Point(409, 327) + Me.btnDeletePenalty.Location = New System.Drawing.Point(409, 351) Me.btnDeletePenalty.Name = "btnDeletePenalty" Me.btnDeletePenalty.Size = New System.Drawing.Size(109, 25) Me.btnDeletePenalty.TabIndex = 3 @@ -145,7 +145,7 @@ Partial Class frmPenalties ' Me.btnClose.Anchor = System.Windows.Forms.AnchorStyles.Bottom Me.btnClose.DialogResult = System.Windows.Forms.DialogResult.OK - Me.btnClose.Location = New System.Drawing.Point(523, 327) + Me.btnClose.Location = New System.Drawing.Point(523, 351) Me.btnClose.Name = "btnClose" Me.btnClose.Size = New System.Drawing.Size(109, 25) Me.btnClose.TabIndex = 4 diff --git a/TCG+ Registration Helper/Tournament - Penalty Form.vb b/TCG+ Registration Helper/Tournament - Penalty Form.vb index 1d013f0..5ca4ce0 100644 --- a/TCG+ Registration Helper/Tournament - Penalty Form.vb +++ b/TCG+ Registration Helper/Tournament - Penalty Form.vb @@ -62,7 +62,7 @@ Dim playerInfo As PlayerInfo = lstTournPlayers.Find(Function(x) x.MembershipNumber = penalty.PlayerNumber) Dim staffInfo As TournamentStaff = lstStaff.Find(Function(x) x.MembershipNumber = penalty.JudgeNumber) ' For every penalty add in a new row. - dgvPenalties.Rows.Add(lstPenalties.IndexOf(penalty), playerInfo.SummaryName, _infraction.Item(penalty.InfractionType), _penalty.Item(penalty.PenaltyType), penalty.RoundNumber, staffInfo.SummaryName, penalty.Notes) + dgvPenalties.Rows.Add(lstPenalties.IndexOf(penalty), playerInfo.SummaryName, _infrac.Item(penalty.InfractionType), _pen.Item(penalty.PenaltyType), penalty.RoundNumber, staffInfo.SummaryName, penalty.Notes) Next dgvPenalties.ClearSelection() @@ -91,8 +91,8 @@ frmEditPenalty.nudRound.Value = selectedPenalty.RoundNumber - frmEditPenalty.cboInfraction.SelectedValue = selectedPenalty.InfractionType - frmEditPenalty.cboPenalty.SelectedValue = selectedPenalty.PenaltyType + frmEditPenalty.Infraction = selectedPenalty.InfractionType + frmEditPenalty.Penalty = selectedPenalty.PenaltyType frmEditPenalty.txtPenaltyNotes.Text = selectedPenalty.Notes