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 ScreenCut.cs
  • Loading branch information
yanjinhuagood committed Aug 16, 2023
commit fdb2bbeb354a59ccaa99f15e6ba1e0ab2590a716
50 changes: 25 additions & 25 deletions src/WPFDevelopers.Shared/Controls/ScreenCut/ScreenCut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,33 +216,33 @@ public override void OnApplyTemplate()
_rectangleRight = GetTemplateChild(RectangleRightTemplateName) as Rectangle;
_rectangleBottom = GetTemplateChild(RectangleBottomTemplateName) as Rectangle;
_border = GetTemplateChild(BorderTemplateName) as Border;
_border.MouseLeftButtonDown += _border_MouseLeftButtonDown;
_border.MouseLeftButtonDown += Border_MouseLeftButtonDown;

_editBar = GetTemplateChild(EditBarTemplateName) as Border;
_buttonSave = GetTemplateChild(ButtonSaveTemplateName) as Button;
if (_buttonSave != null)
_buttonSave.Click += _buttonSave_Click;
_buttonSave.Click += ButtonSave_Click;
_buttonCancel = GetTemplateChild(ButtonCancelTemplateName) as Button;
if (_buttonCancel != null)
_buttonCancel.Click += _buttonCancel_Click;
_buttonCancel.Click += ButtonCancel_Click;
_buttonComplete = GetTemplateChild(ButtonCompleteTemplateName) as Button;
if (_buttonComplete != null)
_buttonComplete.Click += _buttonComplete_Click;
_buttonComplete.Click += ButtonComplete_Click;
_radioButtonRectangle = GetTemplateChild(RadioButtonRectangleTemplateName) as RadioButton;
if (_radioButtonRectangle != null)
_radioButtonRectangle.Click += _radioButtonRectangle_Click;
_radioButtonRectangle.Click += RadioButtonRectangle_Click;
_radioButtonEllipse = GetTemplateChild(RadioButtonEllipseTemplateName) as RadioButton;
if (_radioButtonEllipse != null)
_radioButtonEllipse.Click += _radioButtonEllipse_Click;
_radioButtonEllipse.Click += RadioButtonEllipse_Click;
_radioButtonArrow = GetTemplateChild(RadioButtonArrowTemplateName) as RadioButton;
if (_radioButtonArrow != null)
_radioButtonArrow.Click += _radioButtonArrow_Click;
_radioButtonArrow.Click += RadioButtonArrow_Click;
_radioButtonInk = GetTemplateChild(RadioButtonInkTemplateName) as RadioButton;
if (_radioButtonInk != null)
_radioButtonInk.Click += _radioButtonInk_Click;
_radioButtonInk.Click += RadioButtonInk_Click;
_radioButtonText = GetTemplateChild(RadioButtonTextTemplateName) as RadioButton;
if (_radioButtonText != null)
_radioButtonText.Click += _radioButtonText_Click;
_radioButtonText.Click += RadioButtonText_Click;
_canvas.Width = Screen.AllScreens[ScreenIndex].Bounds.Width;
_canvas.Height = Screen.AllScreens[ScreenIndex].Bounds.Height;
//_canvas.Background = new ImageBrush(ControlsHelper.Capture());
Expand All @@ -254,7 +254,7 @@ public override void OnApplyTemplate()
_popupBorder = GetTemplateChild(PopupBorderTemplateName) as Border;
_popupBorder.Loaded += (s, e) => { _popup.HorizontalOffset = -_popupBorder.ActualWidth / 3; };
_wrapPanel = GetTemplateChild(WrapPanelColorTemplateName) as WrapPanel;
_wrapPanel.PreviewMouseDown += _wrapPanel_PreviewMouseDown;
_wrapPanel.PreviewMouseDown += WrapPanel_PreviewMouseDown;
Loaded += ScreenCut_Loaded;
controlTemplate = (ControlTemplate)FindResource("WD.PART_DrawArrow");
}
Expand Down Expand Up @@ -322,22 +322,22 @@ protected override void OnPreviewMouseRightButtonDown(MouseButtonEventArgs e)
OnCanceled();
}

private void _radioButtonInk_Click(object sender, RoutedEventArgs e)
private void RadioButtonInk_Click(object sender, RoutedEventArgs e)
{
RadioButtonChecked(_radioButtonInk, ScreenCutMouseType.DrawInk);
}

