public ActivitySelectionWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Break Time")
        {
            this._app = interactiveOfficeClient;
            Add(_grid);
            ShowLoading(true);
            _activities = Activity.DefaultActivities;

            int activityRowOffset;

            AddLabel("What do you feel like?", 0, 0);
            activityRowOffset = 1;


            for (int i = 0; i < _activities.Length; i++)
            {
                var activity = _activities[i];

                CheckButton b = new ActivityButton(activity);
                b.Clicked += delegate { SelectedActivity(activity, b.Active); };

                _grid.Attach(b, 0, activityRowOffset + i, 1, 1);
            }

            _continueButton.Clicked += delegate { ContinueButtonClicked(); };
            _grid.Attach(_continueButton, 1, activityRowOffset + _activities.Length, 1, 1);
            _grid.Attach(_continueLabel, 0, activityRowOffset + _activities.Length, 1, 1);



            UpdateContinueWidgets();

            ShowLoading(false);
        }
        public BreakNotificationWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Break Time")
        {
            this._app = interactiveOfficeClient;

            Add(_grid);
            _grid.Attach(_label, 0, 0, 1, 2);
            _grid.Attach(_continueButton, 1, 0, 1, 1);
            _grid.Attach(_snoozeButton, 1, 1, 1, 1);

            _continueButton.Clicked += delegate { ContinueButtonClicked(); };
            _snoozeButton.Clicked   += delegate { SnoozeButtonClicked(); };
        }
        public FeedbackWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Work Time")
        {
            this._app = interactiveOfficeClient;
            Add(_grid);


            _feedbackButton          = new Button("Give Feedback");
            _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);
        }
        public MainWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Interactive Office Project")
        {
            _app = interactiveOfficeClient;
            Add(_grid);
            _grid.Attach(_labelTimeLeft, 0, 0, 1, 1);
            _grid.AttachNextTo(_btnStartWorking, _labelTimeLeft, PositionType.Bottom, 1, 1);
            _grid.AttachNextTo(_btnStartBreak, _btnStartWorking, PositionType.Bottom, 1, 1);

            _btnStartWorking.Clicked += delegate
            {
                _app.State = AppState.Working;
                Close();
            };
            _btnStartBreak.Clicked += delegate
            {
                _app.State = AppState.Break;
                Close();
            };

            ShowAll();
        }
Exemple #5
0
 public PeopleSelectionWindow(InteractiveOfficeClient interactiveOfficeClient) : base("Break Time")
 {
     this._app = interactiveOfficeClient;
     Add(_grid);
     StartLoadingPeople();
 }