示例#1
0
 internal static void SuggestTask()
 {
     SetPidginStatus("Available", "");
     Notification notify;
     Tasks tasks = new Tasks();
     tasks.Load();
     Task task = tasks.GetPriority();
     if (task != null)
     {
         notify = new Notification("Tasks", "This is the next priority task:\n" + task.Summary);
         notify.AddAction("select", "Select", HandleSelectTask);
         notify.AddAction("postpone", "Delay", HandlePostponeTask);
         notify.AddAction("AddTask", "Add Task", HandleAddTask);
         notify.Timeout = 0;
         notify.Urgency = Urgency.Critical;
         notify.Show();
     }
     else
     {
         notify = new Notification("Tasks", "What are you working on?");
         notify.AddAction("AddTask", "Add Task", HandleAddTask);
         notify.Timeout = 0;
         notify.Urgency = Urgency.Critical;
         notify.Show();
     }
 }
示例#2
0
        static internal void SuggestTask()
        {
            SetPidginStatus("Available", "");
            Notification notify;
            Tasks        tasks = new Tasks();

            tasks.Load();
            Task task = tasks.GetPriority();

            if (task != null)
            {
                notify = new Notification("Tasks", "This is the next priority task:\n" + task.Summary);
                notify.AddAction("select", "Select", HandleSelectTask);
                notify.AddAction("postpone", "Delay", HandlePostponeTask);
                notify.AddAction("AddTask", "Add Task", HandleAddTask);
                notify.Timeout = 0;
                notify.Urgency = Urgency.Critical;
                notify.Show();
            }
            else
            {
                notify = new Notification("Tasks", "What are you working on?");
                notify.AddAction("AddTask", "Add Task", HandleAddTask);
                notify.Timeout = 0;
                notify.Urgency = Urgency.Critical;
                notify.Show();
            }
        }