void hookStartKeyPressed(object sender, KeyPressedEventArgs e) { if (isTracking) { Toggl.Stop(); } else { Toggl.ContinueLatest(); } }
void hookStartKeyPressed(object sender, KeyPressedEventArgs e) { if (isTracking) { Toggl.Stop(); } else { if (this.manualMode) { var guid = Toggl.Start("", "0", 0, 0, "", ""); Toggl.Edit(guid, false, Toggl.Duration); } else { Toggl.ContinueLatest(); } } }
public static void StartTimeEntry(bool continueIfNotInManualMode = false, string description = "", bool preventOnApp = false) { if (isInManualMode) { var guid = Toggl.Start(description, "0", 0, 0, "", ""); Toggl.Edit(guid, false, Toggl.Duration); } else { if (continueIfNotInManualMode) { Toggl.ContinueLatest(preventOnApp); } else { Toggl.Start(description, "", 0, 0, "", "", preventOnApp); } } }
private void OnDisplayPomodoro(string title, string informativeText) { if (_parentWindow.TryBeginInvoke(OnDisplayPomodoro, title, informativeText)) { return; } void StartNewButtonClick() { _taskbarIcon.CloseBalloon(); var guid = Toggl.Start("", "", 0, 0, "", "", true); _parentWindow.ShowOnTop(); if (guid != null) { Toggl.Edit(guid, true, Toggl.Description); } } void ContinueLatestButtonClick() { _taskbarIcon.CloseBalloon(); Toggl.ContinueLatest(true); } var pomodoroNotification = new PomodoroNotification( _taskbarIcon.CloseBalloon, _parentWindow.ShowOnTop, StartNewButtonClick, ContinueLatestButtonClick) { Message = informativeText, Title = title }; if (!_taskbarIcon.ShowNotification(pomodoroNotification, PopupAnimation.Slide, null)) { _taskbarIcon.ShowBalloonTip(title, informativeText, Properties.Resources.toggl, largeIcon: true); } else { System.Media.SystemSounds.Asterisk.Play(); } }
private static void onContinue(object sender, RoutedEventArgs e) { Toggl.ContinueLatest(sender is MiniTimerWindow); }
private void onContinueButtonClick(object sender, RoutedEventArgs e) { this.icon.CloseBalloon(); Toggl.ContinueLatest(true); }
private void continueToolStripMenuItem_Click(object sender, EventArgs e) { Toggl.ContinueLatest(); }
private void onDiscardContinueClick(object sender, RoutedEventArgs e) { Toggl.DiscardTimeAt(this.guid, this.started, false); Toggl.ContinueLatest(); this.Hide(); }