Skip to content

Commit 5757161

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 383c544 + cf03965 commit 5757161

File tree

84 files changed

+1606
-1754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1606
-1754
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ csharp_indent_labels = one_less_than_current
3737
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
3838

3939
# use this.
40-
dotnet_style_qualification_for_field = true:none
40+
dotnet_style_qualification_for_field = false:none
4141
dotnet_style_qualification_for_property = true:none
4242
dotnet_style_qualification_for_method = true:none
4343
dotnet_style_qualification_for_event = true:none

AuroraControls.TestApp/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public partial class App : Application
66

77
public App(MainPage mainPage)
88
{
9-
this._mainPage = mainPage;
9+
_mainPage = mainPage;
1010
InitializeComponent();
1111
}
1212

AuroraControls.TestApp/ImageProcessing.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public ImageProcessing()
2626
_scale = new AuroraControls.ImageProcessing.Scale();
2727
_sepia = new AuroraControls.ImageProcessing.Sepia();
2828

29-
this._imageProcessing.AddRange([_blur, _circular, _grayscale, _invert, _scale, _sepia]);
29+
_imageProcessing.AddRange([_blur, _circular, _grayscale, _invert, _scale, _sepia]);
3030
}
3131

3232
private void Handle_ValueChanged(object? sender, ValueChangedEventArgs e)
@@ -41,7 +41,7 @@ private void Handle_Clicked(object? sender, System.EventArgs e)
4141
_index = 0;
4242
}
4343

44-
var processingEffect = this._imageProcessing.ElementAt(_index);
44+
var processingEffect = _imageProcessing.ElementAt(_index);
4545

4646
if (ImageProcessingEffect.ImageProcessingEffects.Contains(processingEffect))
4747
{

AuroraControls.TestApp/MainPage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ await this.Navigation.PushAsync(new ConfettiViewTestPage())),
191191
Placeholder = "Nullable Date Picker",
192192
Content =
193193
new CalendarPicker()
194-
.Assign(out this._calendarPicker),
194+
.Assign(out _calendarPicker),
195195
},
196196
new Button { Text = "Clear Nullable Date Picker", }
197197
.Assign(out _clearNullableDatePicker),
@@ -512,13 +512,13 @@ await this.Navigation.PushAsync(new ConfettiViewTestPage())),
512512
},
513513
};
514514

515-
this._clearNullableDatePicker.Clicked +=
516-
(sender, args) => { this._calendarPicker.Date = null; };
515+
_clearNullableDatePicker.Clicked +=
516+
(sender, args) => { _calendarPicker.Date = null; };
517517

