Change "Download Status" column to "Liberate" button column. Displays text status. No functionality added yet

This commit is contained in:
Robert McRackan 2019-12-05 12:39:38 -05:00
parent 9534969c2d
commit 498aeaac3a
15 changed files with 578 additions and 548 deletions

View File

@ -6,5 +6,5 @@
cause the file to be unrecognizable by the program. cause the file to be unrecognizable by the program.
--> -->
<GenericObjectDataSource DisplayName="GridEntry" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <GenericObjectDataSource DisplayName="GridEntry" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>WinFormsDesigner.GridEntry, LibationWinForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> <TypeInfo>LibationWinForm.GridEntry, LibationWinForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource> </GenericObjectDataSource>

View File

@ -26,6 +26,45 @@ namespace LibationWinForm
[Browsable(false)] [Browsable(false)]
public IEnumerable<string> TagsEnumerated => book.UserDefinedItem.TagsEnumerated; public IEnumerable<string> TagsEnumerated => book.UserDefinedItem.TagsEnumerated;
[Browsable(false)]
public string Download_Status
{
get
{
var print
= FileManager.AudibleFileStorage.Audio.Exists(book.AudibleProductId) ? "Liberated"
: FileManager.AudibleFileStorage.AAX.Exists(book.AudibleProductId) ? "DRM"
: "NOT d/l'ed";
if (!book.Supplements.Any())
return print;
print += "\r\n";
var downloadStatuses = book.Supplements
.Select(d => FileManager.AudibleFileStorage.PDF.Exists(book.AudibleProductId))
// break delayed execution right now!
.ToList();
var count = downloadStatuses.Count;
if (count == 1)
{
print += downloadStatuses[0]
? "PDF d/l'ed"
: "PDF NOT d/l'ed";
}
else
{
var downloadedCount = downloadStatuses.Count(s => s);
print
+= downloadedCount == count ? $"{count} PDFs d/l'ed"
: downloadedCount == 0 ? $"{count} PDFs NOT d/l'ed"
: $"{downloadedCount} of {count} PDFs d/l'ed";
}
return print;
}
}
// displayValues is what gets displayed // displayValues is what gets displayed
// the value that gets returned from the property is the cell's value // the value that gets returned from the property is the cell's value
// this allows for the value to be sorted one way and displayed another // this allows for the value to be sorted one way and displayed another
@ -176,43 +215,5 @@ namespace LibationWinForm
return string.Join("\r\n", details); return string.Join("\r\n", details);
} }
} }
public string Download_Status
{
get
{
var print
= FileManager.AudibleFileStorage.Audio.Exists(book.AudibleProductId) ? "Liberated"
: FileManager.AudibleFileStorage.AAX.Exists(book.AudibleProductId) ? "DRM"
: "NOT d/l'ed";
if (!book.Supplements.Any())
return print;
print += "\r\n";
var downloadStatuses = book.Supplements
.Select(d => FileManager.AudibleFileStorage.PDF.Exists(book.AudibleProductId))
// break delayed execution right now!
.ToList();
var count = downloadStatuses.Count;
if (count == 1)
{
print += downloadStatuses[0]
? "PDF d/l'ed"
: "PDF NOT d/l'ed";
}
else
{
var downloadedCount = downloadStatuses.Count(s => s);
print
+= downloadedCount == count ? $"{count} PDFs d/l'ed"
: downloadedCount == 0 ? $"{count} PDFs NOT d/l'ed"
: $"{downloadedCount} of {count} PDFs d/l'ed";
}
return print;
}
}
} }
} }

View File

