diff --git a/GoToSleep/CountdownForm.cs b/GoToSleep/CountdownForm.cs index f125da1..a2a12e6 100644 --- a/GoToSleep/CountdownForm.cs +++ b/GoToSleep/CountdownForm.cs @@ -40,7 +40,7 @@ namespace GoToSleep countdown.Text = getTimerText(); }); } - catch (Exception e) + catch { //the window most likely has been closed return; diff --git a/GoToSleep/SystemPowerManager.cs b/GoToSleep/SystemPowerManager.cs index 52c64ed..ab54219 100644 --- a/GoToSleep/SystemPowerManager.cs +++ b/GoToSleep/SystemPowerManager.cs @@ -83,7 +83,12 @@ namespace GoToSleep throw new ArgumentException(); } } - result = DateTime.Parse((results[0].Resolution["values"] as List>)[0]["value"]); + + if(results[0].Resolution["values"] == null) + { + throw new ArgumentException(); + } + result = DateTime.Parse((results[0].Resolution["values"] as List>)![0]["value"]); } catch (Exception e) diff --git a/README.md b/README.md index 78893da..6d117fd 100644 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ -# GoToSleep \ No newline at end of file +# GoToSleep + +Simple utility to schedule automatic system suspension/shutdown using natural language + +Utilizes Microsoft.Recognizers.Text to process the natural text input and generate user-friendly countdown popup. + +* [Download Latest x64 Standalone Release (50 MB)](https://github.com/Kamil118/GoToSleep/releases/latest/download/GoToSleep-x64_STANDALONE.exe) (Probably what you are looking for) + +* [Download Latest x64 trimmed release (4.5 MB)](https://github.com/Kamil118/GoToSleep/releases/latest/download/GoToSleep-x64_dotnet.exe) (Requires .NET 10 runtime installed) \ No newline at end of file