From 565d34cec96bac491bd964f4c269f56c75050a16 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Wed, 18 Aug 2021 11:22:47 -0400 Subject: [PATCH] bottom numbers formatting --- LibationWinForms/Form1.Designer.cs | 14 +++++++------- LibationWinForms/Form1.cs | 19 +++++-------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/LibationWinForms/Form1.Designer.cs b/LibationWinForms/Form1.Designer.cs index bd26f759..14b05b6f 100644 --- a/LibationWinForms/Form1.Designer.cs +++ b/LibationWinForms/Form1.Designer.cs @@ -304,26 +304,26 @@ // visibleCountLbl // this.visibleCountLbl.Name = "visibleCountLbl"; - this.visibleCountLbl.Size = new System.Drawing.Size(61, 17); - this.visibleCountLbl.Text = "Visible: {0}"; + this.visibleCountLbl.Size = new System.Drawing.Size(53, 17); + this.visibleCountLbl.Text = "Visible: 0"; // // springLbl // this.springLbl.Name = "springLbl"; - this.springLbl.Size = new System.Drawing.Size(375, 17); + this.springLbl.Size = new System.Drawing.Size(517, 17); this.springLbl.Spring = true; // // backupsCountsLbl // this.backupsCountsLbl.Name = "backupsCountsLbl"; - this.backupsCountsLbl.Size = new System.Drawing.Size(336, 17); - this.backupsCountsLbl.Text = "BACKUPS: No progress: {0} Encrypted: {1} Fully backed up: {2}"; + this.backupsCountsLbl.Size = new System.Drawing.Size(218, 17); + this.backupsCountsLbl.Text = "[Calculating backed up book quantities]"; // // pdfsCountsLbl // this.pdfsCountsLbl.Name = "pdfsCountsLbl"; - this.pdfsCountsLbl.Size = new System.Drawing.Size(218, 17); - this.pdfsCountsLbl.Text = "| PDFs: NOT d/l\'ed: {0} Downloaded: {1}"; + this.pdfsCountsLbl.Size = new System.Drawing.Size(171, 17); + this.pdfsCountsLbl.Text = "| [Calculating backed up PDFs]"; // // addFilterBtn // diff --git a/LibationWinForms/Form1.cs b/LibationWinForms/Form1.cs index 7caaf420..a114b094 100644 --- a/LibationWinForms/Form1.cs +++ b/LibationWinForms/Form1.cs @@ -16,10 +16,6 @@ namespace LibationWinForms { public partial class Form1 : Form { - private string backupsCountsLbl_Format { get; } - private string pdfsCountsLbl_Format { get; } - private string visibleCountLbl_Format { get; } - private string beginBookBackupsToolStripMenuItem_format { get; } private string beginPdfBackupsToolStripMenuItem_format { get; } @@ -28,18 +24,9 @@ namespace LibationWinForms InitializeComponent(); // back up string formats - backupsCountsLbl_Format = backupsCountsLbl.Text; - pdfsCountsLbl_Format = pdfsCountsLbl.Text; - visibleCountLbl_Format = visibleCountLbl.Text; - beginBookBackupsToolStripMenuItem_format = beginBookBackupsToolStripMenuItem.Text; beginPdfBackupsToolStripMenuItem_format = beginPdfBackupsToolStripMenuItem.Text; - // after backing up formats: can set default/temp visible text - backupsCountsLbl.Text = "[Calculating backed up book quantities]"; - pdfsCountsLbl.Text = "[Calculating backed up PDFs]"; - setVisibleCount(null, 0); - if (this.DesignMode) return; @@ -179,7 +166,7 @@ namespace LibationWinForms #endregion #region bottom: qty books visible - private void setVisibleCount(object _, int qty) => visibleCountLbl.Text = string.Format(visibleCountLbl_Format, qty); + private void setVisibleCount(object _, int qty) => visibleCountLbl.Text = string.Format("Visible: {0}", qty); #endregion #region bottom: backup counts @@ -193,6 +180,8 @@ namespace LibationWinForms } private void setBookBackupCounts(int booksFullyBackedUp, int booksDownloadedOnly, int booksNoProgress) { + var backupsCountsLbl_Format = "BACKUPS: No progress: {0} Encrypted: {1} Fully backed up: {2}"; + // enable/disable export var hasResults = 0 < (booksFullyBackedUp + booksDownloadedOnly + booksNoProgress); exportLibraryToolStripMenuItem.Enabled = hasResults; @@ -217,6 +206,8 @@ namespace LibationWinForms } private void setPdfBackupCounts(int pdfsDownloaded, int pdfsNotDownloaded) { + var pdfsCountsLbl_Format = "| PDFs: NOT d/l\'ed: {0} Downloaded: {1}"; + // update bottom numbers var hasResults = 0 < (pdfsNotDownloaded + pdfsDownloaded); var statusStripText