예제 #1
0
        static void HandleEditTaskActivated(object sender, EventArgs e)
        {
            Tasks tasks = new Tasks();

            tasks.Load();
            RequestWork.EditTask(tasks.CurrentTask());
        }
예제 #2
0
        static void MenuFinishTaskActivated(object sender, EventArgs 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();
            RequestWork.SuggestTask();
        }
예제 #3
0
        public static void Main(string[] args)
        {
            Application.Init();
            icon            = StatusIcon.NewFromStock(Stock.ZoomIn);
            icon.Visible    = true;
            icon.Tooltip    = "Task Tracker";
            icon.PopupMenu += OnStatusIconPopupMenu;
            icon.Activate  += MenuViewTaskActivated;
            TaskSettings settings = new TaskSettings();

            settings       = settings.Load();
            watch          = new Timer(settings.interval);
            watch.Elapsed += HandleWatchElapsed;
            watch.Start();
            RequestWork.DisplayMessage();
            Application.Run();
        }
예제 #4
0
 static void HandleWatchElapsed(object sender, ElapsedEventArgs e)
 {
     RequestWork.DisplayMessage();
 }
예제 #5
0
//		static void MenuAddTaskActivated(object sender, EventArgs e)
//		{
//			RequestWork.AddTask(false);
//		}

        static void HandleShowActivated(object sender, EventArgs e)
        {
            RequestWork.DisplayMessage();
        }
예제 #6
0
 static void MenuSuggestTaskActivated(object sender, EventArgs e)
 {
     RequestWork.SuggestTask();
 }