From 789b9207b5c8c935e17c50c0e4e19d352f23cc78 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Mon, 16 May 2022 15:49:02 -0600 Subject: [PATCH] Use that fancy patterm matching --- .../ProcessQueue/ProcessQueueControl.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/LibationWinForms/ProcessQueue/ProcessQueueControl.cs b/Source/LibationWinForms/ProcessQueue/ProcessQueueControl.cs index 59442a1c..98b7c01a 100644 --- a/Source/LibationWinForms/ProcessQueue/ProcessQueueControl.cs +++ b/Source/LibationWinForms/ProcessQueue/ProcessQueueControl.cs @@ -270,9 +270,9 @@ namespace LibationWinForms.ProcessQueue syncContext.Send(_ => { Panels[i].SuspendLayout(); - if (propertyName is null || propertyName == nameof(proc.Cover)) + if (propertyName is null or nameof(proc.Cover)) Panels[i].SetCover(proc.Cover); - if (propertyName is null || propertyName == nameof(proc.BookText)) + if (propertyName is null or nameof(proc.BookText)) Panels[i].SetBookInfo(proc.BookText); if (proc.Result != ProcessBookResult.None) @@ -281,14 +281,15 @@ namespace LibationWinForms.ProcessQueue return; } - if (propertyName is null || propertyName == nameof(proc.Status)) + if (propertyName is null or nameof(proc.Status)) Panels[i].SetStatus(proc.Status); - if (propertyName is null || propertyName == nameof(proc.Progress)) + if (propertyName is null or nameof(proc.Progress)) Panels[i].SetProgrss(proc.Progress); - if (propertyName is null || propertyName == nameof(proc.TimeRemaining)) + if (propertyName is null or nameof(proc.TimeRemaining)) Panels[i].SetRemainingTime(proc.TimeRemaining); Panels[i].ResumeLayout(); - }, null); + }, + null); } private void UpdateAllControls()