Refactoring validation warnings so they can be reset easily
This commit is contained in:
parent
87d8de607a
commit
607a9d7b58
9 changed files with 36 additions and 20 deletions
|
|
@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
public class ValidationErrorsPanel : FlowLayoutWidget
|
||||
{
|
||||
public ValidationErrorsPanel(IEnumerable<ValidationError> errors, ThemeConfig theme)
|
||||
: base (FlowDirection.TopToBottom)
|
||||
: base(FlowDirection.TopToBottom)
|
||||
{
|
||||
this.HAnchor = HAnchor.Absolute;
|
||||
this.VAnchor = VAnchor.Fit | VAnchor;
|
||||
|
|
@ -61,8 +61,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
string errorText, errorDetails;
|
||||
|
||||
var settingsValidationError = validationError as SettingsValidationError;
|
||||
if (settingsValidationError != null)
|
||||
if (validationError is SettingsValidationError settingsValidationError)
|
||||
{
|
||||
errorText = string.Format(
|
||||
"{0} {1}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue