-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a class that checks the length of a custom processor or video c…
…ard name
- Loading branch information
Showing
2 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
HSMonitor/Utils/ValidationRules/HardwareNameLengthRuleValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Windows; | ||
|
||
namespace HSMonitor.Utils.ValidationRules; | ||
|
||
public class HardwareNameLengthRuleValue : DependencyObject | ||
{ | ||
public static readonly DependencyProperty MinBindingProperty = DependencyProperty.RegisterAttached( | ||
nameof(Min), | ||
typeof(int), | ||
typeof(HardwareNameLengthRuleValue), | ||
new PropertyMetadata(default(int)) | ||
); | ||
|
||
public static readonly DependencyProperty MaxBindingProperty = DependencyProperty.RegisterAttached( | ||
nameof(Max), | ||
typeof(int), | ||
typeof(HardwareNameLengthRuleValue), | ||
new PropertyMetadata(default(int)) | ||
); | ||
|
||
public int Min { | ||
get => (int) GetValue(MinBindingProperty); | ||
set => SetValue(MinBindingProperty, value); | ||
} | ||
|
||
public int Max { | ||
get => (int) GetValue(MaxBindingProperty); | ||
set => SetValue(MaxBindingProperty, value); | ||
} | ||
} |