Skip to content

Commit

Permalink
Fix Format (#7500)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarinho authored May 26, 2022
1 parent d0f4458 commit a35b985
Show file tree
Hide file tree
Showing 130 changed files with 860 additions and 853 deletions.
2 changes: 1 addition & 1 deletion src/BlazorWebView/tests/MauiDeviceTests/TestBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
using Microsoft.Maui.Dispatching;
using Microsoft.Maui.DeviceTests;
using Microsoft.Maui.Dispatching;
using Microsoft.Maui.TestUtils.DeviceTests.Runners;

namespace Microsoft.Maui.MauiBlazorWebView.DeviceTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected override void OnAppearing()

void OnTimerElapsed()
{
Label.Text = $"{ DateTime.Now.ToString() }: expecting {ScrollContent?.Children.Count} dates to show up.";
Label.Text = $"{DateTime.Now.ToString()}: expecting {ScrollContent?.Children.Count} dates to show up.";
ScrollContent.Children.Add(new Label { Text = DateTime.Now.ToString() });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected override void OnElementChanged(ElementChangedEventArgs<Issue11132Contr
layer.Mask = clipShapeLayer;
layer.Mask.Name = null;

Debug.WriteLine($"_11132CustomRenderer Layer Name { layer.Mask.Name}");
Debug.WriteLine($"_11132CustomRenderer Layer Name {layer.Mask.Name}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected override void OnElementPropertyChanged(object sender, PropertyChangedE
UpdateTextColor();
else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName)
UpdateEnabled();
else if ( e.PropertyName == FontElement.FontAttributesProperty.PropertyName
else if (e.PropertyName == FontElement.FontAttributesProperty.PropertyName
|| e.PropertyName == FontElement.FontAutoScalingEnabledProperty.PropertyName
|| e.PropertyName == FontElement.FontFamilyProperty.PropertyName
|| e.PropertyName == FontElement.FontSizeProperty.PropertyName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected virtual void OnElementPropertyChanged(object sender, PropertyChangedEv
{
UpdateTextColor();
}
else if ( e.PropertyName == FontElement.FontAttributesProperty.PropertyName
else if (e.PropertyName == FontElement.FontAttributesProperty.PropertyName
|| e.PropertyName == FontElement.FontAutoScalingEnabledProperty.PropertyName
|| e.PropertyName == FontElement.FontFamilyProperty.PropertyName
|| e.PropertyName == FontElement.FontSizeProperty.PropertyName)
Expand Down
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/iOS/Renderers/ButtonRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected override void OnElementPropertyChanged(object sender, PropertyChangedE

if (e.PropertyName == Button.TextColorProperty.PropertyName)
UpdateTextColor();
else if ( e.PropertyName == FontElement.FontAttributesProperty.PropertyName
else if (e.PropertyName == FontElement.FontAttributesProperty.PropertyName
|| e.PropertyName == FontElement.FontAutoScalingEnabledProperty.PropertyName
|| e.PropertyName == FontElement.FontFamilyProperty.PropertyName
|| e.PropertyName == FontElement.FontSizeProperty.PropertyName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ public EmptyViewNullGallery(bool useOnlyText = true)
InitializeComponent();
string emptyViewText = "Nothing to display.";
CollectionView.EmptyView = useOnlyText ? emptyViewText :
new Grid { Children = { new Label
new Grid
{
Children = { new Label
{
Text = emptyViewText,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
FontAttributes = FontAttributes.Bold
} } };
} }
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void GenerateEmptyObservableCollectionAndAddItemsEverySecond(bool resetBe
Dispatcher.StartTimer(TimeSpan.FromSeconds(1), () =>
{
//this test a issue with events firing out of order on IOS Obs Source
if(resetBeforeAddItems)
if (resetBeforeAddItems)
{
items.Clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Storage;
using Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;

namespace Maui.Controls.Sample.Pages
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void OnContentBackgroundCheckBoxChanged(object sender, CheckedChangedEventArgs e
{
UpdateContentBackground();
}

void UpdateBorderShape()
{
CornerRadiusLayout.IsVisible = BorderShapePicker.SelectedIndex == 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ItemClicked(object sender, EventArgs e)
{
if (sender is MenuFlyoutItem mfi)
{
menuLabel.Text = $"You clicked on Menu Item: { mfi.Text}";
menuLabel.Text = $"You clicked on Menu Item: {mfi.Text}";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ModalPage()

protected override void OnNavigatingFrom(NavigatingFromEventArgs args)
{
_previousTitle = this.Window?.Title;
_previousTitle = this.Window?.Title;
base.OnNavigatingFrom(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ void UpdateInteractions(string name, TouchEventArgs e)
labelInteractions.Text = $"{name}: "
+ string.Join(", ", e.Touches.Select(t => $"[{Math.Round(t.X, 1)},{Math.Round(t.Y, 1)}]"))
+ $" IsInsideBounds: {e.IsInsideBounds}");

Dispatcher.DispatchAsync(() =>
labelGestures.Text = string.Empty);
}

void UpdateGestures(string name)
{
Dispatcher.DispatchAsync(() =>
Dispatcher.DispatchAsync(() =>
labelGestures.Text = $"{name}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidButtonPage : ContentPage
{
public AndroidButtonPage()
{
InitializeComponent();
}
}
public partial class AndroidButtonPage : ContentPage
{
public AndroidButtonPage()
{
InitializeComponent();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidEntryPage : ContentPage
{
public AndroidEntryPage()
{
InitializeComponent();
}
public partial class AndroidEntryPage : ContentPage
{
public AndroidEntryPage()
{
InitializeComponent();
}

void OnSelectedIndexChanged(object sender, EventArgs e)
{
ImeFlags flag = (ImeFlags)Enum.Parse(typeof(ImeFlags), _picker.SelectedItem.ToString());
_entry.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetImeOptions(flag);
_label.Text = $"ImeOptions: {_entry.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().ImeOptions()}";
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using System;
using Maui.Controls.Sample.ViewModels;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;
using Maui.Controls.Sample.ViewModels;

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidListViewFastScrollPage : ContentPage
{
public AndroidListViewFastScrollPage()
{
InitializeComponent();
BindingContext = new ListViewViewModel();
}
public partial class AndroidListViewFastScrollPage : ContentPage
{
public AndroidListViewFastScrollPage()
{
InitializeComponent();
BindingContext = new ListViewViewModel();
}

void OnButtonClicked(object sender, EventArgs e)
{
listView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsFastScrollEnabled(!listView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsFastScrollEnabled());
}
}
void OnButtonClicked(object sender, EventArgs e)
{
listView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsFastScrollEnabled(!listView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsFastScrollEnabled());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidNavigationPage : NavigationPage
{
public AndroidNavigationPage()
{
InitializeComponent();
PushAsync(new AndroidTitleViewPage());
}
}
public partial class AndroidNavigationPage : NavigationPage
{
public AndroidNavigationPage()
{
InitializeComponent();
PushAsync(new AndroidTitleViewPage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidSwipeViewTransitionModePage : ContentPage
{
public AndroidSwipeViewTransitionModePage()
{
InitializeComponent();
}
public partial class AndroidSwipeViewTransitionModePage : ContentPage
{
public AndroidSwipeViewTransitionModePage()
{
InitializeComponent();
}

void OnSwipeViewTransitionModeChanged(object sender, EventArgs e)
{
SwipeTransitionMode transitionMode = (SwipeTransitionMode)(sender as EnumPicker).SelectedItem;
swipeView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetSwipeTransitionMode(transitionMode);
}
void OnSwipeViewTransitionModeChanged(object sender, EventArgs e)
{
SwipeTransitionMode transitionMode = (SwipeTransitionMode)(sender as EnumPicker).SelectedItem;
swipeView.On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetSwipeTransitionMode(transitionMode);
}

async void OnDeleteSwipeItemInvoked(object sender, EventArgs e)
{
await DisplayAlert("SwipeView", "Delete invoked.", "OK");
}
}
async void OnDeleteSwipeItemInvoked(object sender, EventArgs e)
{
await DisplayAlert("SwipeView", "Delete invoked.", "OK");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidTabbedPageSwipePage : Microsoft.Maui.Controls.TabbedPage
{
ICommand _returnToPlatformSpecificsPage;
public partial class AndroidTabbedPageSwipePage : Microsoft.Maui.Controls.TabbedPage
{
ICommand _returnToPlatformSpecificsPage;

public AndroidTabbedPageSwipePage()
{
InitializeComponent();
}
public AndroidTabbedPageSwipePage()
{
InitializeComponent();
}

public AndroidTabbedPageSwipePage(ICommand restore)
{
InitializeComponent();
public AndroidTabbedPageSwipePage(ICommand restore)
{
InitializeComponent();

_returnToPlatformSpecificsPage = restore;
}
_returnToPlatformSpecificsPage = restore;
}

void OnSwipePagingButtonClicked(object sender, EventArgs e)
{
On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsSwipePagingEnabled(!On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsSwipePagingEnabled());
}
void OnSwipePagingButtonClicked(object sender, EventArgs e)
{
On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsSwipePagingEnabled(!On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsSwipePagingEnabled());
}

void OnSmoothScrollButtonClicked(object sender, EventArgs e)
{
On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsSmoothScrollEnabled(!On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsSmoothScrollEnabled());
}
void OnSmoothScrollButtonClicked(object sender, EventArgs e)
{
On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetIsSmoothScrollEnabled(!On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().IsSmoothScrollEnabled());
}

void OnReturnButtonClicked(object sender, EventArgs e)
{
_returnToPlatformSpecificsPage?.Execute(null);
}
}
void OnReturnButtonClicked(object sender, EventArgs e)
{
_returnToPlatformSpecificsPage?.Execute(null);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
using Microsoft.Maui.Controls;
using System;
using System;
using System.Windows.Input;
using Microsoft.Maui.Controls;

namespace Maui.Controls.Sample.Pages
{
public partial class AndroidTitleViewPage : ContentPage
{
readonly ICommand _returnToPlatformSpecificsPage;
public partial class AndroidTitleViewPage : ContentPage
{
readonly ICommand _returnToPlatformSpecificsPage;

public AndroidTitleViewPage()
{
InitializeComponent();
}
public AndroidTitleViewPage()
{
InitializeComponent();
}

public AndroidTitleViewPage(ICommand restore)
{
InitializeComponent();
_returnToPlatformSpecificsPage = restore;
}
public AndroidTitleViewPage(ICommand restore)
{
InitializeComponent();
_returnToPlatformSpecificsPage = restore;
}

void OnReturnButtonClicked(object sender, EventArgs e)
{
if (_returnToPlatformSpecificsPage == null)
return;
void OnReturnButtonClicked(object sender, EventArgs e)
{
if (_returnToPlatformSpecificsPage == null)
return;

_returnToPlatformSpecificsPage.Execute(null);
}
}
_returnToPlatformSpecificsPage.Execute(null);
}
}
}
Loading

0 comments on commit a35b985

Please sign in to comment.