Пример #1
0
        private void ResetarTarefa(object sender, RoutedEventArgs e)
        {
            try {
                Timesheet.ResetarTarefa(TimesheetDataGrid.SelectedItem as TarefaModel);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }

            TimesheetDataGrid.UnselectAll();
        }
Пример #2
0
        private void PlayPauseTarefa(object sender, MouseButtonEventArgs e)
        {
            try {
                var tarefa = (TarefaModel)TimesheetDataGrid.SelectedItem;

                if (tarefa.Status == "Em Execução")
                {
                    Timesheet.PausarTarefa(tarefa);
                }
                else
                {
                    Timesheet.IniciarTarefa(tarefa);
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }

            TimesheetDataGrid.UnselectAll();
        }