Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -13,13 +13,13 @@ namespace HandyControl.Controls
|
||||
base.OnApplyTemplate();
|
||||
EnableBlur(this);
|
||||
}
|
||||
|
||||
|
||||
private static SystemVersionInfo GetSystemVersionInfo()
|
||||
{
|
||||
var osv = new InteropValues.RTL_OSVERSIONINFOEX();
|
||||
osv.dwOSVersionInfoSize = (uint)Marshal.SizeOf(osv);
|
||||
osv.dwOSVersionInfoSize = (uint) Marshal.SizeOf(osv);
|
||||
InteropMethods.Gdip.RtlGetVersion(out osv);
|
||||
return new SystemVersionInfo((int)osv.dwMajorVersion, (int)osv.dwMinorVersion, (int)osv.dwBuildNumber);
|
||||
return new SystemVersionInfo((int) osv.dwMajorVersion, (int) osv.dwMinorVersion, (int) osv.dwBuildNumber);
|
||||
}
|
||||
|
||||
internal static void EnableBlur(Window window)
|
||||
@@ -61,4 +61,4 @@ namespace HandyControl.Controls
|
||||
Marshal.FreeHGlobal(accentPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Color ActiveGlowColor
|
||||
{
|
||||
get => (Color)GetValue(ActiveGlowColorProperty);
|
||||
get => (Color) GetValue(ActiveGlowColorProperty);
|
||||
set => SetValue(ActiveGlowColorProperty, value);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Color InactiveGlowColor
|
||||
{
|
||||
get => (Color)GetValue(InactiveGlowColorProperty);
|
||||
get => (Color) GetValue(InactiveGlowColorProperty);
|
||||
set => SetValue(InactiveGlowColorProperty, value);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private GlowEdge GetOrCreateGlowWindow(int direction)
|
||||
{
|
||||
return _glowEdges[direction] ?? (_glowEdges[direction] = new GlowEdge(this, (Dock)direction)
|
||||
return _glowEdges[direction] ?? (_glowEdges[direction] = new GlowEdge(this, (Dock) direction)
|
||||
{
|
||||
ActiveGlowColor = ActiveGlowColor,
|
||||
InactiveGlowColor = InactiveGlowColor,
|
||||
@@ -205,11 +205,11 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnResizeModeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var customChromeWindow = (GlowWindow)obj;
|
||||
var customChromeWindow = (GlowWindow) obj;
|
||||
customChromeWindow.UpdateGlowVisibility(false);
|
||||
}
|
||||
|
||||
private static void OnGlowColorChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) => ((GlowWindow)obj).UpdateGlowColors();
|
||||
private static void OnGlowColorChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) => ((GlowWindow) obj).UpdateGlowColors();
|
||||
|
||||
private void UpdateGlowColors()
|
||||
{
|
||||
@@ -303,7 +303,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void WmWindowPosChanging(IntPtr lParam)
|
||||
{
|
||||
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
|
||||
var windowpos = (InteropValues.WINDOWPOS) Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
|
||||
if ((windowpos.flags & 2u) == 0u && (windowpos.flags & 1u) == 0u && windowpos.cx > 0 && windowpos.cy > 0)
|
||||
{
|
||||
var rect = new Rect(windowpos.x, windowpos.y, windowpos.cx, windowpos.cy);
|
||||
@@ -317,8 +317,8 @@ namespace HandyControl.Controls
|
||||
|
||||
var logicalRect = GetOnScreenPosition(rect);
|
||||
logicalRect = logicalRect.LogicalToDeviceUnits();
|
||||
windowpos.x = (int)logicalRect.X;
|
||||
windowpos.y = (int)logicalRect.Y;
|
||||
windowpos.x = (int) logicalRect.X;
|
||||
windowpos.y = (int) logicalRect.Y;
|
||||
Marshal.StructureToPtr(windowpos, lParam, true);
|
||||
}
|
||||
}
|
||||
@@ -364,7 +364,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
try
|
||||
{
|
||||
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
|
||||
var windowpos = (InteropValues.WINDOWPOS) Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
|
||||
|
||||
UpdateGlowWindowPositions((windowpos.flags & 64u) == 0u);
|
||||
UpdateZOrderOfThisAndOwner();
|
||||
@@ -399,7 +399,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var hMonitor = InteropMethods.MonitorFromWindow(hWnd, 2);
|
||||
var result = default(InteropValues.MONITORINFO);
|
||||
result.cbSize = (uint)Marshal.SizeOf(typeof(InteropValues.MONITORINFO));
|
||||
result.cbSize = (uint) Marshal.SizeOf(typeof(InteropValues.MONITORINFO));
|
||||
InteropMethods.GetMonitorInfo(hMonitor, ref result);
|
||||
return result;
|
||||
}
|
||||
@@ -417,7 +417,7 @@ namespace HandyControl.Controls
|
||||
private void WmSysCommand(IntPtr hWnd, IntPtr wParam)
|
||||
{
|
||||
var num = InteropMethods.GET_SC_WPARAM(wParam);
|
||||
|
||||
|
||||
if (num == InteropValues.SC_MOVE)
|
||||
{
|
||||
InteropMethods.RedrawWindow(hWnd, IntPtr.Zero, IntPtr.Zero,
|
||||
@@ -430,13 +430,13 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_logicalSizeForRestore = new Rect(Left, Top, Width, Height);
|
||||
}
|
||||
|
||||
|
||||
if (num == InteropValues.SC_MOVE && WindowState == WindowState.Maximized && _logicalSizeForRestore == Rect.Empty)
|
||||
{
|
||||
_logicalSizeForRestore = new Rect(Left, Top, Width, Height);
|
||||
}
|
||||
|
||||
if (num == InteropValues.SC_RESTORE && WindowState != WindowState.Minimized &&
|
||||
|
||||
if (num == InteropValues.SC_RESTORE && WindowState != WindowState.Minimized &&
|
||||
_logicalSizeForRestore.Width > 0.0 && _logicalSizeForRestore.Height > 0.0)
|
||||
{
|
||||
Left = _logicalSizeForRestore.Left;
|
||||
@@ -463,4 +463,4 @@ namespace HandyControl.Controls
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
|
||||
static ImageBrowser()
|
||||
{
|
||||
IsFullScreenProperty.AddOwner(typeof(ImageBrowser), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
}
|
||||
}
|
||||
|
||||
public ImageBrowser()
|
||||
{
|
||||
@@ -127,4 +127,4 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public string Message
|
||||
{
|
||||
get => (string)GetValue(MessageProperty);
|
||||
get => (string) GetValue(MessageProperty);
|
||||
set => SetValue(MessageProperty, value);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Geometry Image
|
||||
{
|
||||
get => (Geometry)GetValue(ImageProperty);
|
||||
get => (Geometry) GetValue(ImageProperty);
|
||||
set => SetValue(ImageProperty, value);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public Brush ImageBrush
|
||||
{
|
||||
get => (Brush)GetValue(ImageBrushProperty);
|
||||
get => (Brush) GetValue(ImageBrushProperty);
|
||||
set => SetValue(ImageBrushProperty, value);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool ShowImage
|
||||
{
|
||||
get => (bool)GetValue(ShowImageProperty);
|
||||
get => (bool) GetValue(ShowImageProperty);
|
||||
set => SetValue(ShowImageProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
|
||||
_panel = GetTemplateChild(ElementPanel) as Panel;
|
||||
_panel = GetTemplateChild(ElementPanel) as Panel;
|
||||
if (_panel != null)
|
||||
{
|
||||
if (_buttonOk != null)
|
||||
@@ -419,15 +419,15 @@ namespace HandyControl.Controls
|
||||
{
|
||||
if (!IsValidMessageBoxButton(button))
|
||||
{
|
||||
throw new InvalidEnumArgumentException(nameof(button), (int)button, typeof(MessageBoxButton));
|
||||
throw new InvalidEnumArgumentException(nameof(button), (int) button, typeof(MessageBoxButton));
|
||||
}
|
||||
if (!IsValidMessageBoxImage(icon))
|
||||
{
|
||||
throw new InvalidEnumArgumentException(nameof(icon), (int)icon, typeof(MessageBoxImage));
|
||||
throw new InvalidEnumArgumentException(nameof(icon), (int) icon, typeof(MessageBoxImage));
|
||||
}
|
||||
if (!IsValidMessageBoxResult(defaultResult))
|
||||
{
|
||||
throw new InvalidEnumArgumentException(nameof(defaultResult), (int)defaultResult, typeof(MessageBoxResult));
|
||||
throw new InvalidEnumArgumentException(nameof(defaultResult), (int) defaultResult, typeof(MessageBoxResult));
|
||||
}
|
||||
|
||||
var ownerWindow = owner ?? WindowHelper.GetActiveWindow();
|
||||
@@ -630,4 +630,4 @@ namespace HandyControl.Controls
|
||||
|| value == MessageBoxResult.Yes;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool ShowCancel
|
||||
{
|
||||
get => (bool)GetValue(ShowCancelProperty);
|
||||
get => (bool) GetValue(ShowCancelProperty);
|
||||
set => SetValue(ShowCancelProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -232,4 +232,4 @@ namespace HandyControl.Controls
|
||||
PopupElement = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void WmGetMinMaxInfo(IntPtr hwnd, IntPtr lParam)
|
||||
{
|
||||
var mmi = (InteropValues.MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(InteropValues.MINMAXINFO));
|
||||
var mmi = (InteropValues.MINMAXINFO) Marshal.PtrToStructure(lParam, typeof(InteropValues.MINMAXINFO));
|
||||
var monitor = InteropMethods.MonitorFromWindow(hwnd, InteropValues.MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
if (monitor != IntPtr.Zero && mmi != null)
|
||||
@@ -138,7 +138,7 @@ namespace HandyControl.Controls
|
||||
if (autoHide)
|
||||
{
|
||||
var monitorInfo = default(InteropValues.MONITORINFO);
|
||||
monitorInfo.cbSize = (uint)Marshal.SizeOf(typeof(InteropValues.MONITORINFO));
|
||||
monitorInfo.cbSize = (uint) Marshal.SizeOf(typeof(InteropValues.MONITORINFO));
|
||||
InteropMethods.GetMonitorInfo(monitor, ref monitorInfo);
|
||||
var rcWorkArea = monitorInfo.rcWork;
|
||||
var rcMonitorArea = monitorInfo.rcMonitor;
|
||||
@@ -177,37 +177,37 @@ namespace HandyControl.Controls
|
||||
|
||||
public Brush CloseButtonBackground
|
||||
{
|
||||
get => (Brush)GetValue(CloseButtonBackgroundProperty);
|
||||
get => (Brush) GetValue(CloseButtonBackgroundProperty);
|
||||
set => SetValue(CloseButtonBackgroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush CloseButtonForeground
|
||||
{
|
||||
get => (Brush)GetValue(CloseButtonForegroundProperty);
|
||||
get => (Brush) GetValue(CloseButtonForegroundProperty);
|
||||
set => SetValue(CloseButtonForegroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush OtherButtonBackground
|
||||
{
|
||||
get => (Brush)GetValue(OtherButtonBackgroundProperty);
|
||||
get => (Brush) GetValue(OtherButtonBackgroundProperty);
|
||||
set => SetValue(OtherButtonBackgroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush OtherButtonForeground
|
||||
{
|
||||
get => (Brush)GetValue(OtherButtonForegroundProperty);
|
||||
get => (Brush) GetValue(OtherButtonForegroundProperty);
|
||||
set => SetValue(OtherButtonForegroundProperty, value);
|
||||
}
|
||||
|
||||
public double NonClientAreaHeight
|
||||
{
|
||||
get => (double)GetValue(NonClientAreaHeightProperty);
|
||||
get => (double) GetValue(NonClientAreaHeightProperty);
|
||||
set => SetValue(NonClientAreaHeightProperty, value);
|
||||
}
|
||||
|
||||
public bool IsFullScreen
|
||||
{
|
||||
get => (bool)GetValue(IsFullScreenProperty);
|
||||
get => (bool) GetValue(IsFullScreenProperty);
|
||||
set => SetValue(IsFullScreenProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -219,56 +219,56 @@ namespace HandyControl.Controls
|
||||
|
||||
public Brush CloseButtonHoverBackground
|
||||
{
|
||||
get => (Brush)GetValue(CloseButtonHoverBackgroundProperty);
|
||||
get => (Brush) GetValue(CloseButtonHoverBackgroundProperty);
|
||||
set => SetValue(CloseButtonHoverBackgroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush CloseButtonHoverForeground
|
||||
{
|
||||
get => (Brush)GetValue(CloseButtonHoverForegroundProperty);
|
||||
get => (Brush) GetValue(CloseButtonHoverForegroundProperty);
|
||||
set => SetValue(CloseButtonHoverForegroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush OtherButtonHoverBackground
|
||||
{
|
||||
get => (Brush)GetValue(OtherButtonHoverBackgroundProperty);
|
||||
get => (Brush) GetValue(OtherButtonHoverBackgroundProperty);
|
||||
set => SetValue(OtherButtonHoverBackgroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush OtherButtonHoverForeground
|
||||
{
|
||||
get => (Brush)GetValue(OtherButtonHoverForegroundProperty);
|
||||
get => (Brush) GetValue(OtherButtonHoverForegroundProperty);
|
||||
set => SetValue(OtherButtonHoverForegroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush NonClientAreaBackground
|
||||
{
|
||||
get => (Brush)GetValue(NonClientAreaBackgroundProperty);
|
||||
get => (Brush) GetValue(NonClientAreaBackgroundProperty);
|
||||
set => SetValue(NonClientAreaBackgroundProperty, value);
|
||||
}
|
||||
|
||||
public Brush NonClientAreaForeground
|
||||
{
|
||||
get => (Brush)GetValue(NonClientAreaForegroundProperty);
|
||||
get => (Brush) GetValue(NonClientAreaForegroundProperty);
|
||||
set => SetValue(NonClientAreaForegroundProperty, value);
|
||||
}
|
||||
|
||||
public bool ShowNonClientArea
|
||||
{
|
||||
get => (bool)GetValue(ShowNonClientAreaProperty);
|
||||
get => (bool) GetValue(ShowNonClientAreaProperty);
|
||||
set => SetValue(ShowNonClientAreaProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
public bool ShowTitle
|
||||
{
|
||||
get => (bool)GetValue(ShowTitleProperty);
|
||||
get => (bool) GetValue(ShowTitleProperty);
|
||||
set => SetValue(ShowTitleProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
private static void OnShowNonClientAreaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (Window)d;
|
||||
ctl.SwitchShowNonClientArea((bool)e.NewValue);
|
||||
var ctl = (Window) d;
|
||||
ctl.SwitchShowNonClientArea((bool) e.NewValue);
|
||||
}
|
||||
|
||||
private void SwitchShowNonClientArea(bool showNonClientArea)
|
||||
@@ -303,8 +303,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnIsFullScreenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (Window)d;
|
||||
ctl.SwitchIsFullScreen((bool)e.NewValue);
|
||||
var ctl = (Window) d;
|
||||
ctl.SwitchIsFullScreen((bool) e.NewValue);
|
||||
}
|
||||
|
||||
private void SwitchIsFullScreen(bool isFullScreen)
|
||||
@@ -427,4 +427,4 @@ namespace HandyControl.Controls
|
||||
InvalidateMeasure();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user