From 23586d1124ceaa8ed2771410b531677c018f1f0d Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 14 Apr 2021 23:02:52 +1000 Subject: [PATCH] Added dedicated command to update balance sheet. --- CoinSpotApi/CoinSpotApi.csproj | 4 ++-- CoinSpotApi/packages.config | 2 +- CoinSpotUpdater.sln | 2 +- CoinSpotUpdater/App/Commands.cs | 6 +++--- .../{CoinSpotUpdater.csproj => CoinSpotUpdaterApp.csproj} | 4 ++-- CoinSpotUpdater/packages.config | 2 +- GoogleSheetsApi/GoogleSheetsApi.csproj | 3 +++ 7 files changed, 13 insertions(+), 10 deletions(-) rename CoinSpotUpdater/{CoinSpotUpdater.csproj => CoinSpotUpdaterApp.csproj} (96%) diff --git a/CoinSpotApi/CoinSpotApi.csproj b/CoinSpotApi/CoinSpotApi.csproj index f51d64b..5cc8b2c 100644 --- a/CoinSpotApi/CoinSpotApi.csproj +++ b/CoinSpotApi/CoinSpotApi.csproj @@ -31,8 +31,8 @@ 4 - - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll diff --git a/CoinSpotApi/packages.config b/CoinSpotApi/packages.config index b38f3c7..149830a 100644 --- a/CoinSpotApi/packages.config +++ b/CoinSpotApi/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/CoinSpotUpdater.sln b/CoinSpotUpdater.sln index 39de281..65fc4dd 100644 --- a/CoinSpotUpdater.sln +++ b/CoinSpotUpdater.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoinSpotUpdater", "CoinSpotUpdater\CoinSpotUpdater.csproj", "{FFCA23EB-06B8-40C6-B3DC-BC1C423DC762}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoinSpotUpdaterApp", "CoinSpotUpdater\CoinSpotUpdaterApp.csproj", "{FFCA23EB-06B8-40C6-B3DC-BC1C423DC762}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A98C474-2B75-45CC-9AE9-589462E595B3}" ProjectSection(SolutionItems) = preProject diff --git a/CoinSpotUpdater/App/Commands.cs b/CoinSpotUpdater/App/Commands.cs index 1b90b78..5d65eca 100644 --- a/CoinSpotUpdater/App/Commands.cs +++ b/CoinSpotUpdater/App/Commands.cs @@ -155,11 +155,11 @@ private static ConsoleColor CalcDiffColor(float diffGain) ConsoleColor diffColor; var neg = diffGain < 0; - if (Math.Abs(diffGain) < 0.01f) + if (Math.Abs(diffGain) < 0.05f) diffColor = ConsoleColor.DarkGray; - else if (neg && diffGain > -0.08f) + else if (neg && diffGain > -0.10f) diffColor = ConsoleColor.DarkRed; - else if (!neg && diffGain < 0.08f) + else if (!neg && diffGain < 0.25f) diffColor = ConsoleColor.DarkGreen; else diffColor = diffGain < 0 ? ConsoleColor.Red : ConsoleColor.Green; diff --git a/CoinSpotUpdater/CoinSpotUpdater.csproj b/CoinSpotUpdater/CoinSpotUpdaterApp.csproj similarity index 96% rename from CoinSpotUpdater/CoinSpotUpdater.csproj rename to CoinSpotUpdater/CoinSpotUpdaterApp.csproj index 2b42be7..ff9f5fe 100644 --- a/CoinSpotUpdater/CoinSpotUpdater.csproj +++ b/CoinSpotUpdater/CoinSpotUpdaterApp.csproj @@ -69,8 +69,8 @@ ..\packages\Google.Apis.Sheets.v4.1.50.0.2231\lib\net45\Google.Apis.Sheets.v4.dll - - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll diff --git a/CoinSpotUpdater/packages.config b/CoinSpotUpdater/packages.config index 646cc8e..68a9513 100644 --- a/CoinSpotUpdater/packages.config +++ b/CoinSpotUpdater/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/GoogleSheetsApi/GoogleSheetsApi.csproj b/GoogleSheetsApi/GoogleSheetsApi.csproj index 911842e..1cca000 100644 --- a/GoogleSheetsApi/GoogleSheetsApi.csproj +++ b/GoogleSheetsApi/GoogleSheetsApi.csproj @@ -49,6 +49,9 @@ 1.50.0.2231 + + 13.0.1 +