public void DeleteTimeEntry() { if (this.confirmlessDelete()) { Toggl.DeleteTimeEntry(this.guid); return; } Toggl.AskToDeleteEntry(this.guid); }
private void deleteButton_OnClick(object sender, RoutedEventArgs e) { if (this.confirmlessDelete()) { Toggl.DeleteTimeEntry(this.timeEntry.GUID); return; } Toggl.AskToDeleteEntry(this.timeEntry.GUID); }
public static void DeleteTimeEntry(this TimeEntryCellViewModel cell) { if (cell.ConfirmlessDelete()) { Toggl.DeleteTimeEntry(cell.Guid); return; } Toggl.AskToDeleteEntry(cell.Guid); }
public static void DeleteTimeEntry(this TimeEntryBlock block) { if (block.ConfirmlessDelete()) { Toggl.DeleteTimeEntry(block.TimeEntryId); return; } Toggl.AskToDeleteEntry(block.TimeEntryId); }
private void onHighlightDelete(object sender, ExecutedRoutedEventArgs e) { if (!this.hasKeyboardSelection) { return; } TimeEntryCell item = this.cells[this.keyboardSelectedId].Item2; if (item.confirmlessDelete) { Toggl.DeleteTimeEntry(this.keyboardHighlightedGUID); return; } Toggl.AskToDeleteEntry(this.keyboardHighlightedGUID); }
private void buttonDelete_Click(object sender, EventArgs e) { DialogResult dr; try { MainWindowController.DisableTop(); dr = MessageBox.Show("Delete time entry?", "Please confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question); } finally { MainWindowController.EnableTop(); } if (DialogResult.Yes == dr) { resetForms(); Toggl.DeleteTimeEntry(timeEntry.GUID); } }