private void ResetarTarefa(object sender, RoutedEventArgs e) { try { Timesheet.ResetarTarefa(TimesheetDataGrid.SelectedItem as TarefaModel); } catch (Exception ex) { MessageBox.Show(ex.Message); } TimesheetDataGrid.UnselectAll(); }
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(); }