@ -1,201 +1,191 @@
namespace LibationWinForm namespace LibationWinForm
{ {
partial class ProductsGrid partial class ProductsGrid
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
{ {
if (disposing && (components != null)) if (disposing && (components != null))
{ {
components.Dispose(); components.Dispose();
} }
base.Dispose(disposing); base.Dispose(disposing);
} }
#region Component Designer generated code #region Component Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.gridEntryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.gridEntryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.gridEntryDataGridView = new System.Windows.Forms.DataGridView(); this.gridEntryDataGridView = new System.Windows.Forms.DataGridView();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).BeginInit(); this.SuspendLayout();
this.SuspendLayout(); //
// // gridEntryBindingSource
// gridEntryBindingSource //
// this.gridEntryBindingSource.DataSource = typeof(LibationWinForm.GridEntry);
this.gridEntryBindingSource.DataSource = typeof(LibationWinForm.GridEntry); //
// // gridEntryDataGridView
// gridEntryDataGridView //
// this.gridEntryDataGridView.AutoGenerateColumns = false;
this.gridEntryDataGridView.AutoGenerateColumns = false; this.gridEntryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridEntryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridEntryDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.gridEntryDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewImageColumn1,
this.dataGridViewImageColumn1, this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2,
this.dataGridViewTextBoxColumn2, this.dataGridViewTextBoxColumn3,
this.dataGridViewTextBoxColumn3, this.dataGridViewTextBoxColumn4,
this.dataGridViewTextBoxColumn4, this.dataGridViewTextBoxColumn5,
this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6,
this.dataGridViewTextBoxColumn6, this.dataGridViewTextBoxColumn7,
this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8,
this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9,
this.dataGridViewTextBoxColumn9, this.dataGridViewTextBoxColumn10,
this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11});
this.dataGridViewTextBoxColumn11, this.gridEntryDataGridView.DataSource = this.gridEntryBindingSource;
this.dataGridViewTextBoxColumn12}); this.gridEntryDataGridView.Location = new System.Drawing.Point(54, 58);
this.gridEntryDataGridView.DataSource = this.gridEntryBindingSource; this.gridEntryDataGridView.Name = "gridEntryDataGridView";
this.gridEntryDataGridView.Location = new System.Drawing.Point(54, 58); this.gridEntryDataGridView.Size = new System.Drawing.Size(300, 220);
this.gridEntryDataGridView.Name = "gridEntryDataGridView"; this.gridEntryDataGridView.TabIndex = 0;
this.gridEntryDataGridView.Size = new System.Drawing.Size(300, 220); //
this.gridEntryDataGridView.TabIndex = 0; // dataGridViewImageColumn1
// //
// dataGridViewImageColumn1 this.dataGridViewImageColumn1.DataPropertyName = "Cover";
// this.dataGridViewImageColumn1.HeaderText = "Cover";
this.dataGridViewImageColumn1.DataPropertyName = "Cover"; this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.HeaderText = "Cover"; this.dataGridViewImageColumn1.ReadOnly = true;
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; //
this.dataGridViewImageColumn1.ReadOnly = true; // dataGridViewTextBoxColumn1
// //
// dataGridViewTextBoxColumn1 this.dataGridViewTextBoxColumn1.DataPropertyName = "Title";
// this.dataGridViewTextBoxColumn1.HeaderText = "Title";
this.dataGridViewTextBoxColumn1.DataPropertyName = "Title"; this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.HeaderText = "Title"; this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; //
this.dataGridViewTextBoxColumn1.ReadOnly = true; // dataGridViewTextBoxColumn2
// //
// dataGridViewTextBoxColumn2 this.dataGridViewTextBoxColumn2.DataPropertyName = "Authors";
// this.dataGridViewTextBoxColumn2.HeaderText = "Authors";
this.dataGridViewTextBoxColumn2.DataPropertyName = "Authors"; this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.HeaderText = "Authors"; this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; //
this.dataGridViewTextBoxColumn2.ReadOnly = true; // dataGridViewTextBoxColumn3
// //
// dataGridViewTextBoxColumn3 this.dataGridViewTextBoxColumn3.DataPropertyName = "Narrators";
// this.dataGridViewTextBoxColumn3.HeaderText = "Narrators";
this.dataGridViewTextBoxColumn3.DataPropertyName = "Narrators"; this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.HeaderText = "Narrators"; this.dataGridViewTextBoxColumn3.ReadOnly = true;
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; //
this.dataGridViewTextBoxColumn3.ReadOnly = true; // dataGridViewTextBoxColumn4
// //
// dataGridViewTextBoxColumn4 this.dataGridViewTextBoxColumn4.DataPropertyName = "Length";
// this.dataGridViewTextBoxColumn4.HeaderText = "Length";
this.dataGridViewTextBoxColumn4.DataPropertyName = "Length"; this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.HeaderText = "Length"; this.dataGridViewTextBoxColumn4.ReadOnly = true;
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; //
this.dataGridViewTextBoxColumn4.ReadOnly = true; // dataGridViewTextBoxColumn5
// //
// dataGridViewTextBoxColumn5 this.dataGridViewTextBoxColumn5.DataPropertyName = "Series";
// this.dataGridViewTextBoxColumn5.HeaderText = "Series";
this.dataGridViewTextBoxColumn5.DataPropertyName = "Series"; this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.HeaderText = "Series"; this.dataGridViewTextBoxColumn5.ReadOnly = true;
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; //
this.dataGridViewTextBoxColumn5.ReadOnly = true; // dataGridViewTextBoxColumn6
// //
// dataGridViewTextBoxColumn6 this.dataGridViewTextBoxColumn6.DataPropertyName = "Description";
// this.dataGridViewTextBoxColumn6.HeaderText = "Description";
this.dataGridViewTextBoxColumn6.DataPropertyName = "Description"; this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
this.dataGridViewTextBoxColumn6.HeaderText = "Description"; this.dataGridViewTextBoxColumn6.ReadOnly = true;
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; //
this.dataGridViewTextBoxColumn6.ReadOnly = true; // dataGridViewTextBoxColumn7
// //
// dataGridViewTextBoxColumn7 this.dataGridViewTextBoxColumn7.DataPropertyName = "Category";
// this.dataGridViewTextBoxColumn7.HeaderText = "Category";
this.dataGridViewTextBoxColumn7.DataPropertyName = "Category"; this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
this.dataGridViewTextBoxColumn7.HeaderText = "Category"; this.dataGridViewTextBoxColumn7.ReadOnly = true;
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; //
this.dataGridViewTextBoxColumn7.ReadOnly = true; // dataGridViewTextBoxColumn8
// //
// dataGridViewTextBoxColumn8 this.dataGridViewTextBoxColumn8.DataPropertyName = "Product_Rating";
// this.dataGridViewTextBoxColumn8.HeaderText = "Product_Rating";
this.dataGridViewTextBoxColumn8.DataPropertyName = "Product_Rating"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
this.dataGridViewTextBoxColumn8.HeaderText = "Product_Rating"; this.dataGridViewTextBoxColumn8.ReadOnly = true;
this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; //
this.dataGridViewTextBoxColumn8.ReadOnly = true; // dataGridViewTextBoxColumn9
// //
// dataGridViewTextBoxColumn9 this.dataGridViewTextBoxColumn9.DataPropertyName = "Purchase_Date";
// this.dataGridViewTextBoxColumn9.HeaderText = "Purchase_Date";
this.dataGridViewTextBoxColumn9.DataPropertyName = "Purchase_Date"; this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
this.dataGridViewTextBoxColumn9.HeaderText = "Purchase_Date"; this.dataGridViewTextBoxColumn9.ReadOnly = true;
this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; //
this.dataGridViewTextBoxColumn9.ReadOnly = true; // dataGridViewTextBoxColumn10
// //
// dataGridViewTextBoxColumn10 this.dataGridViewTextBoxColumn10.DataPropertyName = "My_Rating";
// this.dataGridViewTextBoxColumn10.HeaderText = "My_Rating";
this.dataGridViewTextBoxColumn10.DataPropertyName = "My_Rating"; this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
this.dataGridViewTextBoxColumn10.HeaderText = "My_Rating"; this.dataGridViewTextBoxColumn10.ReadOnly = true;
this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; //
this.dataGridViewTextBoxColumn10.ReadOnly = true; // dataGridViewTextBoxColumn11
// //
// dataGridViewTextBoxColumn11 this.dataGridViewTextBoxColumn11.DataPropertyName = "Misc";
// this.dataGridViewTextBoxColumn11.HeaderText = "Misc";
this.dataGridViewTextBoxColumn11.DataPropertyName = "Misc"; this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
this.dataGridViewTextBoxColumn11.HeaderText = "Misc"; this.dataGridViewTextBoxColumn11.ReadOnly = true;
this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11"; //
this.dataGridViewTextBoxColumn11.ReadOnly = true; // ProductsGrid
// //
// dataGridViewTextBoxColumn12 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
// this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.dataGridViewTextBoxColumn12.DataPropertyName = "Download_Status"; this.Controls.Add(this.gridEntryDataGridView);
this.dataGridViewTextBoxColumn12.HeaderText = "Download_Status"; this.Name = "ProductsGrid";
this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12"; this.Size = new System.Drawing.Size(434, 329);
this.dataGridViewTextBoxColumn12.ReadOnly = true; ((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).EndInit();
// ((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).EndInit();
// ProductsGrid this.ResumeLayout(false);
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.gridEntryDataGridView);
this.Name = "ProductsGrid";
this.Size = new System.Drawing.Size(434, 329);
((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).EndInit();
this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.BindingSource gridEntryBindingSource; private System.Windows.Forms.BindingSource gridEntryBindingSource;
private System.Windows.Forms.DataGridView gridEntryDataGridView; private System.Windows.Forms.DataGridView gridEntryDataGridView;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1; private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12; }
}
} }

View File

@ -28,27 +28,28 @@ namespace LibationWinForm
{ {
public event EventHandler<int> VisibleCountChanged; public event EventHandler<int> VisibleCountChanged;
private DataGridView dataGridView; private const string EDIT_TAGS = "Edit Tags";
private const string LIBERATE = "Liberate";
// alias
private DataGridView dataGridView => gridEntryDataGridView;
private LibationContext context; private LibationContext context;
public ProductsGrid() public ProductsGrid()
{ {
InitializeComponent(); InitializeComponent();
formatDataGridView();
addLiberateButtons();
addEditTagsButtons();
formatColumns();
Disposed += (_, __) => context?.Dispose(); Disposed += (_, __) => context?.Dispose();
manageLiveImageUpdateSubscriptions(); manageLiveImageUpdateSubscriptions();
} }
private bool hasBeenDisplayed = false; private void formatDataGridView()
public void Display()
{ {
if (hasBeenDisplayed)
return;
hasBeenDisplayed = true;
dataGridView = gridEntryDataGridView;
dataGridView.Dock = DockStyle.Fill; dataGridView.Dock = DockStyle.Fill;
dataGridView.AllowUserToAddRows = false; dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false; dataGridView.AllowUserToDeleteRows = false;
@ -57,26 +58,150 @@ namespace LibationWinForm
dataGridView.DefaultCellStyle.WrapMode = DataGridViewTriState.True; dataGridView.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
dataGridView.ReadOnly = true; dataGridView.ReadOnly = true;
dataGridView.RowHeadersVisible = false; dataGridView.RowHeadersVisible = false;
// adjust height for 80x80 pictures. // adjust height for 80x80 pictures.
// this must be done before databinding. or can alter later by iterating through rows // this must be done before databinding. or can alter later by iterating through rows
dataGridView.RowTemplate.Height = 82; dataGridView.RowTemplate.Height = 82;
dataGridView.CellFormatting += replaceFormatted; dataGridView.CellFormatting += replaceFormatted;
dataGridView.CellFormatting += hiddenFormatting; dataGridView.CellFormatting += hiddenFormatting;
// sorting breaks filters. must reapply filters after sorting // sorting breaks filters. must reapply filters after sorting
dataGridView.Sorted += (_, __) => filter(); dataGridView.Sorted += (_, __) => filter();
}
{ // add tag buttons #region format text cells. ie: not buttons
var editUserTagsButton = new DataGridViewButtonColumn { HeaderText = "Edit Tags" }; private void replaceFormatted(object sender, DataGridViewCellFormattingEventArgs e)
dataGridView.Columns.Add(editUserTagsButton); {
var col = ((DataGridView)sender).Columns[e.ColumnIndex];
if (col is DataGridViewTextBoxColumn textCol && GetGridEntry(e.RowIndex).TryDisplayValue(textCol.Name, out string value))
e.Value = value;
}
// add image and handle click private void hiddenFormatting(object _, DataGridViewCellFormattingEventArgs e)
dataGridView.CellPainting += paintEditTag_TextAndImage; {
dataGridView.CellContentClick += dataGridView_GridButtonClick; var isHidden = GetGridEntry(e.RowIndex).TagsEnumerated.Contains("hidden");
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Style
= isHidden
? new DataGridViewCellStyle { ForeColor = Color.LightGray }
: dataGridView.DefaultCellStyle;
}
#endregion
#region liberation buttons
private void addLiberateButtons()
{
dataGridView.Columns.Insert(0, new DataGridViewButtonColumn { HeaderText = LIBERATE });
dataGridView.CellPainting += liberate_Paint;
dataGridView.CellContentClick += liberate_Click;
}
private void liberate_Paint(object sender, DataGridViewCellPaintingEventArgs e)
{
var dgv = (DataGridView)sender;
if (!isColumnValid(dgv, e.RowIndex, e.ColumnIndex, LIBERATE))
return;
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = GetGridEntry(e.RowIndex).Download_Status;
}
private void liberate_Click(object sender, DataGridViewCellEventArgs e)
{
var dgv = (DataGridView)sender;
if (!isColumnValid(dgv, e.RowIndex, e.ColumnIndex, LIBERATE))
return;
}
#endregion
#region tag buttons
private void addEditTagsButtons()
{
dataGridView.Columns.Add(new DataGridViewButtonColumn { HeaderText = EDIT_TAGS });
dataGridView.CellPainting += editTags_Paint;
dataGridView.CellContentClick += editTags_Click;
}
private void editTags_Paint(object sender, DataGridViewCellPaintingEventArgs e)
{
// DataGridView Image for Button Column: https://stackoverflow.com/a/36253883
var dgv = (DataGridView)sender;
if (!isColumnValid(dgv, e.RowIndex, e.ColumnIndex, EDIT_TAGS))
return;
var displayTags = GetGridEntry(e.RowIndex).TagsEnumerated.ToList();
var cell = dgv.Rows[e.RowIndex].Cells[e.ColumnIndex];
if (displayTags.Any())
cell.Value = string.Join("\r\n", displayTags);
else // no tags: use image
{
// clear tag text
cell.Value = "";
var image = Properties.Resources.edit_tags_25x25;
e.Paint(e.CellBounds, DataGridViewPaintParts.All);
var w = image.Width;
var h = image.Height;
var x = e.CellBounds.Left + (e.CellBounds.Width - w) / 2;
var y = e.CellBounds.Top + (e.CellBounds.Height - h) / 2;
e.Graphics.DrawImage(image, new Rectangle(x, y, w, h));
e.Handled = true;
} }
}
private void editTags_Click(object sender, DataGridViewCellEventArgs e)
{
// handle grid button click: https://stackoverflow.com/a/13687844
var dgv = (DataGridView)sender;
if (!isColumnValid(dgv, e.RowIndex, e.ColumnIndex, EDIT_TAGS))
return;
var liveGridEntry = GetGridEntry(e.RowIndex);
// EditTagsDialog should display better-formatted title
liveGridEntry.TryDisplayValue(nameof(liveGridEntry.Title), out string value);
var editTagsForm = new EditTagsDialog(value, liveGridEntry.Tags);
if (editTagsForm.ShowDialog() != DialogResult.OK)
return;
var qtyChanges = context.UpdateTags(liveGridEntry.GetBook(), editTagsForm.NewTags);
if (qtyChanges == 0)
return;
// force a re-draw, and re-apply filters
// needed to update text colors
dgv.InvalidateRow(e.RowIndex);
filter();
}
#endregion
private static bool isColumnValid(DataGridView dgv, int rowIndex, int colIndex, string colName)
{
var col = dgv.Columns[colIndex];
return rowIndex >= 0 && col.HeaderText == colName && col is DataGridViewButtonColumn;
}
private void formatColumns()
{
for (var i = dataGridView.ColumnCount - 1; i >= 0; i--) for (var i = dataGridView.ColumnCount - 1; i >= 0; i--)
{ {
DataGridViewColumn col = dataGridView.Columns[i]; var col = dataGridView.Columns[i];
// initial HeaderText is the lookup name from GridEntry class. any formatting below won't change this // initial HeaderText is the lookup name from GridEntry class. any formatting below won't change this
col.Name = col.HeaderText; col.Name = col.HeaderText;
@ -86,35 +211,59 @@ namespace LibationWinForm
col.HeaderText = col.HeaderText.Replace("_", " "); col.HeaderText = col.HeaderText.Replace("_", " ");
col.Width = col.Name switch col.Width = col.Name switch
{ {
nameof(GridEntry.Cover) => 80, nameof(GridEntry.Cover) => 80,
nameof(GridEntry.Title) => col.Width * 2, nameof(GridEntry.Title) => col.Width * 2,
nameof(GridEntry.Misc) => (int)(col.Width * 1.35), nameof(GridEntry.Misc) => (int)(col.Width * 1.35),
var n when n.In(nameof(GridEntry.My_Rating), nameof(GridEntry.Product_Rating)) => col.Width + 8, var n when n.In(nameof(GridEntry.My_Rating), nameof(GridEntry.Product_Rating)) => col.Width + 8,
_ => col.Width _ => col.Width
}; };
}
}
#region live update newly downloaded and cached images
private void manageLiveImageUpdateSubscriptions()
{
FileManager.PictureStorage.PictureCached += crossThreadImageUpdate;
Disposed += (_, __) => FileManager.PictureStorage.PictureCached -= crossThreadImageUpdate;
}
private void crossThreadImageUpdate(object _, string pictureId)
=> dataGridView.UIThread(() => updateRowImage(pictureId));
private void updateRowImage(string pictureId)
{
var rowId = GetRowId((ge) => ge.GetBook().PictureId == pictureId);
if (rowId > -1)
dataGridView.InvalidateRow(rowId);
}
#endregion
private bool hasBeenDisplayed = false;
public void Display()
{
if (hasBeenDisplayed)
return;
hasBeenDisplayed = true;
//
// transform into sorted GridEntry.s BEFORE binding
//
context = LibationContext.Create();
var lib = context.GetLibrary_Flat_WithTracking();
// if no data. hide all columns. return
if (!lib.Any())
{
for (var i = dataGridView.ColumnCount - 1; i >= 0; i--)
dataGridView.Columns.RemoveAt(i);
return;
} }
var orderedGridEntries = lib
//
// transform into sorted GridEntry.s BEFORE binding
//
context = LibationContext.Create();
var lib = context.GetLibrary_Flat_WithTracking();
// if no data. hide all columns. return
if (!lib.Any())
{
for (var i = dataGridView.ColumnCount - 1; i >= 0; i--)
dataGridView.Columns.RemoveAt(i);
return;
}
var orderedGridEntries = lib
.Select(lb => new GridEntry(lb)).ToList() .Select(lb => new GridEntry(lb)).ToList()
// default load order // default load order
.OrderByDescending(ge => ge.Purchase_Date) .OrderByDescending(ge => ge.Purchase_Date)
//// more advanced example: sort by author, then series, then title //// more advanced example: sort by author, then series, then title
//.OrderBy(ge => ge.Authors) //.OrderBy(ge => ge.Authors)
// .ThenBy(ge => ge.Series) // .ThenBy(ge => ge.Series)
@ -132,90 +281,6 @@ namespace LibationWinForm
filter(); filter();
} }
private void paintEditTag_TextAndImage(object sender, DataGridViewCellPaintingEventArgs e)
{
// DataGridView Image for Button Column: https://stackoverflow.com/a/36253883
if (e.RowIndex < 0 || !(((DataGridView)sender).Columns[e.ColumnIndex] is DataGridViewButtonColumn))
return;
var gridEntry = getGridEntry(e.RowIndex);
var displayTags = gridEntry.TagsEnumerated.ToList();
if (displayTags.Any())
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = string.Join("\r\n", displayTags);
else // no tags: use image
{
// clear tag text
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "";
// images from: icons8.com -- search: tags
var image = Properties.Resources.edit_tags_25x25;
e.Paint(e.CellBounds, DataGridViewPaintParts.All);
var w = image.Width;
var h = image.Height;
var x = e.CellBounds.Left + (e.CellBounds.Width - w) / 2;
var y = e.CellBounds.Top + (e.CellBounds.Height - h) / 2;
e.Graphics.DrawImage(image, new Rectangle(x, y, w, h));
e.Handled = true;
}
}
private void dataGridView_GridButtonClick(object sender, DataGridViewCellEventArgs e)
{
// handle grid button click: https://stackoverflow.com/a/13687844
if (e.RowIndex < 0)
return;
if (sender != dataGridView)
throw new Exception($"{nameof(dataGridView_GridButtonClick)} has incorrect sender ...somehow");
if (!(dataGridView.Columns[e.ColumnIndex] is DataGridViewButtonColumn))
return;
var liveGridEntry = getGridEntry(e.RowIndex);
// EditTagsDialog should display better-formatted title
liveGridEntry.TryDisplayValue(nameof(liveGridEntry.Title), out string value);
var editTagsForm = new EditTagsDialog(value, liveGridEntry.Tags);
if (editTagsForm.ShowDialog() != DialogResult.OK)
return;
var qtyChanges = context.UpdateTags(liveGridEntry.GetBook(), editTagsForm.NewTags);
if (qtyChanges == 0)
return;
// force a re-draw, and re-apply filters
// needed to update text colors
dataGridView.InvalidateRow(e.RowIndex);
filter();
}
#region Cell Formatting
private void replaceFormatted(object sender, DataGridViewCellFormattingEventArgs e)
{
var col = ((DataGridView)sender).Columns[e.ColumnIndex];
if (col is DataGridViewTextBoxColumn textCol && getGridEntry(e.RowIndex).TryDisplayValue(textCol.Name, out string value))
e.Value = value;
}
private void hiddenFormatting(object _, DataGridViewCellFormattingEventArgs e)
{
var isHidden = getGridEntry(e.RowIndex).TagsEnumerated.Contains("hidden");
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Style
= isHidden
? new DataGridViewCellStyle { ForeColor = Color.LightGray }
: dataGridView.DefaultCellStyle;
}
#endregion
#region filter #region filter
string _filterSearchString; string _filterSearchString;
private void filter() => Filter(_filterSearchString); private void filter() => Filter(_filterSearchString);
@ -234,41 +299,17 @@ namespace LibationWinForm
currencyManager.SuspendBinding(); currencyManager.SuspendBinding();
{ {
for (var r = dataGridView.RowCount - 1; r >= 0; r--) for (var r = dataGridView.RowCount - 1; r >= 0; r--)
dataGridView.Rows[r].Visible = productIds.Contains(getGridEntry(r).GetBook().AudibleProductId); dataGridView.Rows[r].Visible = productIds.Contains(GetGridEntry(r).GetBook().AudibleProductId);
} }
currencyManager.ResumeBinding(); currencyManager.ResumeBinding();
VisibleCountChanged?.Invoke(this, dataGridView.AsEnumerable().Count(r => r.Visible)); VisibleCountChanged?.Invoke(this, dataGridView.AsEnumerable().Count(r => r.Visible));
var luceneSearchString_debug = searchResults.SearchString; var luceneSearchString_debug = searchResults.SearchString;
} }
#endregion #endregion
#region live update newly downloaded and cached images private int GetRowId(Func<GridEntry, bool> func) => dataGridView.GetRowIdOfBoundItem(func);
private void manageLiveImageUpdateSubscriptions()
{
FileManager.PictureStorage.PictureCached += crossThreadImageUpdate;
Disposed += (_, __) => FileManager.PictureStorage.PictureCached -= crossThreadImageUpdate;
}
private void crossThreadImageUpdate(object _, string pictureId) private GridEntry GetGridEntry(int rowIndex) => dataGridView.GetBoundItem<GridEntry>(rowIndex);
=> dataGridView.UIThread(() => updateRowImage(pictureId));
private void updateRowImage(string pictureId)
{
var rowId = getRowId((ge) => ge.GetBook().PictureId == pictureId);
if (rowId > -1)
dataGridView.InvalidateRow(rowId);
}
#endregion
private GridEntry getGridEntry(int rowIndex) => (GridEntry)dataGridView.Rows[rowIndex].DataBoundItem;
private int getRowId(Func<GridEntry, bool> func)
{
for (var r = 0; r < dataGridView.RowCount; r++)
if (func(getGridEntry(r)))
return r;
return -1;
}
} }
} }

View File

@ -40,6 +40,12 @@ publish win64 platform, single-file
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
-- end HOW TO PUBLISH --------------------------------------------------------------------------------------------------------------------- -- end HOW TO PUBLISH ---------------------------------------------------------------------------------------------------------------------
-- begin IMAGES ---------------------------------------------------------------------------------------------------------------------
edit tags icon images from:
icons8.com
search: tags
-- end IMAGES ---------------------------------------------------------------------------------------------------------------------
-- begin AUDIBLE DETAILS --------------------------------------------------------------------------------------------------------------------- -- begin AUDIBLE DETAILS ---------------------------------------------------------------------------------------------------------------------
alternate book id (eg BK_RAND_006061) is called 'sku' , 'sku_lite' , 'prod_id' , 'product_id' in different parts of the site alternate book id (eg BK_RAND_006061) is called 'sku' , 'sku_lite' , 'prod_id' , 'product_id' in different parts of the site
-- end AUDIBLE DETAILS --------------------------------------------------------------------------------------------------------------------- -- end AUDIBLE DETAILS ---------------------------------------------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
namespace LibationWinForm_Framework.Dialogs namespace WinFormsDesigner.Dialogs
{ {
partial class IndexLibraryDialog partial class IndexLibraryDialog
{ {

View File

@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LibationWinForm_Framework.Dialogs namespace WinFormsDesigner.Dialogs
{ {
public partial class IndexLibraryDialog : Form public partial class IndexLibraryDialog : Form
{ {

View File

@ -1,4 +1,4 @@
namespace LibationWinForm_Framework.Dialogs.Login namespace WinFormsDesigner.Dialogs.Login
{ {
partial class AudibleLoginDialog partial class AudibleLoginDialog
{ {

View File

@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LibationWinForm_Framework.Dialogs.Login namespace WinFormsDesigner.Dialogs.Login
{ {
public partial class AudibleLoginDialog : Form public partial class AudibleLoginDialog : Form
{ {

View File

@ -1,4 +1,4 @@
namespace LibationWinForm_Framework.Dialogs.Login namespace WinFormsDesigner.Dialogs.Login
{ {
partial class CaptchaDialog partial class CaptchaDialog
{ {

View File

@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LibationWinForm_Framework.Dialogs.Login namespace WinFormsDesigner.Dialogs.Login
{ {
public partial class CaptchaDialog : Form public partial class CaptchaDialog : Form
{ {

View File

@ -12,6 +12,9 @@ namespace WinFormsDesigner
[Browsable(false)] [Browsable(false)]
public IEnumerable<string> TagsEnumerated { get; set; } public IEnumerable<string> TagsEnumerated { get; set; }
[Browsable(false)]
public string Download_Status { get; set; }
public Image Cover { get; set; } public Image Cover { get; set; }
public string Title { get; set; } public string Title { get; set; }
public string Authors { get; set; } public string Authors { get; set; }
@ -24,6 +27,5 @@ namespace WinFormsDesigner
public DateTime? Purchase_Date { get; set; } public DateTime? Purchase_Date { get; set; }
public string My_Rating { get; set; } public string My_Rating { get; set; }
public string Misc { get; set; } public string Misc { get; set; }
public string Download_Status { get; set; }
} }
} }

View File

@ -28,35 +28,34 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.gridEntryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.gridEntryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.gridEntryDataGridView = new System.Windows.Forms.DataGridView(); this.gridEntryDataGridView = new System.Windows.Forms.DataGridView();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).BeginInit(); this.SuspendLayout();
this.SuspendLayout(); //
// // gridEntryBindingSource
// gridEntryBindingSource //
// this.gridEntryBindingSource.DataSource = typeof(WinFormsDesigner.GridEntry);
this.gridEntryBindingSource.DataSource = typeof(WinFormsDesigner.GridEntry); //
// // gridEntryDataGridView
// gridEntryDataGridView //
// this.gridEntryDataGridView.AutoGenerateColumns = false;
this.gridEntryDataGridView.AutoGenerateColumns = false; this.gridEntryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridEntryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridEntryDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.gridEntryDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewImageColumn1, this.dataGridViewImageColumn1,
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn2, this.dataGridViewTextBoxColumn2,
@ -68,134 +67,125 @@
this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn8,
this.dataGridViewTextBoxColumn9, this.dataGridViewTextBoxColumn9,
this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn10,
this.dataGridViewTextBoxColumn11, this.dataGridViewTextBoxColumn11});
this.dataGridViewTextBoxColumn12}); this.gridEntryDataGridView.DataSource = this.gridEntryBindingSource;
this.gridEntryDataGridView.DataSource = this.gridEntryBindingSource; this.gridEntryDataGridView.Location = new System.Drawing.Point(54, 58);
this.gridEntryDataGridView.Location = new System.Drawing.Point(54, 58); this.gridEntryDataGridView.Name = "gridEntryDataGridView";
this.gridEntryDataGridView.Name = "gridEntryDataGridView"; this.gridEntryDataGridView.Size = new System.Drawing.Size(300, 220);
this.gridEntryDataGridView.Size = new System.Drawing.Size(300, 220); this.gridEntryDataGridView.TabIndex = 0;
this.gridEntryDataGridView.TabIndex = 0; //
// // dataGridViewImageColumn1
// dataGridViewImageColumn1 //
// this.dataGridViewImageColumn1.DataPropertyName = "Cover";
this.dataGridViewImageColumn1.DataPropertyName = "Cover"; this.dataGridViewImageColumn1.HeaderText = "Cover";
this.dataGridViewImageColumn1.HeaderText = "Cover"; this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; this.dataGridViewImageColumn1.ReadOnly = true;
this.dataGridViewImageColumn1.ReadOnly = true; //
// // dataGridViewTextBoxColumn1
// dataGridViewTextBoxColumn1 //
// this.dataGridViewTextBoxColumn1.DataPropertyName = "Title";
this.dataGridViewTextBoxColumn1.DataPropertyName = "Title"; this.dataGridViewTextBoxColumn1.HeaderText = "Title";
this.dataGridViewTextBoxColumn1.HeaderText = "Title"; this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.ReadOnly = true; //
// // dataGridViewTextBoxColumn2
// dataGridViewTextBoxColumn2 //
// this.dataGridViewTextBoxColumn2.DataPropertyName = "Authors";
this.dataGridViewTextBoxColumn2.DataPropertyName = "Authors"; this.dataGridViewTextBoxColumn2.HeaderText = "Authors";
this.dataGridViewTextBoxColumn2.HeaderText = "Authors"; this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.ReadOnly = true; //
// // dataGridViewTextBoxColumn3
// dataGridViewTextBoxColumn3 //
// this.dataGridViewTextBoxColumn3.DataPropertyName = "Narrators";
this.dataGridViewTextBoxColumn3.DataPropertyName = "Narrators"; this.dataGridViewTextBoxColumn3.HeaderText = "Narrators";
this.dataGridViewTextBoxColumn3.HeaderText = "Narrators"; this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; this.dataGridViewTextBoxColumn3.ReadOnly = true;
this.dataGridViewTextBoxColumn3.ReadOnly = true; //
// // dataGridViewTextBoxColumn4
// dataGridViewTextBoxColumn4 //
// this.dataGridViewTextBoxColumn4.DataPropertyName = "Length";
this.dataGridViewTextBoxColumn4.DataPropertyName = "Length"; this.dataGridViewTextBoxColumn4.HeaderText = "Length";
this.dataGridViewTextBoxColumn4.HeaderText = "Length"; this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; this.dataGridViewTextBoxColumn4.ReadOnly = true;
this.dataGridViewTextBoxColumn4.ReadOnly = true; //
// // dataGridViewTextBoxColumn5
// dataGridViewTextBoxColumn5 //
// this.dataGridViewTextBoxColumn5.DataPropertyName = "Series";
this.dataGridViewTextBoxColumn5.DataPropertyName = "Series"; this.dataGridViewTextBoxColumn5.HeaderText = "Series";
this.dataGridViewTextBoxColumn5.HeaderText = "Series"; this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; this.dataGridViewTextBoxColumn5.ReadOnly = true;
this.dataGridViewTextBoxColumn5.ReadOnly = true; //
// // dataGridViewTextBoxColumn6
// dataGridViewTextBoxColumn6 //
// this.dataGridViewTextBoxColumn6.DataPropertyName = "Description";
this.dataGridViewTextBoxColumn6.DataPropertyName = "Description"; this.dataGridViewTextBoxColumn6.HeaderText = "Description";
this.dataGridViewTextBoxColumn6.HeaderText = "Description"; this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; this.dataGridViewTextBoxColumn6.ReadOnly = true;
this.dataGridViewTextBoxColumn6.ReadOnly = true; //
// // dataGridViewTextBoxColumn7
// dataGridViewTextBoxColumn7 //
// this.dataGridViewTextBoxColumn7.DataPropertyName = "Category";
this.dataGridViewTextBoxColumn7.DataPropertyName = "Category"; this.dataGridViewTextBoxColumn7.HeaderText = "Category";
this.dataGridViewTextBoxColumn7.HeaderText = "Category"; this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; this.dataGridViewTextBoxColumn7.ReadOnly = true;
this.dataGridViewTextBoxColumn7.ReadOnly = true; //
// // dataGridViewTextBoxColumn8
// dataGridViewTextBoxColumn8 //
// this.dataGridViewTextBoxColumn8.DataPropertyName = "Product_Rating";
this.dataGridViewTextBoxColumn8.DataPropertyName = "Product_Rating"; this.dataGridViewTextBoxColumn8.HeaderText = "Product_Rating";
this.dataGridViewTextBoxColumn8.HeaderText = "Product_Rating"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; this.dataGridViewTextBoxColumn8.ReadOnly = true;
this.dataGridViewTextBoxColumn8.ReadOnly = true; //
// // dataGridViewTextBoxColumn9
// dataGridViewTextBoxColumn9 //
// this.dataGridViewTextBoxColumn9.DataPropertyName = "Purchase_Date";
this.dataGridViewTextBoxColumn9.DataPropertyName = "Purchase_Date"; this.dataGridViewTextBoxColumn9.HeaderText = "Purchase_Date";
this.dataGridViewTextBoxColumn9.HeaderText = "Purchase_Date"; this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; this.dataGridViewTextBoxColumn9.ReadOnly = true;
this.dataGridViewTextBoxColumn9.ReadOnly = true; //
// // dataGridViewTextBoxColumn10
// dataGridViewTextBoxColumn10 //
// this.dataGridViewTextBoxColumn10.DataPropertyName = "My_Rating";
this.dataGridViewTextBoxColumn10.DataPropertyName = "My_Rating"; this.dataGridViewTextBoxColumn10.HeaderText = "My_Rating";
this.dataGridViewTextBoxColumn10.HeaderText = "My_Rating"; this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; this.dataGridViewTextBoxColumn10.ReadOnly = true;
this.dataGridViewTextBoxColumn10.ReadOnly = true; //
// // dataGridViewTextBoxColumn11
// dataGridViewTextBoxColumn11 //
// this.dataGridViewTextBoxColumn11.DataPropertyName = "Misc";
this.dataGridViewTextBoxColumn11.DataPropertyName = "Misc"; this.dataGridViewTextBoxColumn11.HeaderText = "Misc";
this.dataGridViewTextBoxColumn11.HeaderText = "Misc"; this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11"; this.dataGridViewTextBoxColumn11.ReadOnly = true;
this.dataGridViewTextBoxColumn11.ReadOnly = true; //
// // ProductsGrid
// dataGridViewTextBoxColumn12 //
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.dataGridViewTextBoxColumn12.DataPropertyName = "Download_Status"; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.dataGridViewTextBoxColumn12.HeaderText = "Download_Status"; this.Controls.Add(this.gridEntryDataGridView);
this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12"; this.Name = "ProductsGrid";
this.dataGridViewTextBoxColumn12.ReadOnly = true; this.Size = new System.Drawing.Size(434, 329);
// ((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).EndInit();
// ProductsGrid ((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).EndInit();
// this.ResumeLayout(false);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.gridEntryDataGridView);
this.Name = "ProductsGrid";
this.Size = new System.Drawing.Size(434, 329);
((System.ComponentModel.ISupportInitialize)(this.gridEntryBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridEntryDataGridView)).EndInit();
this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.BindingSource gridEntryBindingSource; private System.Windows.Forms.BindingSource gridEntryBindingSource;
private System.Windows.Forms.DataGridView gridEntryDataGridView; private System.Windows.Forms.DataGridView gridEntryDataGridView;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1; private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12; }
}
} }

View File

@ -6,5 +6,5 @@
cause the file to be unrecognizable by the program. cause the file to be unrecognizable by the program.
--> -->
<GenericObjectDataSource DisplayName="GridEntry" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <GenericObjectDataSource DisplayName="GridEntry" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>LibationWinForm.ProductGrids.GridEntry, LibationWinForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> <TypeInfo>WinFormsDesigner.GridEntry, WinFormsDesigner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource> </GenericObjectDataSource>

View File

@ -166,7 +166,7 @@
<EmbeddedResource Include="ProductsGrid.resx"> <EmbeddedResource Include="ProductsGrid.resx">
<DependentUpon>ProductsGrid.cs</DependentUpon> <DependentUpon>ProductsGrid.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="Properties\DataSources\LibationWinForm_Framework.ProductGrids.GridEntry.datasource" /> <None Include="Properties\DataSources\WinFormsDesigner.GridEntry.datasource" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />