public void DeleteTimeEntry()
 {
     if (this.confirmlessDelete())
     {
         Toggl.DeleteTimeEntry(this.guid);
         return;
     }
     Toggl.AskToDeleteEntry(this.guid);
 }
Example #2
0
 private void deleteButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (this.confirmlessDelete())
     {
         Toggl.DeleteTimeEntry(this.timeEntry.GUID);
         return;
     }
     Toggl.AskToDeleteEntry(this.timeEntry.GUID);
 }
Example #3
0
 public static void DeleteTimeEntry(this TimeEntryCellViewModel cell)
 {
     if (cell.ConfirmlessDelete())
     {
         Toggl.DeleteTimeEntry(cell.Guid);
         return;
     }
     Toggl.AskToDeleteEntry(cell.Guid);
 }
Example #4
0
 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);
            }
        }