예제 #1
0
        public AsyncTest()
        {
            InitializeComponent();

            var taskId = Guid.NewGuid();

            AsyncWorker.Execute(() => DateTime.Now.ToString(), time => display.Text += time + "\r\n", new TimeSpan(0, 0, 0, 5), processId: taskId);
            AsyncWorker.Execute(() => "Hello! " + Environment.TickCount.ToString(), time => display.Text += time + "\r\n", new TimeSpan(0, 0, 0, 2));

            AsyncWorker.PauseContinuousProcess(taskId);
            AsyncWorker.ResumeContinuousProcess(taskId);
            AsyncWorker.StopContinuousProcess(taskId);
        }