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

@@ -77,7 +77,7 @@ namespace HandyControl.Controls
public string DateTimeFormat
{
get => (string)GetValue(DateTimeFormatProperty);
get => (string) GetValue(DateTimeFormatProperty);
set => SetValue(DateTimeFormatProperty, value);
}
@@ -86,7 +86,7 @@ namespace HandyControl.Controls
public bool ShowConfirmButton
{
get => (bool)GetValue(ShowConfirmButtonProperty);
get => (bool) GetValue(ShowConfirmButtonProperty);
set => SetValue(ShowConfirmButtonProperty, ValueBoxes.BooleanBox(value));
}
@@ -95,8 +95,8 @@ namespace HandyControl.Controls
private static void OnSelectedDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (CalendarWithClock)d;
var v = (DateTime?)e.NewValue;
var ctl = (CalendarWithClock) d;
var v = (DateTime?) e.NewValue;
ctl.OnSelectedDateTimeChanged(new FunctionEventArgs<DateTime?>(SelectedDateTimeChangedEvent, ctl)
{
Info = v
@@ -105,7 +105,7 @@ namespace HandyControl.Controls
public DateTime? SelectedDateTime
{
get => (DateTime?)GetValue(SelectedDateTimeProperty);
get => (DateTime?) GetValue(SelectedDateTimeProperty);
set => SetValue(SelectedDateTimeProperty, value);
}
@@ -114,9 +114,9 @@ namespace HandyControl.Controls
private static void OnDisplayDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (CalendarWithClock)d;
var ctl = (CalendarWithClock) d;
if (ctl.IsHandlerSuspended(DisplayDateTimeProperty)) return;
var v = (DateTime)e.NewValue;
var v = (DateTime) e.NewValue;
ctl._clock.SelectedTime = v;
ctl._calendar.SelectedDate = v;
ctl.OnDisplayDateTimeChanged(new FunctionEventArgs<DateTime>(v));
@@ -124,7 +124,7 @@ namespace HandyControl.Controls
public DateTime DisplayDateTime
{
get => (DateTime)GetValue(DisplayDateTimeProperty);
get => (DateTime) GetValue(DisplayDateTimeProperty);
set => SetValue(DisplayDateTimeProperty, value);
}
@@ -257,4 +257,4 @@ namespace HandyControl.Controls
#endregion
}
}
}
@@ -203,7 +203,7 @@ namespace HandyControl.Controls
private void Canvas_OnMouseWheel(object sender, MouseWheelEventArgs e)
{
var value = (int)_rotateTransformClock.Angle;
var value = (int) _rotateTransformClock.Angle;
if (e.Delta < 0)
{
value += 6;
@@ -297,7 +297,7 @@ namespace HandyControl.Controls
var hRest = h % 12;
if (hRest == 0) hRest = 12;
var ctl = _radioButtonList[hRest-1];
var ctl = _radioButtonList[hRest - 1];
ctl.IsChecked = true;
ctl.RaiseEvent(new RoutedEventArgs { RoutedEvent = ButtonBase.ClickEvent });
@@ -322,7 +322,7 @@ namespace HandyControl.Controls
hValue = 0;
}
var now = DateTime.Now;
return new DateTime(now.Year, now.Month, now.Day, hValue, (int)Math.Abs(_rotateTransformClock.Angle) % 360 / 6, _secValue);
return new DateTime(now.Year, now.Month, now.Day, hValue, (int) Math.Abs(_rotateTransformClock.Angle) % 360 / 6, _secValue);
}
private void ButtonAm_OnClick(object sender, RoutedEventArgs e) => Update();
@@ -331,4 +331,4 @@ namespace HandyControl.Controls
#endregion Private Methods
}
}
}
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
public string TimeFormat
{
get => (string)GetValue(TimeFormatProperty);
get => (string) GetValue(TimeFormatProperty);
set => SetValue(TimeFormatProperty, value);
}
@@ -42,8 +42,8 @@ namespace HandyControl.Controls
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (ClockBase)d;
var v = (DateTime?)e.NewValue;
var ctl = (ClockBase) d;
var v = (DateTime?) e.NewValue;
ctl.DisplayTime = v ?? DateTime.Now;
ctl.OnSelectedTimeChanged(new FunctionEventArgs<DateTime?>(SelectedTimeChangedEvent, ctl)
{
@@ -64,15 +64,15 @@ namespace HandyControl.Controls
private static void OnDisplayTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (ClockBase)d;
var v = (DateTime)e.NewValue;
var ctl = (ClockBase) d;
var v = (DateTime) e.NewValue;
ctl.Update(v);
ctl.OnDisplayTimeChanged(new FunctionEventArgs<DateTime>(v));
}
public DateTime DisplayTime
{
get => (DateTime)GetValue(DisplayTimeProperty);
get => (DateTime) GetValue(DisplayTimeProperty);
set => SetValue(DisplayTimeProperty, value);
}
@@ -103,4 +103,4 @@ namespace HandyControl.Controls
protected void Clock_SelectedTimeChanged(object sender, FunctionEventArgs<DateTime?> e) => SelectedTime = e.Info;
}
}
}
@@ -7,4 +7,4 @@ namespace HandyControl.Controls
{
public int Num { get; set; }
}
}
}
@@ -145,4 +145,4 @@ namespace HandyControl.Controls
DisplayTime = time;
}
}
}
}
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
private bool _isDisposed;
public static readonly DependencyProperty NumberListProperty = DependencyProperty.Register(
"NumberList", typeof(List<int>), typeof(FlipClock), new PropertyMetadata(new List<int> {0, 0, 0, 0, 0, 0}));
"NumberList", typeof(List<int>), typeof(FlipClock), new PropertyMetadata(new List<int> { 0, 0, 0, 0, 0, 0 }));
public List<int> NumberList
{
@@ -85,4 +85,4 @@ namespace HandyControl.Controls
private void DispatcherTimer_Tick(object sender, EventArgs e) => DisplayTime = DateTime.Now;
}
}
}
@@ -40,7 +40,7 @@ namespace HandyControl.Controls
public CornerRadius CornerRadius
{
get => (CornerRadius)GetValue(CornerRadiusProperty);
get => (CornerRadius) GetValue(CornerRadiusProperty);
set => SetValue(CornerRadiusProperty, value);
}
@@ -49,7 +49,7 @@ namespace HandyControl.Controls
public Brush Background
{
get => (Brush)GetValue(BackgroundProperty);
get => (Brush) GetValue(BackgroundProperty);
set => SetValue(BackgroundProperty, value);
}
@@ -58,7 +58,7 @@ namespace HandyControl.Controls
public Brush Foreground
{
get => (Brush)GetValue(ForegroundProperty);
get => (Brush) GetValue(ForegroundProperty);
set => SetValue(ForegroundProperty, value);
}
@@ -68,7 +68,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize
{
get => (double)GetValue(FontSizeProperty);
get => (double) GetValue(FontSizeProperty);
set => SetValue(FontSizeProperty, value);
}
@@ -76,11 +76,11 @@ namespace HandyControl.Controls
"Number", typeof(int), typeof(FlipNumber), new PropertyMetadata(ValueBoxes.Int0Box, OnNumberChanged));
private static void OnNumberChanged(DependencyObject s, DependencyPropertyChangedEventArgs e) =>
((FlipNumber)s).OnNumberChanged();
((FlipNumber) s).OnNumberChanged();
public int Number
{
get => (int)GetValue(NumberProperty);
get => (int) GetValue(NumberProperty);
set => SetValue(NumberProperty, value);
}
@@ -281,4 +281,4 @@ namespace HandyControl.Controls
return child;
}
}
}
}
@@ -48,4 +48,4 @@ namespace HandyControl.Controls
/// <param name="offsetX"></param>
public void MoveX(double offsetX) => Canvas.SetLeft(this, X + offsetX);
}
}
}
@@ -78,7 +78,7 @@ namespace HandyControl.Controls
/// </summary>
public bool ShowSpeStr
{
get => (bool)GetValue(ShowSpeStrProperty);
get => (bool) GetValue(ShowSpeStrProperty);
set => SetValue(ShowSpeStrProperty, ValueBoxes.BooleanBox(value));
}
@@ -102,7 +102,7 @@ namespace HandyControl.Controls
/// </summary>
internal string SpeStr
{
get => (string)GetValue(SpeStrProperty);
get => (string) GetValue(SpeStrProperty);
set => SetValue(SpeStrProperty, value);
}
@@ -116,7 +116,7 @@ namespace HandyControl.Controls
{
if (d is TimeBar timeBar && timeBar._textBlockSelected != null)
{
timeBar.OnSelectedTimeChanged((DateTime)e.NewValue);
timeBar.OnSelectedTimeChanged((DateTime) e.NewValue);
}
}
@@ -125,7 +125,7 @@ namespace HandyControl.Controls
/// </summary>
public DateTime SelectedTime
{
get => (DateTime)GetValue(SelectedTimeProperty);
get => (DateTime) GetValue(SelectedTimeProperty);
set => SetValue(SelectedTimeProperty, value);
}
@@ -237,7 +237,7 @@ namespace HandyControl.Controls
_dateTimeRanges.Add(item);
}
}
else if(e.Action == NotifyCollectionChangedAction.Remove)
else if (e.Action == NotifyCollectionChangedAction.Remove)
{
foreach (DateTimeRange item in e.OldItems)
{
@@ -300,7 +300,7 @@ namespace HandyControl.Controls
private void CheckNull()
{
if (_borderTop == null || _textBlockMove == null|| _textBlockSelected == null || _canvasSpe == null) throw new Exception();
if (_borderTop == null || _textBlockMove == null || _textBlockSelected == null || _canvasSpe == null) throw new Exception();
}
/// <summary>
@@ -474,10 +474,10 @@ namespace HandyControl.Controls
private void Update()
{
if (_canvasSpe == null) return;
_speBlockList.Clear();
_canvasSpe.Children.Clear();
_speCount = (int)(ActualWidth / 800 * 9) | 1;
_speCount = (int) (ActualWidth / 800 * 9) | 1;
var itemWidthOld = _itemWidth;
_itemWidth = ActualWidth / _speCount;
@@ -505,7 +505,7 @@ namespace HandyControl.Controls
{
SetSpeTimeFormat("HH:mm:ss");
}
ShowSpeStr = ActualWidth > 320;
for (var i = 0; i < _speCount; i++)
{
@@ -580,7 +580,7 @@ namespace HandyControl.Controls
var set = _dateTimeRanges.GetViewBetween(new DateTimeRange(start), new DateTimeRange(end));
var unitLength = ActualWidth / mlliseconds * 0.5;
foreach (var range in set)
{
var width = range.TotalMilliseconds * unitLength;
@@ -597,4 +597,4 @@ namespace HandyControl.Controls
}
}
}
}
}