diff --git a/appCs/src/Program.cs b/appCs/src/Program.cs index 45b6a8b..47f2025 100644 --- a/appCs/src/Program.cs +++ b/appCs/src/Program.cs @@ -198,7 +198,6 @@ private static IntPtr WndProc(IntPtr window, int msg, IntPtr wParam, IntPtr lPar case BUTTON_SQUARE_ROOT_ID: PushOperation("r"); break; - case BUTTON_EQUALS_ID: CalculateWrapper(); break; @@ -250,7 +249,7 @@ private static void Calculate(IntPtr field) "-" => operand1 - operand2, "*" => operand1 * operand2, "/" => operand1 / operand2, - _ => throw new Exception("Invalid operator: " + op), + _ => throw new Exception("Invalid operator: " + op) }; data.Clear(); @@ -267,7 +266,7 @@ private static void Calculate(IntPtr field) "s" => operand * operand, "i" => 1.0 / operand, "r" => Math.Sqrt(operand), - _ => throw new Exception("Invalid operator: " + op), + _ => throw new Exception("Invalid operator: " + op) }; data.Clear(); @@ -277,7 +276,7 @@ private static void Calculate(IntPtr field) } } - private static void PushOperation(String operation) + private static void PushOperation(string operation) { StringBuilder buffer = new(WinAPI.GetWindowTextLength(field) + 1); WinAPI.GetWindowText(field, buffer, buffer.Capacity); @@ -296,7 +295,7 @@ private static void PushOperation(String operation) } } - private static void PushSymbolWrapper(String symbol) + private static void PushSymbolWrapper(string symbol) { StringBuilder buffer = new(WinAPI.GetWindowTextLength(field) + 1); WinAPI.GetWindowText(field, buffer, buffer.Capacity); @@ -337,7 +336,7 @@ private static void PushSymbolWrapper(String symbol) } } - private static void PushSymbol(String symbol) + private static void PushSymbol(string symbol) { StringBuilder buffer = new(WinAPI.GetWindowTextLength(field) + 1); WinAPI.GetWindowText(field, buffer, buffer.Capacity); @@ -357,7 +356,7 @@ private static IntPtr RegisterField(IntPtr window) return WinAPI.CreateWindowEx(WS_EX_CLIENTEDGE, "STATIC", "", WS_TABSTOP | WS_VISIBLE | WS_CHILD, 1, 1, 239, 48, window, 0, 0, 0); } - private static void RegisterButton(IntPtr window, int id, String text, int gridX, int gridY) + private static void RegisterButton(IntPtr window, int id, string text, int gridX, int gridY) { var buttonWidth = 60; var buttonHeight = 60;