Automated dotnet-format update

This commit is contained in:
github-actions-dotnet-formatter[bot] committed 2022-03-13 14:27:46 +00:00
1 parent ed41aabdef
commit 4cb300574c
747 files changed
+1000 -1000

No files matched your search

@@ -23,4 +23,4 @@ public class Boolean2BooleanReConverter : IValueConverter
}
return value;
}
}
}
@@ -28,4 +28,4 @@ public class Boolean2StringConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -16,4 +16,4 @@ public class Boolean2VisibilityReConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -36,4 +36,4 @@ public class BooleanArr2BooleanConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -35,4 +35,4 @@ public class BooleanArr2VisibilityConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -32,4 +32,4 @@ public class BorderCircularClipConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -27,4 +27,4 @@ public class BorderCircularConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -46,4 +46,4 @@ public class BorderClipConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -131,4 +131,4 @@ public class ColLayoutConverter : TypeConverter
_ => throw new FormatException("InvalidStringColLayout")
};
}
}
}
@@ -35,4 +35,4 @@ public class Color2ChannelAConverter : IValueConverter
}
return parameter;
}
}
}
@@ -36,4 +36,4 @@ public class Color2HexStringConverter : IValueConverter
}
return new SolidColorBrush(default);
}
}
}
@@ -30,4 +30,4 @@ public class CornerRadiusSplitConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -56,4 +56,4 @@ public class DataGridSelectAllButtonVisibilityConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -25,4 +25,4 @@ public class Double2GridLengthConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -27,4 +27,4 @@ public class DoubleMinConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -34,4 +34,4 @@ public class Int2StringConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -48,4 +48,4 @@ public class Long2FileSizeConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -32,4 +32,4 @@ public class Number2PercentageConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -12,4 +12,4 @@ public class Object2BooleanConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -12,4 +12,4 @@ public class Object2StringConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -16,4 +16,4 @@ public class Object2VisibilityConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -16,4 +16,4 @@ public class Object2VisibilityReConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -27,4 +27,4 @@ public class RectangleCircularConverter : IMultiValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -16,4 +16,4 @@ public class String2VisibilityConverter : IValueConverter
{
return value != null && (Visibility) value == Visibility.Collapsed;
}
}
}
@@ -16,4 +16,4 @@ public class String2VisibilityReConverter : IValueConverter
{
return value != null && (Visibility) value == Visibility.Collapsed;
}
}
}
@@ -30,4 +30,4 @@ public class ThicknessSplitConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -24,4 +24,4 @@ public class TreeViewItemMarginConverter : IValueConverter
{
throw new NotSupportedException();
}
}
}
@@ -123,4 +123,4 @@ public class ColLayout : MarkupExtension
sb.Append(Xxl.ToString(cultureInfo));
return sb.ToString();
}
}
}
@@ -29,4 +29,4 @@ public static class ColorExtension
color.G,
color.B
};
}
}
@@ -14,4 +14,4 @@ public static class DependencyObjectExtension
_ => LogicalTreeHelper.GetParent(sourceElement)
};
}
}
}
@@ -74,4 +74,4 @@ public static class DialogExtension
return viewModel;
}
}
}
@@ -27,4 +27,4 @@ public static class EnumerableExtension
return enumerable;
}
}
}
@@ -54,4 +54,4 @@ public static class FrameworkElementExtension
return 0;
}
}
}
@@ -46,4 +46,4 @@ public static class GeometryExtension
length /= min;
return length / strokeThickness;
}
}
}
@@ -57,37 +57,37 @@ public class LangExtension : MarkupExtension
switch (Key)
{
case string key:
{
var binding = CreateLangBinding(key);
BindingOperations.SetBinding(targetObject, targetProperty, binding);
return binding.ProvideValue(serviceProvider);
}
{
var binding = CreateLangBinding(key);
BindingOperations.SetBinding(targetObject, targetProperty, binding);
return binding.ProvideValue(serviceProvider);
}
case Binding keyBinding when targetObject is FrameworkElement element:
{
if (element.DataContext != null)
{
var binding = SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
return binding.ProvideValue(serviceProvider);
if (element.DataContext != null)
{
var binding = SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
return binding.ProvideValue(serviceProvider);
}
SetTargetProperty(element, targetProperty);
element.DataContextChanged += LangExtension_DataContextChanged;
break;
}
SetTargetProperty(element, targetProperty);
element.DataContextChanged += LangExtension_DataContextChanged;
break;
}
case Binding keyBinding when targetObject is FrameworkContentElement element:
{
if (element.DataContext != null)
{
var binding = SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
return binding.ProvideValue(serviceProvider);
if (element.DataContext != null)
{
var binding = SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
return binding.ProvideValue(serviceProvider);
}
SetTargetProperty(element, targetProperty);
element.DataContextChanged += LangExtension_DataContextChanged;
break;
}
SetTargetProperty(element, targetProperty);
element.DataContextChanged += LangExtension_DataContextChanged;
break;
}
}
return string.Empty;
@@ -98,25 +98,25 @@ public class LangExtension : MarkupExtension
switch (sender)
{
case FrameworkElement element:
{
element.DataContextChanged -= LangExtension_DataContextChanged;
if (!(Key is Binding keyBinding)) return;
{
element.DataContextChanged -= LangExtension_DataContextChanged;
if (!(Key is Binding keyBinding)) return;
var targetProperty = GetTargetProperty(element);
SetTargetProperty(element, null);
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
break;
}
var targetProperty = GetTargetProperty(element);
SetTargetProperty(element, null);
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
break;
}
case FrameworkContentElement element:
{
element.DataContextChanged -= LangExtension_DataContextChanged;
if (!(Key is Binding keyBinding)) return;
{
element.DataContextChanged -= LangExtension_DataContextChanged;
if (!(Key is Binding keyBinding)) return;
var targetProperty = GetTargetProperty(element);
SetTargetProperty(element, null);
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
break;
}
var targetProperty = GetTargetProperty(element);
SetTargetProperty(element, null);
SetLangBinding(element, targetProperty, keyBinding.Path, element.DataContext);
break;
}
}
}
@@ -147,4 +147,4 @@ public class LangExtension : MarkupExtension
Source = Source,
Mode = BindingMode.OneWay
};
}
}
@@ -28,4 +28,4 @@ public static class StringExtension
return null;
}
}
}
}
@@ -29,4 +29,4 @@ public static class UIElementExtension
/// </summary>
/// <param name="element"></param>
public static void Collapse(this UIElement element) => element.Visibility = Visibility.Collapsed;
}
}
@@ -19,4 +19,4 @@ public static class ValueExtension
&& MathHelper.AreClose(thickness.Left, thickness.Bottom);
public static bool IsNaN(this double value) => double.IsNaN(value);
}
}
@@ -31,4 +31,4 @@ public class ComparerGenerator
{
DateTimeRange
}
}
}
@@ -11,4 +11,4 @@ public class DateTimeRangeComparer : IComparer<DateTimeRange>
if (x.Start < y.Start && x.End < y.End) return -1;
return 0;
}
}
}
@@ -116,4 +116,4 @@ public class GithubGravatarGenerator : IGravatarGenerator
return Color.FromRgb((byte) (arr[hValue % 6] * 255), (byte) (arr[(hValue | 16) % 6] * 255),
(byte) (arr[(hValue | 8) % 6] * 255));
}
}
}
@@ -113,4 +113,4 @@ public class HatchBrushGenerator
hatchStyle < HatchStyle.Horizontal || hatchStyle > HatchStyle.SolidDiamond
? throw new ArgumentOutOfRangeException(nameof(hatchStyle))
: HatchBrushes[(int) hatchStyle];
}
}
@@ -117,4 +117,4 @@ public class GlobalShortcut
public static ObservableCollection<KeyBinding> GetKeyBindings(DependencyObject element)
=> (ObservableCollection<KeyBinding>) element.GetValue(KeyBindingsProperty);
}
}
@@ -90,4 +90,4 @@ public class AnimationHelper
return accumulated;
}
}
}
@@ -123,4 +123,4 @@ internal class ArithmeticHelper
var v1 = new Vector3D(p2.X - p1.X, p2.Y - p1.Y, p2.Z - p1.Z);
return Vector3D.CrossProduct(v0, v1);
}
}
}
@@ -27,4 +27,4 @@ public class BindingHelper
BindingOperations.ClearBinding(tempObj, TextSearch.TextProperty);
return result;
}
}
}
@@ -16,4 +16,4 @@ public class ColorHelper
var bytes = BitConverter.GetBytes(c);
return Color.FromArgb(bytes[3], bytes[2], bytes[1], bytes[0]);
}
}
}
@@ -79,9 +79,9 @@ public class ConfigHelper : INotifyPropertyChanged
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#else
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endif
}
}
@@ -18,4 +18,4 @@ public class DesignerHelper
return _isInDesignMode.Value;
}
}
}
}
@@ -100,4 +100,4 @@ internal static class DpiHelper
return newValue;
}
}
}
@@ -273,4 +273,4 @@ internal static class FullScreenHelper
return IntPtr.Zero;
}
}
}
@@ -293,4 +293,4 @@ internal static class IconHelper
var iconModuleFile = InteropMethods.GetModuleFileName(new HandleRef());
InteropMethods.ExtractIconEx(iconModuleFile, 0, out largeIconHandle, out smallIconHandle, 1);
}
}
}
@@ -145,4 +145,4 @@ public static class InputClickHelper
public bool IsEmpty() => ClickEventHandler is null && DragStarted is null;
}
}
}
@@ -81,4 +81,4 @@ public class ResourceHelper
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
};
}
}
}
@@ -81,4 +81,4 @@ internal class ScreenHelper
workAreaRect = new Rect(monitorInfo.rcWork.Position, monitorInfo.rcWork.Size);
}
}
}
}
@@ -15,4 +15,4 @@ internal class SecurityHelper
_allWindowsUIPermission ??= new UIPermission(UIPermissionWindow.AllWindows);
_allWindowsUIPermission.Demand();
}
}
}
@@ -38,4 +38,4 @@ public class SingleOpenHelper
}
return default;
}
}
}
@@ -25,4 +25,4 @@ internal class SystemHelper
return value != null && value.ToString() != "0";
}
}
}
@@ -16,14 +16,14 @@ internal class TextHelper
typeface,
fontSize, Brushes.Black);
#else
var formattedText = new FormattedText(
text,
CultureInfo.CurrentUICulture,
flowDirection,
typeface,
fontSize, Brushes.Black, DpiHelper.DeviceDpiX);
var formattedText = new FormattedText(
text,
CultureInfo.CurrentUICulture,
flowDirection,
typeface,
fontSize, Brushes.Black, DpiHelper.DeviceDpiX);
#endif
return formattedText;
}
}
}
@@ -229,4 +229,4 @@ internal class TokenizerHelper
return numericSeparator;
}
}
}
@@ -69,4 +69,4 @@ internal class TouchDragMoveWindowHelper
_lastPoint = lpPoint;
}
}
}
@@ -103,4 +103,4 @@ public class ValidateHelper
var v = (int) value;
return v <= 0;
}
}
}
@@ -73,4 +73,4 @@ public static class VisualHelper
InteropMethods.SetWindowLong(hWnd, InteropValues.GWL.STYLE, num);
return true;
}
}
}
@@ -140,10 +140,10 @@ public static class WindowHelper
#if NET40
return WindowResizeBorderThickness.Add(new Thickness(autoHide ? -8 : 0));
#elif NETCOREAPP
var hdc = InteropMethods.GetDC(IntPtr.Zero);
var scale = InteropMethods.GetDeviceCaps(hdc, InteropValues.DESKTOPVERTRES) / (float) InteropMethods.GetDeviceCaps(hdc, InteropValues.VERTRES);
InteropMethods.ReleaseDC(IntPtr.Zero, hdc);
return WindowResizeBorderThickness.Add(new Thickness((autoHide ? -4 : 4) * scale));
var hdc = InteropMethods.GetDC(IntPtr.Zero);
var scale = InteropMethods.GetDeviceCaps(hdc, InteropValues.DESKTOPVERTRES) / (float) InteropMethods.GetDeviceCaps(hdc, InteropValues.VERTRES);
InteropMethods.ReleaseDC(IntPtr.Zero, hdc);
return WindowResizeBorderThickness.Add(new Thickness((autoHide ? -4 : 4) * scale));
#else
return WindowResizeBorderThickness.Add(new Thickness(autoHide ? -4 : 4));
#endif
@@ -201,4 +201,4 @@ public static class WindowHelper
public static void StartFullScreen(this Window window) => FullScreenHelper.StartFullScreen(window);
public static void EndFullScreen(this Window window) => FullScreenHelper.EndFullScreen(window);
}
}
@@ -53,4 +53,4 @@ public class ClipboardHook
}
return IntPtr.Zero;
}
}
}
@@ -101,4 +101,4 @@ public class KeyboardHook
}
return InteropMethods.CallNextHookEx(HookId, nCode, wParam, lParam);
}
}
}
@@ -64,4 +64,4 @@ internal class MouseHook
return InteropMethods.CallNextHookEx(HookId, nCode, wParam, lParam);
}
}
}
@@ -49,4 +49,4 @@ public class SystemMenuHook
}
return IntPtr.Zero;
}
}
}
@@ -41,4 +41,4 @@ internal sealed class BitmapHandle : WpfSafeHandle
handle = hbitmap,
};
}
}
}
@@ -12,4 +12,4 @@ internal static class CommonHandles
public static readonly int GDI = HandleCollector.RegisterType(nameof(GDI), 50, 500);
public static readonly int Kernel = HandleCollector.RegisterType(nameof(Kernel), 0, 1000);
}
}
@@ -128,4 +128,4 @@ internal static class HandleCollector
}
}
}
}
}
@@ -29,4 +29,4 @@ internal sealed class IconHandle : WpfSafeHandle
{
return handle;
}
}
}
@@ -46,4 +46,4 @@ internal sealed class SafeFileMappingHandle : SafeHandleZeroOrMinusOneIsInvalid
var result = InteropMethods.IntCloseHandle(handle);
return result;
}
}
}
@@ -20,4 +20,4 @@ internal abstract class WpfSafeHandle : SafeHandleZeroOrMinusOneIsInvalid
HandleCollector.Remove(_collectorId);
base.Dispose(disposing);
}
}
}
@@ -744,4 +744,4 @@ internal class InteropMethods
internal static extern int RtlGetVersion(out InteropValues.RTL_OSVERSIONINFOEX lpVersionInformation);
}
}
}
@@ -1188,4 +1188,4 @@ internal class InteropValues
SHOWDEFAULT = 10,
FORCEMINIMIZE = 11,
}
}
}
@@ -93,4 +93,4 @@ public static class RegexJudgment
{
return Regex.IsMatch(str, RegexPatterns.UrlPattern);
}
}
}
@@ -147,4 +147,4 @@ public sealed class RegexPatterns
/// <param name="propertyName"></param>
/// <returns></returns>
public object GetValue(string propertyName) => GetType().GetField(propertyName).GetValue(null);
}
}
@@ -118,4 +118,4 @@ public class ButtonGroupItemStyleSelector : StyleSelector
? ResourceToken.RadioGroupItemVerticalLast
: ResourceToken.RadioGroupItemDefault];
}
}
}
@@ -26,4 +26,4 @@ public class ComboBoxItemCapsuleStyleSelector : StyleSelector
return null;
}
}
}
@@ -31,4 +31,4 @@ public class TabItemCapsuleStyleSelector : StyleSelector
return null;
}
}
}