コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            bolEmProducao = false;
            TaskController.Cancel();
            TaskController = new CancellationTokenSource();
            Token          = TaskController.Token;

            CancelaProcesso();
            this.label1.Text = "Produção parada...";
        }
コード例 #2
0
 private void frmSupervisorio_FormClosed(object sender, FormClosedEventArgs e)
 {
     CancelaProcesso();
     TaskController.Cancel();
 }