518-
this._svgImageViewTapped.Clicked +=
518+
_svgImageViewTapped.Clicked +=
519519
(sender, args) =>
520520
{
521-
this._svgImageView.VisualEffects.Clear();
521+
_svgImageView.VisualEffects.Clear();
522522

523523
var rngesus = new Random(Guid.NewGuid().GetHashCode());
524524

AuroraControls.TestApp/TouchDrawLettersImagePage.xaml.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,40 @@ public TouchDrawLettersImagePage()
2323

2424
private void AddLetter_Clicked(object sender, System.EventArgs e)
2525
{
26-
this._counter++;
26+
_counter++;
2727

2828
this.control
2929
.TouchDrawLetters
3030
.Add(
3131
new TouchDrawLetter
3232
{
33-
Value = this._counter.ToString(),
33+
Value = _counter.ToString(),
3434
ForegroundColorOverride =
35-
Color.FromRgba(this._rngesus.Next(0, 255), this._rngesus.Next(0, 255), this._rngesus.Next(0, 255),
36-
this._rngesus.Next(0, 255)),
37-
BackgroundColorOverride = Color.FromRgba(this._rngesus.Next(0, 255), this._rngesus.Next(0, 255),
38-
this._rngesus.Next(0, 255), this._rngesus.Next(0, 255)),
35+
Color.FromRgba(_rngesus.Next(0, 255), _rngesus.Next(0, 255), _rngesus.Next(0, 255),
36+
_rngesus.Next(0, 255)),
37+
BackgroundColorOverride = Color.FromRgba(_rngesus.Next(0, 255), _rngesus.Next(0, 255),
38+
_rngesus.Next(0, 255), _rngesus.Next(0, 255)),
3939
});
4040

4141
this.control.VisualEffects.Add(
4242
new Watermark
4343
{
44-
WatermarkText = $"Eight-Bot {this._counter}",
45-
FontSize = this._fontSize++,
44+
WatermarkText = $"Eight-Bot {_counter}",
45+
FontSize = _fontSize++,
4646
ForegroundColor =
47-
Color.FromRgba(this._rngesus.Next(0, 255), this._rngesus.Next(0, 255), this._rngesus.Next(0, 255),
48-
this._rngesus.Next(0, 255)),
47+
Color.FromRgba(_rngesus.Next(0, 255), _rngesus.Next(0, 255), _rngesus.Next(0, 255),
48+
_rngesus.Next(0, 255)),
4949
BackgroundColor =
50-
Color.FromRgba(this._rngesus.Next(0, 255), this._rngesus.Next(0, 255), this._rngesus.Next(0, 255),
51-
this._rngesus.Next(0, 255)),
52-
HorizontalWatermarkLocation = Extensions.RandomEnum<Watermark.WatermarkLocation>(this._rngesus),
53-
VerticalWatermarkLocation = Extensions.RandomEnum<Watermark.WatermarkLocation>(this._rngesus),
50+
Color.FromRgba(_rngesus.Next(0, 255), _rngesus.Next(0, 255), _rngesus.Next(0, 255),
51+
_rngesus.Next(0, 255)),
52+
HorizontalWatermarkLocation = Extensions.RandomEnum<Watermark.WatermarkLocation>(_rngesus),
53+
VerticalWatermarkLocation = Extensions.RandomEnum<Watermark.WatermarkLocation>(_rngesus),
5454
});
5555
}
5656

5757
private async void Export_Clicked(object sender, System.EventArgs e)
5858
{
59-
this._counter = 'A';
59+
_counter = 'A';
6060

6161
var fileName = $"touchletters-{Guid.NewGuid()}.jpg";
6262
var outputFile = Path.Combine(FileSystem.CacheDirectory, $"dest-{fileName}");

AuroraControlsMaui/AuroraControlBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public static MauiAppBuilder UseAuroraControls(this MauiAppBuilder mauiAppBuilde
5454
#if ANDROID
5555
mauiAppBuilder.Services.AddSingleton<IIconCache, AuroraControls.Platforms.Android.IconCache>();
5656
#elif IOS
57-
mauiAppBuilder.Services.AddSingleton<IIconCache, AuroraControls.Platforms.iOS.IconCache>();
57+
mauiAppBuilder.Services.AddSingleton<IIconCache, Platforms.iOS.IconCache>();
5858
#elif MACCATALYST
59-
mauiAppBuilder.Services.AddSingleton<IIconCache, AuroraControls.Platforms.MacCatalyst.IconCache>();
59+
mauiAppBuilder.Services.AddSingleton<IIconCache, Platforms.MacCatalyst.IconCache>();
6060
#endif
6161

6262
return mauiAppBuilder;

AuroraControlsMaui/AuroraGLViewBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private void PaintSurfaceInternal(SKSurface surface, GRBackendRenderTarget rende
132132
{
133133
var image = surface.Snapshot();
134134

135-
if (_overrideDrawableArea != default(SKRect))
135+
if (_overrideDrawableArea != default)
136136
{
137137
surface.Canvas.ClipRect(_overrideDrawableArea);
138138
}

AuroraControlsMaui/AuroraViewBase.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,32 @@ public Stream ExportImage(SKEncodedImageFormat imageFormat, int quality = 85, in
3535
switch (maxWidth)
3636
{
3737
case <= 0 when maxHeight <= 0:
38-
width = (int)this._overrideDrawableArea.Width;
39-
height = height = (int)this._overrideDrawableArea.Height;
38+
width = (int)_overrideDrawableArea.Width;
39+
height = height = (int)_overrideDrawableArea.Height;
4040
break;
4141
case > 0 when maxHeight <= 0:
42-
float scaleAmount = maxWidth / this._overrideDrawableArea.Width;
42+
float scaleAmount = maxWidth / _overrideDrawableArea.Width;
4343

44-
width = (int)this._overrideDrawableArea.Width;
45-
height = (int)(this._overrideDrawableArea.Height * scaleAmount);
44+
width = (int)_overrideDrawableArea.Width;
45+
height = (int)(_overrideDrawableArea.Height * scaleAmount);
4646
break;
4747
default:
4848
if (maxHeight > 0 && maxWidth <= 0)
4949
{
50-
float defaultScaleAmount = maxHeight / this._overrideDrawableArea.Height;
50+
float defaultScaleAmount = maxHeight / _overrideDrawableArea.Height;
5151

52-
height = (int)this._overrideDrawableArea.Height;
53-
width = (int)(this._overrideDrawableArea.Width * defaultScaleAmount);
52+
height = (int)_overrideDrawableArea.Height;
53+
width = (int)(_overrideDrawableArea.Width * defaultScaleAmount);
5454
}
5555
else
5656
{
57-
float scaledHeightAmount = maxHeight / this._overrideDrawableArea.Height;
58-
float scaledWidthAmount = maxWidth / this._overrideDrawableArea.Width;
57+
float scaledHeightAmount = maxHeight / _overrideDrawableArea.Height;
58+
float scaledWidthAmount = maxWidth / _overrideDrawableArea.Width;
5959

6060
float minScale = Math.Min(scaledHeightAmount, scaledWidthAmount);
6161

62-
height = (int)(this._overrideDrawableArea.Height * minScale);
63-
width = (int)(this._overrideDrawableArea.Width * minScale);
62+
height = (int)(_overrideDrawableArea.Height * minScale);
63+
width = (int)(_overrideDrawableArea.Width * minScale);
6464
}
6565

6666
break;
@@ -194,7 +194,7 @@ private void PaintSurfaceInternal(SKSurface surface, SKImageInfo info)
194194

195195
_enabledVisualEffects = VisualEffects.Where(x => x.Enabled).ToList();
196196

197-
if (!this._enabledVisualEffects.Any())
197+
if (!_enabledVisualEffects.Any())
198198
{
199199
return;
200200
}
@@ -208,19 +208,19 @@ private void PaintSurfaceInternal(SKSurface surface, SKImageInfo info)
208208
{
209209
var image = surface.Snapshot();
210210

211-
if (this._overrideDrawableArea != default(SKRect))
211+
if (_overrideDrawableArea != default)
212212
{
213-
surface.Canvas.ClipRect(this._overrideDrawableArea);
213+
surface.Canvas.ClipRect(_overrideDrawableArea);
214214
}
215215

216-
foreach (var visualEffect in this._enabledVisualEffects)
216+
foreach (var visualEffect in _enabledVisualEffects)
217217
{
218218
if (!this.IsAttached)
219219
{
220220
return;
221221
}
222222

223-
var tmpImage = visualEffect.ApplyEffect(image, surface, info, this._overrideDrawableArea);
223+
var tmpImage = visualEffect.ApplyEffect(image, surface, info, _overrideDrawableArea);
224224
image?.Dispose();
225225
image = tmpImage;
226226
}

AuroraControlsMaui/AuroraViewHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace AuroraControls;
55
public class AuroraViewHandler : SKCanvasViewHandler
66
{
77
public AuroraViewHandler()
8-
: base(SKCanvasViewHandler.SKCanvasViewMapper, SKCanvasViewHandler.SKCanvasViewCommandMapper)
8+
: base(SKCanvasViewMapper, SKCanvasViewCommandMapper)
99
{
1010
}
1111
}

AuroraControlsMaui/CalendarPicker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected override void OnPropertyChanged(string propertyName = null)
5353
{
5454
base.OnPropertyChanged(propertyName);
5555

56-
if (propertyName == VisualElement.IsFocusedProperty.PropertyName ||
56+
if (propertyName == IsFocusedProperty.PropertyName ||
5757
(this.IsFocused && propertyName == DatePicker.DateProperty.PropertyName))
5858
{
5959
this.Date = base.Date;

0 commit comments

Comments
 (0)