Use that fancy patterm matching
This commit is contained in:
parent
133dbb7471
commit
789b9207b5
1 changed files with 7 additions and 6 deletions
|
|
@ -270,9 +270,9 @@ namespace LibationWinForms.ProcessQueue
|
||||||
syncContext.Send(_ =>
|
syncContext.Send(_ =>
|
||||||
{
|
{
|
||||||
Panels[i].SuspendLayout();
|
Panels[i].SuspendLayout();
|
||||||
if (propertyName is null || propertyName == nameof(proc.Cover))
|
if (propertyName is null or nameof(proc.Cover))
|
||||||
Panels[i].SetCover(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);
|
Panels[i].SetBookInfo(proc.BookText);
|
||||||
|
|
||||||
if (proc.Result != ProcessBookResult.None)
|
if (proc.Result != ProcessBookResult.None)
|
||||||
|
|
@ -281,14 +281,15 @@ namespace LibationWinForms.ProcessQueue
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propertyName is null || propertyName == nameof(proc.Status))
|
if (propertyName is null or nameof(proc.Status))
|
||||||
Panels[i].SetStatus(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);
|
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].SetRemainingTime(proc.TimeRemaining);
|
||||||
Panels[i].ResumeLayout();
|
Panels[i].ResumeLayout();
|
||||||
}, null);
|
},
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAllControls()
|
private void UpdateAllControls()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue