From 4e45032150deff4dbd16e576d707b2a98a8d1cde Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sun, 12 Nov 2023 11:17:03 -0500 Subject: [PATCH] camelCase --- BlazorCanvas/BlazorCanvas/Data/CanvasService.cs | 14 +++++++------- BlazorCanvas/BlazorCanvas/Pages/Index.razor | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BlazorCanvas/BlazorCanvas/Data/CanvasService.cs b/BlazorCanvas/BlazorCanvas/Data/CanvasService.cs index 47da918..97d7db5 100644 --- a/BlazorCanvas/BlazorCanvas/Data/CanvasService.cs +++ b/BlazorCanvas/BlazorCanvas/Data/CanvasService.cs @@ -17,8 +17,8 @@ public class CanvasService { _jsRuntime = jsRuntime; } - public string currentcolor { get; set; } = "Black"; - public int pointsize { get; set; } = 1; + public string currentColor { get; set; } = "Black"; + public int pointSize { get; set; } = 1; public bool snap { get; set; } public ElementReference divCanvas { get; set; } public BECanvasComponent myCanvas { get; set; } = new(); @@ -46,17 +46,17 @@ public class CanvasService { _currentCanvasContext = await myCanvas.CreateCanvas2DAsync(); if (eventArgs.Buttons == 1) // Couleur si bouton gauche, blanc si bouton droit - color = currentcolor; + color = currentColor; if (snap) { // Magnétisme boboche. - mouseX -= mouseX % pointsize; - mouseY -= mouseY % pointsize; + mouseX -= mouseX % pointSize; + mouseY -= mouseY % pointSize; } command.X = mouseX; command.Y = mouseY; command.Color = color; - command.PointSize = pointsize; + command.PointSize = pointSize; if (command.Equals(_lastCommand)) return; // Pour pas spammer des commandes si c'est pas pertinent. @@ -64,7 +64,7 @@ public class CanvasService { // TODO: Shipper les commandes à Franz. await _currentCanvasContext.SetFillStyleAsync(color); - await _currentCanvasContext.FillRectAsync(mouseX, mouseY, pointsize, pointsize); + await _currentCanvasContext.FillRectAsync(mouseX, mouseY, pointSize, pointSize); _lastCommand = command; } diff --git a/BlazorCanvas/BlazorCanvas/Pages/Index.razor b/BlazorCanvas/BlazorCanvas/Pages/Index.razor index cfe3898..44a0ee2 100644 --- a/BlazorCanvas/BlazorCanvas/Pages/Index.razor +++ b/BlazorCanvas/BlazorCanvas/Pages/Index.razor @@ -11,7 +11,7 @@

Canvas Communautaire!

- @@ -27,7 +27,7 @@ - @@ -43,5 +43,5 @@ \ No newline at end of file