Skip to content

Commit

Permalink
Fix typos in code (dotnet#10795)
Browse files Browse the repository at this point in the history
  • Loading branch information
samhouts authored Oct 20, 2022
1 parent b6cbc76 commit 295594b
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public MacOSTestGallery()

scroller.Scrolled += (sender, e) =>
{
lbl.Text = $"Current postion {scroller.ScrollY}";
lbl.Text = $"Current Position {scroller.ScrollY}";
};

scroller.Content = mainStck;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,25 @@ public void CarouselViewObservableCollection(string subgallery)
{
App.WaitForElement("lblPosition");

string GetPostion()
string GetPosition()
{
return App.Query(c => c.Marked("lblPosition")).First().Text;
}

Assert.AreEqual("0", GetPostion());
Assert.AreEqual("0", GetPosition());
App.Tap("btnNewObservable");
Assert.AreEqual("0", GetPostion());
Assert.AreEqual("0", GetPosition());

SwipeRightToLeft();

App.Tap("btnAddObservable");
Assert.AreEqual("0", GetPostion());
Assert.AreEqual("0", GetPosition());

SwipeRightToLeft();
Assert.AreEqual("1", GetPostion());
Assert.AreEqual("1", GetPosition());

SwipeRightToLeft();
Assert.AreEqual("2", GetPostion());
Assert.AreEqual("2", GetPosition());
}
finally
{
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Graphics/PaintExtensions.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public static partial class PaintExtensions
return drawable;
}

static bool IsValid(this GradientPaint? gradienPaint) =>
gradienPaint?.GradientStops?.Length > 0;
static bool IsValid(this GradientPaint? gradientPaint) =>
gradientPaint?.GradientStops?.Length > 0;

internal static GradientData GetGradientPaintData(GradientPaint gradientPaint, float alpha = 1.0f)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Graphics/PaintExtensions.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static TColor ToPlatform(this Paint paint)
};
}

static bool IsValid(this GradientPaint? gradienPaint) =>
gradienPaint?.GradientStops?.Length > 0;
static bool IsValid(this GradientPaint? gradientPaint) =>
gradientPaint?.GradientStops?.Length > 0;
}
}
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Editor/EditorHandler.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ void OnTextChanged(object? sender, Android.Text.TextChangedEventArgs e) =>

private void OnSelectionChanged(object? sender, EventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.GetSelectedTextLength();

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Editor/EditorHandler.Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ void OnPlatformLoaded(object sender, RoutedEventArgs e) =>

private void OnSelectionChanged(object sender, RoutedEventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.SelectionLength;

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ void OnTextPropertySet(object? sender, EventArgs e) =>

private void OnSelectionChanged(object? sender, EventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.GetSelectedTextLength();

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Entry/EntryHandler.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ void OnEditorAction(object? sender, EditorActionEventArgs e)

private void OnSelectionChanged(object? sender, EventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.GetSelectedTextLength();

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Entry/EntryHandler.Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ void OnPlatformKeyUp(object? sender, KeyRoutedEventArgs args)

void OnPlatformSelectionChanged(object sender, RoutedEventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.SelectionLength;

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/Entry/EntryHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ bool OnShouldChangeCharacters(UITextField textField, NSRange range, string repla

private void OnSelectionChanged(object? sender, EventArgs e)
{
var cursorPostion = PlatformView.GetCursorPosition();
var cursorPosition = PlatformView.GetCursorPosition();
var selectedTextLength = PlatformView.GetSelectedTextLength();

if (VirtualView.CursorPosition != cursorPostion)
VirtualView.CursorPosition = cursorPostion;
if (VirtualView.CursorPosition != cursorPosition)
VirtualView.CursorPosition = cursorPosition;

if (VirtualView.SelectionLength != selectedTextLength)
VirtualView.SelectionLength = selectedTextLength;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/FlyoutView/FlyoutViewHandler.Windows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ protected override RootNavigationView CreatePlatformView()
protected override void ConnectHandler(RootNavigationView platformView)
{
_navigationRootManager = MauiContext?.GetNavigationRootManager();
platformView.PaneOpened += OnPaneOepened;
platformView.PaneOpened += OnPaneOpened;
}

protected override void DisconnectHandler(RootNavigationView platformView)
{
platformView.PaneOpened -= OnPaneOepened;
platformView.PaneOpened -= OnPaneOpened;
}

void OnPaneOepened(NavigationView sender, object args)
void OnPaneOpened(NavigationView sender, object args)
{
VirtualView.IsPresented = sender.IsPaneOpen;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Platform/Tizen/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ internal static Rect GetPlatformViewBounds(this NView platformView)
{
if (platformView == null)
return new Rect();
var screenPostion = platformView.ScreenPosition;
return new TRect(screenPostion.X, screenPostion.Y, platformView.SizeWidth, platformView.SizeHeight).ToDP();
var screenPosition = platformView.ScreenPosition;
return new TRect(screenPosition.X, screenPosition.Y, platformView.SizeWidth, platformView.SizeHeight).ToDP();
}

internal static Matrix4x4 GetViewTransform(this IView view)
Expand Down

0 comments on commit 295594b

Please sign in to comment.