diff --git a/ApplicationTimer.cs b/ApplicationTimer.cs index 8f415ba..8eac56c 100644 --- a/ApplicationTimer.cs +++ b/ApplicationTimer.cs @@ -61,7 +61,6 @@ private void OnTimerCallback(object state) if (_timeLeft <= 0) { - _app.Show(); _timeLeft = 0; _app.TriggerNotification(); } diff --git a/CHANGELOG.md b/CHANGELOG.md index 83f9e80..428394f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - +## [0.0.6] + - Showing "Go back to Work"-window now + - Feedback-Button is there but disabled + ## [0.0.5] - Showing default activities for break diff --git a/FeedbackWindow.cs b/FeedbackWindow.cs new file mode 100644 index 0000000..b52e2de --- /dev/null +++ b/FeedbackWindow.cs @@ -0,0 +1,44 @@ +using System; +using System.Threading.Tasks; +using Gtk; +using InteractiveOfficeClient.Models; + +namespace InteractiveOfficeClient +{ + public class FeedbackWindow : Gtk.Window + { + private InteractiveOfficeClient _app; + private readonly Grid _grid = new Grid(); + + public FeedbackWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Work Time") + { + this._app = interactiveOfficeClient; + Add(_grid); + + Button feedbackButton = new Button("Give Feedback"); + feedbackButton.Sensitive = false; // FIXME Enable Button after feedback url was added + feedbackButton.Clicked += delegate { FeedbackButtonClicked(); }; + _grid.Attach(feedbackButton, 0, 0, 1, 1); + + Button backToWorkButton = new Button("Back to work"); + backToWorkButton.Clicked += delegate { BackToWorkButtonClicked(); }; + _grid.Attach(backToWorkButton, 0, 1, 1, 1); + + } + + private static void FeedbackButtonClicked() + { + // FIXME Open Browser... + Console.WriteLine("Open Browser for Feedback."); + } + + private void BackToWorkButtonClicked() + { + _app.State = AppState.Working; + Close(); + } + + + } + +} \ No newline at end of file diff --git a/InteractiveOfficeClient.cs b/InteractiveOfficeClient.cs index 9204f86..ab15edb 100644 --- a/InteractiveOfficeClient.cs +++ b/InteractiveOfficeClient.cs @@ -87,13 +87,12 @@ public void TriggerNotification() if (IsWorking) { State = AppState.NotifyingBreak; - Console.WriteLine("Show Activities"); - ActivityWindow aw = new ActivityWindow(this); - aw.ShowAll(); + new ActivityWindow(this).ShowAll(); } else { State = AppState.NotifyingWork; + new FeedbackWindow(this).ShowAll(); } }); } diff --git a/InteractiveOfficeClient.csproj b/InteractiveOfficeClient.csproj index ea8b160..2bfa4ce 100644 --- a/InteractiveOfficeClient.csproj +++ b/InteractiveOfficeClient.csproj @@ -34,6 +34,7 @@ +