Skip to content

Commit

Permalink
1.2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mochengvia committed May 18, 2024
1 parent 42fd4c3 commit 47c3c29
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 15 deletions.
Binary file modified SourceCode/References/Net452/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net462/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net472/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net48/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net5/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net6/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/References/Net7/Panuon.WPF.dll
Binary file not shown.
15 changes: 13 additions & 2 deletions SourceCode/SharedResources/Panuon.WPF.UI/Controls/NumberInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,17 @@ public ICommand DownCommand
DownCommandPropertyKey.DependencyProperty;
#endregion

#region StepFactor
public int StepFactor
{
get { return (int)GetValue(StepFactorProperty); }
set { SetValue(StepFactorProperty, value); }
}

public static readonly DependencyProperty StepFactorProperty =
DependencyProperty.Register("StepFactor", typeof(int), typeof(NumberInput), new PropertyMetadata(1));
#endregion

#endregion

#region ComponentResourceKeys
Expand Down Expand Up @@ -547,13 +558,13 @@ public void Reset()
public void Up()
{
var value = Value ?? 0;
SetCurrentValue(ValueProperty, Math.Max(Minimum, Math.Min(Maximum, value + Interval)));
SetCurrentValue(ValueProperty, Math.Max(Minimum, Math.Min(Maximum, value + Interval * StepFactor)));
}

public void Down()
{
var value = Value ?? 0;
SetCurrentValue(ValueProperty, Math.Max(Minimum, Math.Min(Maximum, value - Interval)));
SetCurrentValue(ValueProperty, Math.Max(Minimum, Math.Min(Maximum, value - Interval * StepFactor)));
}
#endregion

Expand Down
19 changes: 11 additions & 8 deletions SourceCode/SharedResources/Panuon.WPF.UI/Enums/InputLimits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ public enum InputLimits
{
None = 0,
Digit = 1,
LowerCaseLetters = 2,
UpperCaseLetters = 4,
Point = 8,
MultiplePoints = 16,
At = 32,
MultipleAts = 64,
Space = 128,
MultipleSpaces = 256,
Letters = 2,
LowerCaseLetters = 4,
UpperCaseLetters = 8,
Point = 16,
MultiplePoints = 32,
At = 64,
MultipleAts = 128,
Space = 256,
MultipleSpaces = 512,
Dash = 1024,
Underline = 2048,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,9 @@ private static void TextBox_PreviewTextInput(object sender, TextCompositionEvent
{
if ((inputLimit.HasFlag(InputLimits.Digit)
&& inputChar >= 48 && inputChar <= 57) ||
(inputLimit.HasFlag(InputLimits.UpperCaseLetters)
(inputLimit.HasFlag(InputLimits.Letters) || inputLimit.HasFlag(InputLimits.UpperCaseLetters)
&& inputChar >= 97 && inputChar <= 122) ||
(inputLimit.HasFlag(InputLimits.LowerCaseLetters)
(inputLimit.HasFlag(InputLimits.Letters) || inputLimit.HasFlag(InputLimits.LowerCaseLetters)
&& inputChar >= 65 && inputChar <= 90) ||
(inputLimit.HasFlag(InputLimits.Point)
&& inputChar == '.' && !text.Contains(".")) ||
Expand All @@ -449,7 +449,11 @@ private static void TextBox_PreviewTextInput(object sender, TextCompositionEvent
(inputLimit.HasFlag(InputLimits.MultiplePoints)
&& inputChar == '.') ||
(inputLimit.HasFlag(InputLimits.MultipleAts)
&& inputChar == '@'))
&& inputChar == '@') ||
(inputLimit.HasFlag(InputLimits.Dash)
&& inputChar == '-') ||
(inputLimit.HasFlag(InputLimits.Underline)
&& inputChar == '_'))
{
text += inputChar;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
ResourceDictionaryLocation.SourceAssembly
)]

[assembly: AssemblyVersion("1.2.1.3")]
[assembly: AssemblyFileVersion("1.2.1.3")]
[assembly: AssemblyVersion("1.2.1.4")]
[assembly: AssemblyFileVersion("1.2.1.4")]
Binary file modified SourceCode/references/core31/Panuon.WPF.dll
Binary file not shown.
Binary file modified SourceCode/references/net8/Panuon.WPF.dll
Binary file not shown.

0 comments on commit 47c3c29

Please sign in to comment.