private void OnReminder(string title, string informativeText) { if (_parentWindow.TryBeginInvoke(OnReminder, title, informativeText)) { return; } void StartButtonClick() { _taskbarIcon.CloseBalloon(); var guid = Toggl.Start("", "", 0, 0, "", "", true); _parentWindow.ShowOnTop(); if (guid != null) { Toggl.Edit(guid, true, Toggl.Description); } } var reminder = new ReminderNotification(_taskbarIcon.CloseBalloon, _parentWindow.ShowOnTop, StartButtonClick) { Title = title, Message = informativeText }; if (!_taskbarIcon.ShowNotification(reminder, PopupAnimation.Slide, TimeSpan.FromSeconds(10))) { _taskbarIcon.ShowBalloonTip(title, informativeText, Properties.Resources.toggl, largeIcon: true); } }
public static void CreateAndEditRunningTimeEntryFrom(ulong started) { var teId = Toggl.Start("", "", 0, 0, "", ""); Toggl.SetTimeEntryStartTimeStampWithOption(teId, (long)started, true); Toggl.Edit(teId, true, Toggl.Description); }
private void openEditView(MouseButtonEventArgs e, string focusedField) { using (Performance.Measure("opening edit view from cell, focussing " + focusedField)) { Toggl.Edit(this.guid, false, focusedField); } e.Handled = true; }
private void tryOpenEditViewIfRunning(MouseButtonEventArgs e, string focusedField) { if (this.isRunning) { using (Performance.Measure("opening edit view from timer, focussing " + focusedField)) { Toggl.Edit(this.runningTimeEntry.GUID, false, focusedField); } e.Handled = true; } }
private static void onEditRunning(object sender, RoutedEventArgs e) { if (isInManualMode) { StartTimeEntry(); } else { Toggl.Edit(null, true, null); } }
private void onStartButtonClick(object sender, RoutedEventArgs e) { this.icon.CloseBalloon(); var guid = Toggl.Start("", "", 0, 0, "", "", true); this.mainWindow.ShowOnTop(); if (guid != null) { Toggl.Edit(guid, true, Toggl.Description); } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { if (this.manualMode) { var guid = Toggl.Start("", "0", 0, 0, "", ""); Toggl.Edit(guid, false, Toggl.Duration); } else { Toggl.Start("", "", 0, 0, "", ""); } }
private void openEditView(MouseButtonEventArgs e, string focusedField) { if (group) { Toggl.ToggleEntriesGroup(groupName); e.Handled = true; return; } using (Performance.Measure("opening edit view from cell, focussing " + focusedField)) { Toggl.Edit(this.guid, false, focusedField); } e.Handled = true; }
private void onHighlightEdit(object sender, ExecutedRoutedEventArgs e) { if (this.tryExpandSelectedDay()) { return; } if (!this.hasKeyboardSelection) { return; } Toggl.Edit(this.keyboardHighlightedGUID, false, ""); }
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 void textBoxDuration_Click(object sender, EventArgs e) { durationFocused = true; string descriptionText = ""; if (descriptionTextBox.Text != defaultDescription) { descriptionText = descriptionTextBox.Text; } string GUID = Toggl.Start( descriptionText, defaultDuration, task_id, project_id); if (GUID != null) { task_id = 0; project_id = 0; labelClearProject.Visible = false; Toggl.Edit(GUID, false, Toggl.Duration); } }
private void edit_Click(object sender, EventArgs e) { Toggl.Edit(GUID, false, ""); }
private void labelDuration_Click(object sender, EventArgs e) { Toggl.Edit(GUID, false, Toggl.Duration); }
public static void CreateAndEditTimeEntry(ulong started, ulong ended) { var teId = Toggl.CreateEmptyTimeEntry(started, ended); Toggl.Edit(teId, false, Toggl.Description); }
private void linkLabelProject_Click(object sender, EventArgs e) { Toggl.Edit("", true, Toggl.Project); }
private void linkLabelDuration_Click(object sender, EventArgs e) { Toggl.Edit("", true, Toggl.Duration); }
private void project_Click(object sender, EventArgs e) { Toggl.Edit(GUID, false, Toggl.Project); }
private void onManualAddButtonClick(object sender, RoutedEventArgs e) { var guid = Toggl.Start("", "0", 0, 0, "", "", this.PreventOnApp); Toggl.Edit(guid, false, Toggl.Duration); }
private void TimeEntryCellWithHeader_MouseClick(object sender, MouseEventArgs e) { Toggl.Edit(GUID, false, ""); }