Automated dotnet-format update

This commit is contained in:
github-actions-dotnet-formatter[bot] committed 2020-12-04 15:12:55 +00:00
1 parent ad4c2f68aa
commit 2af18c2d38
403 files changed
+1569 -1567

No files matched your search

@@ -10,4 +10,4 @@ namespace HandyControl.Data
public bool Cancel { get; set; }
}
}
}
@@ -16,4 +16,4 @@ namespace HandyControl.Data
public T Info { get; set; }
}
}
}
@@ -15,4 +15,4 @@ namespace HandyControl.Data
Key = KeyInterop.KeyFromVirtualKey(virtualKey);
}
}
}
}
@@ -9,4 +9,4 @@ namespace HandyControl.Data
public InteropValues.POINT Point { get; set; }
}
}
}
@@ -66,4 +66,4 @@ namespace HandyControl.Data
{
}
}
}
}
@@ -2,8 +2,8 @@
{
public enum BadgeStatus
{
Text,
Dot,
Text,
Dot,
Processing
}
}
}
@@ -7,4 +7,4 @@
Audio,
Custom
}
}
}
@@ -5,4 +5,4 @@
Sender,
Receiver
}
}
}
@@ -10,4 +10,4 @@
Xxl,
Auto
}
}
}
@@ -56,4 +56,4 @@
OutlinedDiamond,
SolidDiamond
}
}
}
@@ -15,4 +15,4 @@ namespace HandyControl.Data
System = 0x00020000,
User = 0x00040000
}
}
}
@@ -10,4 +10,4 @@ namespace HandyControl.Data
Fatal,
Ask
}
}
}
@@ -27,4 +27,4 @@ namespace HandyControl.Data
/// </summary>
E
}
}
}
@@ -9,4 +9,4 @@
RightButtonDown = 0x0204,
RightButtonUp = 0x0205
}
}
}
@@ -7,12 +7,12 @@ namespace HandyControl.Data
/// 左上
/// </summary>
LeftTop,
/// <summary>
/// 左
/// </summary>
Left,
/// <summary>
/// 左下
/// </summary>
@@ -37,30 +37,30 @@ namespace HandyControl.Data
/// 右上
/// </summary>
RightTop,
/// <summary>
/// 右
/// </summary>
Right,
/// <summary>
/// 右下
/// </summary>
RightBottom,
/// <summary>
/// 下左
/// </summary>
BottomLeft,
/// <summary>
/// 下
/// </summary>
Bottom,
/// <summary>
/// 下右
/// </summary>
BottomRight,
}
}
}
@@ -21,4 +21,4 @@ namespace HandyControl.Data
/// </summary>
None
}
}
}
@@ -7,4 +7,4 @@
VerticalMove,
Fade
}
}
}
@@ -5,4 +5,4 @@
Header,
Item
}
}
}
@@ -7,4 +7,4 @@ namespace HandyControl.Data
Dark,
Violet
}
}
}
@@ -20,4 +20,4 @@
/// </summary>
Waiting
}
}
}
@@ -6,4 +6,4 @@
Outside,
Inside
}
}
}
@@ -24,4 +24,4 @@ namespace HandyControl.Data
NnDouble,
NpDouble
}
}
}
@@ -9,4 +9,4 @@ namespace HandyControl.Data
Left,
Top
}
}
}
@@ -9,4 +9,4 @@
SpaceBetween,
SpaceAround
}
}
}
@@ -8,4 +8,4 @@
SpaceBetween,
SpaceAround
}
}
}
@@ -84,7 +84,7 @@ namespace HandyControl.Data
while (written < cb)
{
var toRead = bufsize;
if (written + toRead > cb) toRead = (int)(cb - written);
if (written + toRead > cb) toRead = (int) (cb - written);
var read = Read(buffer, toRead);
if (read == 0) break;
if (pstm.Write(buffer, read) != read)
@@ -198,7 +198,7 @@ namespace HandyControl.Data
public void Stat(IntPtr pstatstg, int grfStatFlag)
{
var stats = new STATSTG {cbSize = DataStream.Length};
var stats = new STATSTG { cbSize = DataStream.Length };
Marshal.StructureToPtr(stats, pstatstg, true);
}
@@ -268,4 +268,4 @@ namespace HandyControl.Data
public int reserved;
}
}
}
}
@@ -26,4 +26,4 @@ namespace HandyControl.Data
return "[FrameDimension: " + Guid + "]";
}
}
}
}
@@ -93,4 +93,4 @@ namespace HandyControl.Data
protected void OnFrameChanged(EventArgs e) => FrameChangedHandler?.Invoke(Image, e);
}
}
}
@@ -10,4 +10,4 @@
public byte[] Value { get; set; }
}
}
}
@@ -111,4 +111,4 @@ namespace HandyControl.Data
return props;
}
}
}
}
@@ -48,7 +48,7 @@ namespace HandyControl.Data
protected override void DisposeNativeResources() => InteropMethods.DeleteObject(Handle);
private static byte PremultiplyAlpha(byte channel, byte alpha) => (byte)(channel * alpha / 255.0);
private static byte PremultiplyAlpha(byte channel, byte alpha) => (byte) (channel * alpha / 255.0);
internal static GlowBitmap Create(GlowDrawingContext drawingContext, GlowBitmapPart bitmapPart, Color color)
{
@@ -78,7 +78,7 @@ namespace HandyControl.Data
private static CachedBitmapInfo GetOrCreateAlphaMask(GlowBitmapPart bitmapPart)
{
if (_transparencyMasks[(int)bitmapPart] == null)
if (_transparencyMasks[(int) bitmapPart] == null)
{
var bitmapImage = new BitmapImage(new Uri($"pack://application:,,,/HandyControl;Component/Resources/Images/GlowWindow/{bitmapPart}.png"));
@@ -87,14 +87,14 @@ namespace HandyControl.Data
bitmapImage.CopyPixels(array, stride, 0);
bitmapImage.Freeze();
_transparencyMasks[(int)bitmapPart] =
_transparencyMasks[(int) bitmapPart] =
new CachedBitmapInfo(
array,
bitmapImage.PixelWidth,
bitmapImage.PixelHeight);
}
return _transparencyMasks[(int)bitmapPart];
return _transparencyMasks[(int) bitmapPart];
}
private sealed class CachedBitmapInfo
@@ -6,7 +6,7 @@ namespace HandyControl.Data
internal class GlowDrawingContext : DisposableObject
{
private readonly GlowBitmap _windowBitmap;
internal InteropValues.BLENDFUNCTION Blend;
internal GlowDrawingContext(int width, int height)
@@ -25,8 +25,8 @@ namespace HandyControl.Data
InteropMethods.SelectObject(WindowDC, _windowBitmap.Handle);
}
internal bool IsInitialized =>
ScreenDC != IntPtr.Zero && WindowDC != IntPtr.Zero &&
internal bool IsInitialized =>
ScreenDC != IntPtr.Zero && WindowDC != IntPtr.Zero &&
BackgroundDC != IntPtr.Zero && _windowBitmap != null;
internal IntPtr ScreenDC { get; }
@@ -11,42 +11,42 @@ namespace HandyControl.Data
internal class GlowEdge : HwndWrapper
{
private const string GlowEdgeClassName = "HandyControlGlowEdge";
private const int GlowDepth = 9;
private const int CornerGripThickness = 18;
private static ushort _sharedWindowClassAtom;
// ReSharper disable once NotAccessedField.Local
private static InteropValues.WndProc _sharedWndProc;
private readonly GlowBitmap[] _activeGlowBitmaps = new GlowBitmap[16];
private readonly GlowBitmap[] _inactiveGlowBitmaps = new GlowBitmap[16];
private readonly Dock _orientation;
private readonly GlowWindow _targetWindow;
private Color _activeGlowColor = Colors.Transparent;
private int _height;
private Color _inactiveGlowColor = Colors.Transparent;
private FieldInvalidationTypes _invalidatedValues;
private bool _isActive;
private bool _isVisible;
private int _left;
private bool _pendingDelayRender;
private int _top;
private int _width;
internal static long CreatedGlowEdges { get; private set; }
@@ -69,7 +69,7 @@ namespace HandyControl.Data
if (_sharedWindowClassAtom == 0)
{
var wndclass = default(InteropValues.WNDCLASS);
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hbrBackground = IntPtr.Zero;
@@ -108,7 +108,7 @@ namespace HandyControl.Data
internal int Width
{
get => _width;
set => UpdateProperty( ref _width, value, FieldInvalidationTypes.Size | FieldInvalidationTypes.Render);
set => UpdateProperty(ref _width, value, FieldInvalidationTypes.Size | FieldInvalidationTypes.Render);
}
internal int Height
@@ -183,7 +183,7 @@ namespace HandyControl.Data
if (msg == 6) return IntPtr.Zero;
if (msg == 70)
{
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
var windowpos = (InteropValues.WINDOWPOS) Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
windowpos.flags |= 16u;
Marshal.StructureToPtr(windowpos, lParam, true);
}
@@ -6,4 +6,4 @@
public int TimelineFrameRate { get; set; } = 60;
}
}
}
@@ -7,11 +7,11 @@ namespace HandyControl.Data
public abstract class HwndWrapper : DisposableObject
{
private IntPtr _handle;
private bool _isHandleCreationAllowed = true;
private ushort _wndClassAtom;
private Delegate _wndProc;
protected ushort WindowClassAtom
@@ -99,4 +99,4 @@ namespace HandyControl.Data
DestroyWindowClassCore();
}
}
}
}
@@ -30,4 +30,4 @@ namespace HandyControl.Data
public string Token { get; set; }
}
}
}
@@ -123,7 +123,7 @@ namespace HandyControl.Data
for (index = 0; index < numCodecs; index++)
{
var curcodec = (IntPtr)((long)memoryStart + Marshal.SizeOf(typeof(InteropValues.ImageCodecInfoPrivate)) * index);
var curcodec = (IntPtr) ((long) memoryStart + Marshal.SizeOf(typeof(InteropValues.ImageCodecInfoPrivate)) * index);
var codecp = new InteropValues.ImageCodecInfoPrivate();
InteropMethods.PtrToStructure(curcodec, codecp);
@@ -147,12 +147,12 @@ namespace HandyControl.Data
codecs[index].SignaturePatterns[j] = new byte[codecp.SigSize];
codecs[index].SignatureMasks[j] = new byte[codecp.SigSize];
Marshal.Copy((IntPtr)((long)codecp.SigMask + j * codecp.SigSize), codecs[index].SignatureMasks[j], 0, codecp.SigSize);
Marshal.Copy((IntPtr)((long)codecp.SigPattern + j * codecp.SigSize), codecs[index].SignaturePatterns[j], 0, codecp.SigSize);
Marshal.Copy((IntPtr) ((long) codecp.SigMask + j * codecp.SigSize), codecs[index].SignatureMasks[j], 0, codecp.SigSize);
Marshal.Copy((IntPtr) ((long) codecp.SigPattern + j * codecp.SigSize), codecs[index].SignaturePatterns[j], 0, codecp.SigSize);
}
}
return codecs;
}
}
}
}
@@ -18,4 +18,4 @@ namespace HandyControl.Data
public string StyleKey { get; set; }
}
}
}
@@ -35,7 +35,7 @@ namespace HandyControl.Data
public static bool operator ==(SystemVersionInfo left, SystemVersionInfo right) => left.Equals(right);
public static bool operator !=(SystemVersionInfo left, SystemVersionInfo right) => !(left == right);
public int CompareTo(SystemVersionInfo other)
{
if (Major != other.Major)
@@ -76,4 +76,4 @@ namespace HandyControl.Data
public override string ToString() => $"{Major}.{Minor}.{Build}";
}
}
}
@@ -20,4 +20,4 @@
/// </summary>
public string Message { get; set; }
}
}
}
@@ -22,4 +22,4 @@
};
}
}
}
}
@@ -56,8 +56,8 @@ namespace HandyControl.Data
public Color GetColor(double range)
{
if (range < 0 || range > 1) return default;
return Color.FromArgb((byte)(_start.A - _subColorArr[0] * range), (byte)(_start.R - _subColorArr[1] * range),
(byte)(_start.G - _subColorArr[2] * range), (byte)(_start.B - _subColorArr[3] * range));
return Color.FromArgb((byte) (_start.A - _subColorArr[0] * range), (byte) (_start.R - _subColorArr[1] * range),
(byte) (_start.G - _subColorArr[2] * range), (byte) (_start.B - _subColorArr[3] * range));
}
}
}
}
@@ -17,9 +17,9 @@ namespace HandyControl.Data
}
public DateTime Start { get; set; }
public DateTime End { get; set; }
public double TotalMilliseconds => (End - Start).TotalMilliseconds;
}
}
}
@@ -3,7 +3,7 @@
public struct DoubleRange : IValueRange<double>
{
public double Start { get; set; }
public double End { get; set; }
}
}
@@ -372,4 +372,4 @@
#endregion
}
}
}
@@ -39,4 +39,4 @@
internal static object BooleanBox(bool value) => value ? TrueBox : FalseBox;
}
}
}