Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed toast and sound notifications. #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Tomighty.Core/Duration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ public string ToTimeString()
}

public static bool operator ==(Duration a, Duration b) => a.Seconds == b.Seconds;
public static bool operator !=(Duration a, Duration b) => a.Seconds != b.Seconds;
public static bool operator !=(Duration a, Duration b) => a.Seconds != b.Seconds;

public override bool Equals(object obj)
{
return obj is Duration other && Seconds == other.Seconds;
}

public override int GetHashCode()
{
return Seconds;
}
}
}
2 changes: 2 additions & 0 deletions Tomighty.Core/PomodoroEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class PomodoroEngine : IPomodoroEngine
private readonly IUserPreferences userPreferences;
private readonly IEventHub eventHub;
private int _pomodoroCount;
public static PomodoroEngine pomodoroEngine;

public PomodoroEngine(ITimer timer, IUserPreferences userPreferences, IEventHub eventHub)
{
Expand All @@ -23,6 +24,7 @@ public PomodoroEngine(ITimer timer, IUserPreferences userPreferences, IEventHub
this.eventHub = eventHub;

eventHub.Subscribe<TimerStopped>(OnTimerStopped);
pomodoroEngine = this;
}

public int PomodoroCount
Expand Down
6 changes: 3 additions & 3 deletions Tomighty.Windows/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
</configuration>
Loading