Skip to content

Commit

Permalink
- Showing "Go back to Work"-window now
Browse files Browse the repository at this point in the history
  - Feedback-Button is there but disabled
  • Loading branch information
ironjan committed Apr 26, 2017
1 parent b8e1182 commit 1c93fca
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
1 change: 0 additions & 1 deletion ApplicationTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ private void OnTimerCallback(object state)

if (_timeLeft <= 0)
{
_app.Show();
_timeLeft = 0;
_app.TriggerNotification();
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
44 changes: 44 additions & 0 deletions FeedbackWindow.cs
Original file line number Diff line number Diff line change
@@ -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();
}


}

}
5 changes: 2 additions & 3 deletions InteractiveOfficeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
}
Expand Down
1 change: 1 addition & 0 deletions InteractiveOfficeClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="ActivityWindow.cs" />
<Compile Include="FeedbackWindow.cs" />
<Compile Include="InteractiveOfficeClient.cs" />
<Compile Include="IopTrayIcon.cs" />
<Compile Include="MainWindow.cs" />
Expand Down

0 comments on commit 1c93fca

Please sign in to comment.