From 632b432b7c7f31bd9ee825c082fd1c6217cea81c Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Mon, 23 May 2022 22:20:54 -0600 Subject: [PATCH] Revert to old column indexing --- Source/LibationWinForms/Form1.PictureStorage.cs | 1 + Source/LibationWinForms/GridView/ProductsGrid.cs | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/LibationWinForms/Form1.PictureStorage.cs b/Source/LibationWinForms/Form1.PictureStorage.cs index 2a6efd09..c400eaf6 100644 --- a/Source/LibationWinForms/Form1.PictureStorage.cs +++ b/Source/LibationWinForms/Form1.PictureStorage.cs @@ -12,6 +12,7 @@ namespace LibationWinForms PictureStorage.SetDefaultImage(PictureSize._80x80, Properties.Resources.default_cover_80x80.ToBytes(format)); PictureStorage.SetDefaultImage(PictureSize._300x300, Properties.Resources.default_cover_300x300.ToBytes(format)); PictureStorage.SetDefaultImage(PictureSize._500x500, Properties.Resources.default_cover_500x500.ToBytes(format)); + PictureStorage.SetDefaultImage(PictureSize.Native, Properties.Resources.default_cover_500x500.ToBytes(format)); } } } diff --git a/Source/LibationWinForms/GridView/ProductsGrid.cs b/Source/LibationWinForms/GridView/ProductsGrid.cs index 5bf2a910..e9a3bdb1 100644 --- a/Source/LibationWinForms/GridView/ProductsGrid.cs +++ b/Source/LibationWinForms/GridView/ProductsGrid.cs @@ -54,16 +54,16 @@ namespace LibationWinForms.GridView var entry = getGridEntry(e.RowIndex); if (entry is LibraryBookEntry lbEntry) { - if (gridEntryDataGridView.Columns[e.ColumnIndex].DataPropertyName == liberateGVColumn.DataPropertyName) + if (e.ColumnIndex == liberateGVColumn.Index) LiberateClicked?.Invoke(lbEntry); - else if (gridEntryDataGridView.Columns[e.ColumnIndex].DataPropertyName == tagAndDetailsGVColumn.DataPropertyName && entry is LibraryBookEntry) + else if (e.ColumnIndex == tagAndDetailsGVColumn.Index && entry is LibraryBookEntry) DetailsClicked?.Invoke(lbEntry); - else if (gridEntryDataGridView.Columns[e.ColumnIndex].DataPropertyName == descriptionGVColumn.DataPropertyName) + else if (e.ColumnIndex == descriptionGVColumn.Index) DescriptionClicked?.Invoke(lbEntry, gridEntryDataGridView.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, false)); - else if (gridEntryDataGridView.Columns[e.ColumnIndex].DataPropertyName == coverGVColumn.DataPropertyName) + else if (e.ColumnIndex == coverGVColumn.Index) CoverClicked?.Invoke(lbEntry); } - else if (entry is SeriesEntry sEntry && gridEntryDataGridView.Columns[e.ColumnIndex].DataPropertyName == liberateGVColumn.DataPropertyName) + else if (entry is SeriesEntry sEntry && e.ColumnIndex == liberateGVColumn.Index) { if (sEntry.Liberate.Expanded) bindingList.CollapseItem(sEntry); @@ -80,7 +80,6 @@ namespace LibationWinForms.GridView #endregion - #region UI display functions internal void BindToGrid(List dbBooks)