static void HandleDoNothing(object sender, ActionArgs e) { Tasks tasks = new Tasks(); tasks.Load(); Task current = tasks.CurrentTask(); if (!current.IsWorked(DateTime.Now)) { current.Worked.Add(DateTime.Now); } tasks.Save(); SetPidginStatus("Busy", current.Summary); }
private void OnPreviousTrack(object o, ActionArgs args) { ServiceManager.PlaybackController.Previous (); }
private void OnPlayPause(object o, ActionArgs args) { ServiceManager.PlayerEngine.TogglePlaying (); }
private void OnNextTrack(object o, ActionArgs args) { ServiceManager.PlaybackController.Next (); }
static void HandleEditTask(object sender, ActionArgs e) { Tasks tasks = new Tasks(); tasks.Load(); EditTask(tasks.CurrentTask()); }
static void HandleAddTask(object sender, ActionArgs e) { AddTask(true); }
static void HandleSelectTask(object sender, ActionArgs e) { SelectTask(); }
static void HandleSuggestTask(object sender, ActionArgs e) { SuggestTask(); }
static void HandleFinishedTask(object sender, ActionArgs e) { Tasks tasks = new Tasks(); tasks.Load(); Task task = tasks.CurrentTask(); tasks.SetCurrentTaskFinished(); Notification notify = new Notification(); notify.Summary = "Task Finished"; notify.Body = task.Summary; notify.Urgency = Urgency.Critical; notify.Show(); SuggestTask(); }
static void HandlePostponeTask(object sender, ActionArgs e) { Tasks tasks = new Tasks(); tasks.Load(); tasks.PostponePriorityTask(); SuggestTask(); }
private void OnSongSkipped (object o, ActionArgs args) { if (args.Action == "skip-song") { ServiceManager.PlaybackController.Next (); } }
/// <summary> /// DeclineNotificationHandler /// Handles notifications /// </summary> private void DeclineNotificationHandler(object o, ActionArgs args) { lock(notifyLock) { Logger.Debug("The notification declined"); Notification notification = (Notification)o; if(currentNotification != null) { NotificationData data = pendingData[currentPeerID]; if(data.Conversation != null) CleanUpConversation(data.Conversation, true); currentNotification = null; currentPeerID = 0; } } }
/// <summary> /// AcceptNotificationHandler /// Handles notifications /// </summary> private void AcceptNotificationHandler(object o, ActionArgs args) { lock(notifyLock) { Logger.Debug("The notification was accepted"); Notification notification = (Notification)o; if(currentNotification != null) { NotificationData data = pendingData[currentPeerID]; if(data.Conversation != null) CleanUpConversation(data.Conversation, false); currentNotification = null; currentPeerID = 0; ChatWindowManager.HandleAcceptedConversation(data.Conversation, data.ChatType); } } }
static void HandleSendReport(object sender, ActionArgs e) { Reports.SendReport(dailyreportmessage, selected); }
static void HandleSendDaily(object sender, ActionArgs e) { Reports.SendReport(dailyreportmessage); }