private void _radioButtonText_Click(object sender, RoutedEventArgs e)
private void RadioButtonText_Click(object sender, RoutedEventArgs e)
{
RadioButtonChecked(_radioButtonText, ScreenCutMouseType.DrawText);
}

private void _radioButtonArrow_Click(object sender, RoutedEventArgs e)
private void RadioButtonArrow_Click(object sender, RoutedEventArgs e)
{
RadioButtonChecked(_radioButtonArrow, ScreenCutMouseType.DrawArrow);
}

private void _wrapPanel_PreviewMouseDown(object sender, MouseButtonEventArgs e)
private void WrapPanel_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
if (e.Source is RadioButton)
{
Expand All @@ -346,12 +346,12 @@ private void _wrapPanel_PreviewMouseDown(object sender, MouseButtonEventArgs e)
}
}

private void _radioButtonRectangle_Click(object sender, RoutedEventArgs e)
private void RadioButtonRectangle_Click(object sender, RoutedEventArgs e)
{
RadioButtonChecked(_radioButtonRectangle, ScreenCutMouseType.DrawRectangle);
}

private void _radioButtonEllipse_Click(object sender, RoutedEventArgs e)
private void RadioButtonEllipse_Click(object sender, RoutedEventArgs e)
{
RadioButtonChecked(_radioButtonEllipse, ScreenCutMouseType.DrawEllipse);
}
Expand Down Expand Up @@ -405,13 +405,13 @@ private void _border_SizeChanged(object sender, SizeChangedEventArgs e)
EditBarPosition();
}

private void _border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (screenCutMouseType == ScreenCutMouseType.Default)
screenCutMouseType = ScreenCutMouseType.MoveMouse;
}

private void _buttonSave_Click(object sender, RoutedEventArgs e)
private void ButtonSave_Click(object sender, RoutedEventArgs e)
{
var dlg = new SaveFileDialog();
dlg.FileName = $"WPFDevelopers{DateTime.Now.ToString("yyyyMMddHHmmss")}.jpg";
Expand All @@ -432,7 +432,7 @@ private void _buttonSave_Click(object sender, RoutedEventArgs e)
}
}

private void _buttonComplete_Click(object sender, RoutedEventArgs e)
private void ButtonComplete_Click(object sender, RoutedEventArgs e)
{
var bitmap = CutBitmap();
if (CutCompleted != null)
Expand All @@ -455,7 +455,7 @@ private CroppedBitmap CutBitmap()
new Int32Rect((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height));
}

private void _buttonCancel_Click(object sender, RoutedEventArgs e)
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
{
OnCanceled();
}
Expand Down Expand Up @@ -593,7 +593,7 @@ private void DrawText()
textBorder.PreviewMouseLeftButtonDown += (s, e) =>
{
_radioButtonText.IsChecked = true;
_radioButtonText_Click(null, null);
RadioButtonText_Click(null, null);
SelectElement();
var border = s as Border;
frameworkElement = border;
Expand Down Expand Up @@ -679,7 +679,7 @@ private void DrwaInkControl(Point current)
polyLine.MouseLeftButtonDown += (s, e) =>
{
_radioButtonInk.IsChecked = true;
_radioButtonInk_Click(null, null);
RadioButtonInk_Click(null, null);
SelectElement();
frameworkElement = s as Polyline;
frameworkElement.Opacity = .7;
Expand Down Expand Up @@ -713,7 +713,7 @@ private void DrawArrowControl(Point current)
controlArrow.MouseLeftButtonDown += (s, e) =>
{
_radioButtonArrow.IsChecked = true;
_radioButtonArrow_Click(null, null);
RadioButtonArrow_Click(null, null);
SelectElement();
frameworkElement = s as Control;
frameworkElement.Opacity = .7;
Expand Down Expand Up @@ -841,7 +841,7 @@ private void DrawMultipleControl(Point current)
borderRectangle.MouseLeftButtonDown += (s, e) =>
{
_radioButtonRectangle.IsChecked = true;
_radioButtonRectangle_Click(null, null);
RadioButtonRectangle_Click(null, null);
SelectElement();
frameworkElement = s as Border;
frameworkElement.Opacity = .7;
Expand All @@ -863,7 +863,7 @@ private void DrawMultipleControl(Point current)
drawEllipse.MouseLeftButtonDown += (s, e) =>
{
_radioButtonEllipse.IsChecked = true;
_radioButtonEllipse_Click(null, null);
RadioButtonEllipse_Click(null, null);
SelectElement();
frameworkElement = s as Ellipse;
frameworkElement.Opacity = .7;
Expand Down