Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -44,7 +44,7 @@ namespace HandyControl.Controls
|
||||
|
||||
if (e.NewValue != null)
|
||||
{
|
||||
var v = (Uri)e.NewValue;
|
||||
var v = (Uri) e.NewValue;
|
||||
ctl.GetGifStreamFromPack(v);
|
||||
ctl.StartAnimate();
|
||||
}
|
||||
@@ -62,8 +62,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnVisibilityChanged(DependencyObject s, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (GifImage)s;
|
||||
var v = (Visibility)e.NewValue;
|
||||
var ctl = (GifImage) s;
|
||||
var v = (Visibility) e.NewValue;
|
||||
if (v != Visibility.Visible)
|
||||
{
|
||||
ctl.StopAnimate();
|
||||
@@ -244,8 +244,8 @@ namespace HandyControl.Controls
|
||||
created = dataStream = File.OpenRead(filename);
|
||||
}
|
||||
|
||||
image._rawData = new byte[(int)dataStream.Length];
|
||||
dataStream.Read(image._rawData, 0, (int)dataStream.Length);
|
||||
image._rawData = new byte[(int) dataStream.Length];
|
||||
dataStream.Read(image._rawData, 0, (int) dataStream.Length);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -356,7 +356,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
guids[i] = (Guid)InteropMethods.PtrToStructure((IntPtr)((long)buffer + size * i), typeof(Guid));
|
||||
guids[i] = (Guid) InteropMethods.PtrToStructure((IntPtr) ((long) buffer + size * i), typeof(Guid));
|
||||
}
|
||||
}
|
||||
finally
|
||||
@@ -491,4 +491,4 @@ namespace HandyControl.Controls
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void ImageBlock_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if(IsVisible)
|
||||
if (IsVisible)
|
||||
{
|
||||
_dispatcherTimer.Tick += DispatcherTimer_Tick;
|
||||
if (IsPlaying)
|
||||
@@ -80,11 +80,11 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnPositionsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (ImageBlock)d;
|
||||
var ctl = (ImageBlock) d;
|
||||
|
||||
if (e.Property == ColumnsProperty)
|
||||
{
|
||||
ctl._columns = (int)e.NewValue;
|
||||
ctl._columns = (int) e.NewValue;
|
||||
}
|
||||
|
||||
ctl.UpdateDatas();
|
||||
@@ -138,7 +138,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (ImageBlock)d;
|
||||
var ctl = (ImageBlock) d;
|
||||
if ((bool) e.NewValue)
|
||||
{
|
||||
ctl._dispatcherTimer.Start();
|
||||
@@ -157,7 +157,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public static readonly DependencyProperty ColumnsProperty = DependencyProperty.Register(
|
||||
"Columns", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
|
||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int)obj >= 1);
|
||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int) obj >= 1);
|
||||
|
||||
public int Columns
|
||||
{
|
||||
@@ -167,7 +167,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public static readonly DependencyProperty RowsProperty = DependencyProperty.Register(
|
||||
"Rows", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
|
||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int)obj >= 1);
|
||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int) obj >= 1);
|
||||
|
||||
public int Rows
|
||||
{
|
||||
@@ -196,14 +196,14 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (ImageBlock)d;
|
||||
var ctl = (ImageBlock) d;
|
||||
ctl._source = e.NewValue as BitmapSource;
|
||||
ctl.UpdateDatas();
|
||||
}
|
||||
|
||||
public ImageSource Source
|
||||
{
|
||||
get => (ImageSource)GetValue(SourceProperty);
|
||||
get => (ImageSource) GetValue(SourceProperty);
|
||||
set => SetValue(SourceProperty, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -270,19 +270,19 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool IsFullScreen
|
||||
{
|
||||
get => (bool)GetValue(IsFullScreenProperty);
|
||||
get => (bool) GetValue(IsFullScreenProperty);
|
||||
set => SetValue(IsFullScreenProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
public bool ShowImgMap
|
||||
{
|
||||
get => (bool)GetValue(ShowImgMapProperty);
|
||||
get => (bool) GetValue(ShowImgMapProperty);
|
||||
set => SetValue(ShowImgMapProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
public BitmapFrame ImageSource
|
||||
{
|
||||
get => (BitmapFrame)GetValue(ImageSourceProperty);
|
||||
get => (BitmapFrame) GetValue(ImageSourceProperty);
|
||||
set => SetValue(ImageSourceProperty, value);
|
||||
}
|
||||
|
||||
@@ -294,13 +294,13 @@ namespace HandyControl.Controls
|
||||
|
||||
internal string ImgPath
|
||||
{
|
||||
get => (string)GetValue(ImgPathProperty);
|
||||
get => (string) GetValue(ImgPathProperty);
|
||||
set => SetValue(ImgPathProperty, value);
|
||||
}
|
||||
|
||||
internal long ImgSize
|
||||
{
|
||||
get => (long)GetValue(ImgSizeProperty);
|
||||
get => (long) GetValue(ImgSizeProperty);
|
||||
set => SetValue(ImgSizeProperty, value);
|
||||
}
|
||||
|
||||
@@ -309,49 +309,49 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
internal bool ShowFullScreenButton
|
||||
{
|
||||
get => (bool)GetValue(ShowFullScreenButtonProperty);
|
||||
get => (bool) GetValue(ShowFullScreenButtonProperty);
|
||||
set => SetValue(ShowFullScreenButtonProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
internal Thickness ImageMargin
|
||||
{
|
||||
get => (Thickness)GetValue(ImageMarginProperty);
|
||||
get => (Thickness) GetValue(ImageMarginProperty);
|
||||
set => SetValue(ImageMarginProperty, value);
|
||||
}
|
||||
|
||||
internal double ImageWidth
|
||||
{
|
||||
get => (double)GetValue(ImageWidthProperty);
|
||||
get => (double) GetValue(ImageWidthProperty);
|
||||
set => SetValue(ImageWidthProperty, value);
|
||||
}
|
||||
|
||||
internal double ImageHeight
|
||||
{
|
||||
get => (double)GetValue(ImageHeightProperty);
|
||||
get => (double) GetValue(ImageHeightProperty);
|
||||
set => SetValue(ImageHeightProperty, value);
|
||||
}
|
||||
|
||||
internal double ImageScale
|
||||
{
|
||||
get => (double)GetValue(ImageScaleProperty);
|
||||
get => (double) GetValue(ImageScaleProperty);
|
||||
set => SetValue(ImageScaleProperty, value);
|
||||
}
|
||||
|
||||
internal string ScaleStr
|
||||
{
|
||||
get => (string)GetValue(ScaleStrProperty);
|
||||
get => (string) GetValue(ScaleStrProperty);
|
||||
set => SetValue(ScaleStrProperty, value);
|
||||
}
|
||||
|
||||
internal double ImageRotate
|
||||
{
|
||||
get => (double)GetValue(ImageRotateProperty);
|
||||
get => (double) GetValue(ImageRotateProperty);
|
||||
set => SetValue(ImageRotateProperty, value);
|
||||
}
|
||||
|
||||
internal bool ShowSmallImgInternal
|
||||
{
|
||||
get => (bool)GetValue(ShowSmallImgInternalProperty);
|
||||
get => (bool) GetValue(ShowSmallImgInternalProperty);
|
||||
set => SetValue(ShowSmallImgInternalProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
internal bool ShowCloseButton
|
||||
{
|
||||
get => (bool)GetValue(ShowCloseButtonProperty);
|
||||
get => (bool) GetValue(ShowCloseButtonProperty);
|
||||
set => SetValue(ShowCloseButtonProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
@@ -811,7 +811,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_imgActualRotate = rotate;
|
||||
|
||||
_isOblique = ((int)_imgActualRotate - 90) % 180 == 0;
|
||||
_isOblique = ((int) _imgActualRotate - 90) % 180 == 0;
|
||||
ShowSmallImgInternal = false;
|
||||
Init();
|
||||
InitBorderSmall();
|
||||
@@ -918,4 +918,4 @@ namespace HandyControl.Controls
|
||||
|
||||
private void CanvasSmallImg_OnMouseLeave(object sender, MouseEventArgs e) => _imgSmallIsMouseLeftButtonDown = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user