コード例 #1
0
        public void doTask(taskenddelegate task, Message m)
        {
            NotificationArgs notificationInfo = new NotificationArgs(isTaskCompleted);

            if (notificationChanged != null)
            {
                Console.WriteLine("start");
                notificationChanged(this, notificationInfo);
            }

            isTaskCompleted = true;

            if (isTaskCompleted)
            {
                var status = task(m);
                if (notificationChanged != null)
                {
                    notificationChanged(this, notificationInfo);
                    Console.WriteLine("ty");
                }
            }
        }
コード例 #2
0
 public static void showNotification(object clock, NotificationArgs e)
 {
     Console.WriteLine(e.status);
 }