Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master pull request dev #62

Merged
merged 60 commits into from
Aug 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ce64bc0
Update AnimationAudio.xaml
yanjinhuagood Aug 4, 2023
897ca8f
update CountdownTimer
yanjinhuagood Aug 4, 2023
cebba11
Update App.xaml
yanjinhuagood Aug 4, 2023
b41134d
Update Theme.xaml
yanjinhuagood Aug 4, 2023
74f2ac1
Merge branch 'dev' of https://github.com/WPFDevelopersOrg/WPFDevelope…
yanjinhuagood Aug 4, 2023
f50e43f
add in ColorPicker
yanjinhuagood Aug 6, 2023
aeafae4
add in ColorPickerExample
yanjinhuagood Aug 6, 2023
15ab960
Update MenuEnum.cs
yanjinhuagood Aug 6, 2023
99b44cf
Update MainVM.cs
yanjinhuagood Aug 6, 2023
6f58c14
Update Styles.GroupBox.xaml
yanjinhuagood Aug 6, 2023
4a83638
Update Styles.Menu.xaml
yanjinhuagood Aug 6, 2023
1e0a24f
Update Styles.MessageBox.xaml
yanjinhuagood Aug 6, 2023
29de636
Update Styles.PasswordBox.xaml
yanjinhuagood Aug 6, 2023
5d12759
Update Styles.RepeatButton.xaml
yanjinhuagood Aug 6, 2023
7209ada
Update ControlBasic.xaml
yanjinhuagood Aug 6, 2023
c580cf4
Update Message.xaml
yanjinhuagood Aug 6, 2023
b718ead
Update Theme40.txt
yanjinhuagood Aug 6, 2023
ed6dcb6
Update Theme45x.txt
yanjinhuagood Aug 6, 2023
04f63ed
Update Generic.xaml
yanjinhuagood Aug 6, 2023
b448736
Update Generic.xaml
yanjinhuagood Aug 6, 2023
e572673
Update Theme.xaml
yanjinhuagood Aug 6, 2023
ffc3011
Update Theme.xaml
yanjinhuagood Aug 6, 2023
1ef4619
Update WPFDevelopers.Shared.projitems
yanjinhuagood Aug 6, 2023
aa7ac2c
Update WPFDevelopers.SamplesCode.csproj
yanjinhuagood Aug 6, 2023
1705e89
Update WPFDevelopers.Samples.Shared.projitems
yanjinhuagood Aug 6, 2023
0a0603f
Update PackIconKind.cs
yanjinhuagood Aug 7, 2023
47ab849
Update PathIcon.xaml
yanjinhuagood Aug 7, 2023
05cf2f3
Update CropAvatar.xaml
yanjinhuagood Aug 7, 2023
f25f623
Update ColorPicker.xaml
yanjinhuagood Aug 7, 2023
376a3c8
Update CircularMenu.xaml
yanjinhuagood Aug 7, 2023
588caca
Update Geometrys.xaml
yanjinhuagood Aug 7, 2023
b31374f
Update ControlBasic.xaml
yanjinhuagood Aug 7, 2023
f81e7f8
Update ColorUtil.cs
yanjinhuagood Aug 7, 2023
37ded01
Update ColorPicker.cs
yanjinhuagood Aug 8, 2023
662fdf1
Update NumericBox.xaml
yanjinhuagood Aug 8, 2023
d62b82f
Update ColorPicker.xaml
yanjinhuagood Aug 8, 2023
a8e6666
Update ColorUtil.cs
yanjinhuagood Aug 8, 2023
c3909f7
Update TextBoxHelper.cs
yanjinhuagood Aug 8, 2023
7dddaac
Update ListBoxItemExtensions.cs
yanjinhuagood Aug 8, 2023
de508eb
Update WidthHeightEqualValueConverter.cs
yanjinhuagood Aug 8, 2023
c81fff3
Update ColorTypeToVisibilityConverter.cs
yanjinhuagood Aug 8, 2023
bb69347
Update ColorConverter.cs
yanjinhuagood Aug 8, 2023
4965ab2
Update Theme.xaml
yanjinhuagood Aug 8, 2023
825e660
Update NumericBox.xaml
yanjinhuagood Aug 15, 2023
d33cc69
Update ColorPicker.xaml
yanjinhuagood Aug 15, 2023
8317670
Update ColorUtil.cs
yanjinhuagood Aug 15, 2023
fe5fd2f
Update ColorConverter.cs
yanjinhuagood Aug 15, 2023
60ba9d6
Create HSL.cs
yanjinhuagood Aug 15, 2023
3d7b8c2
Update NumericBoxExample.xaml
yanjinhuagood Aug 15, 2023
6ef63a7
Update ColorPickerExample.xaml
yanjinhuagood Aug 15, 2023
1db36c3
Update Theme.xaml
yanjinhuagood Aug 15, 2023
07b4ade
Update Theme.xaml
yanjinhuagood Aug 15, 2023
0fa524f
Update WPFDevelopers.Shared.projitems
yanjinhuagood Aug 15, 2023
52fe61f
Update ColorPicker.xaml
yanjinhuagood Aug 16, 2023
fdb2bbe
Update ScreenCut.cs
yanjinhuagood Aug 16, 2023
f77f998
Update WPFMessageBox.cs
yanjinhuagood Aug 16, 2023
7c7cec5
Update ColorPicker.cs
yanjinhuagood Aug 16, 2023
0bfd665
Update WPFDevelopers.Samples45x.csproj
yanjinhuagood Aug 16, 2023
ef46790
Update WPFDevelopers.Samples40.csproj
yanjinhuagood Aug 16, 2023
cbb102c
Update Theme.xaml
yanjinhuagood Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ColorConverter.cs
  • Loading branch information
yanjinhuagood committed Aug 15, 2023
commit fe5fd2fffa5c24e73f1cbb7d59a0f46954c25763
6 changes: 0 additions & 6 deletions src/WPFDevelopers.Shared/Core/Converts/ColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,13 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
{
_curColor = (Color) value;
return $"{(int) ColorUtil.RgbToHSL(_curColor.Value).H}";
//return $"{ColorUtil.ColorFromH(_curColor.Value)}";
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
var colorStr = (string) value;
if (!string.IsNullOrWhiteSpace(colorStr) && double.TryParse(colorStr, out var hValue))
_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, hValue % 360);
//_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, hValue: hValue % 360);
return _curColor;
}
}
Expand All @@ -125,15 +123,13 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
{
_curColor = (Color) value;
return $"{Math.Round(ColorUtil.RgbToHSL(_curColor.Value).S * 100)}%";
//return $"{ColorUtil.ColorFromS(_curColor.Value)}%";
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
var colorStr = (string) value;
if (!string.IsNullOrWhiteSpace(colorStr) && double.TryParse(colorStr, out var sValue))
_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, sl: sValue / 100);
//_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, sValue: sValue / 100);
return _curColor;
}
}
Expand All @@ -145,7 +141,6 @@ public class LToColorConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
_curColor = (Color) value;
//return $"{ColorUtil.ColorFromL(_curColor.Value)}%";
return $"{Math.Round(ColorUtil.RgbToHSL(_curColor.Value).L * 100)}%";
}

Expand All @@ -154,7 +149,6 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
var colorStr = (string) value;
if (!string.IsNullOrWhiteSpace(colorStr) && double.TryParse(colorStr, out var lValue))
_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, l: lValue / 100);
//_curColor = ColorUtil.ConvertHSLToColor(_curColor.Value, lValue: lValue / 100);
return _curColor;
}
}
Expand Down