Inheritance: System.EventArgs
示例#1
0
 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);
 }
示例#2
0
 private void OnPreviousTrack(object o, ActionArgs args)
 {
     ServiceManager.PlaybackController.Previous ();
 }
示例#3
0
 private void OnPlayPause(object o, ActionArgs args)
 {
     ServiceManager.PlayerEngine.TogglePlaying ();
 }
示例#4
0
 private void OnNextTrack(object o, ActionArgs args)
 {
     ServiceManager.PlaybackController.Next ();
 }
示例#5
0
 static void HandleEditTask(object sender, ActionArgs e)
 {
     Tasks tasks = new Tasks();
     tasks.Load();
     EditTask(tasks.CurrentTask());
 }
示例#6
0
 static void HandleAddTask(object sender, ActionArgs e)
 {
     AddTask(true);
 }
示例#7
0
 static void HandleSelectTask(object sender, ActionArgs e)
 {
     SelectTask();
 }
示例#8
0
 static void HandleSuggestTask(object sender, ActionArgs e)
 {
     SuggestTask();
 }
示例#9
0
 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();
 }
示例#10
0
 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 ();
     }
 }
示例#12
0
        /// <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;
                }
            }
        }
示例#13
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);
                }
            }
        }
示例#14
0
 static void HandleSendReport(object sender, ActionArgs e)
 {
     Reports.SendReport(dailyreportmessage, selected);
 }
示例#15
0
 static void HandleSendDaily(object sender, ActionArgs e)
 {
     Reports.SendReport(dailyreportmessage);
 }