private void Button_Click_1(object sender, RoutedEventArgs e) { txtresp.Text = "Solicitação enviada. Por favor, aguarde..."; MyThreadClass myThread; var t = Task.Run(() => { myThread = new MyThreadClass(); myThread.inicia(); }); tiempo = new System.Windows.Threading.DispatcherTimer(); tiempo.Interval = TimeSpan.FromSeconds(2); //intervalo de 1 seg tiempo.Tick += dispatcherTimer_Tick; tiempo.Start(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { txtresp.Text = "Solicitação enviada. Por favor, aguarde..."; MyThreadClass myThread; var t = Task.Run(() => { myThread = new MyThreadClass(); myThread.inicia(); }); tiempo = new System.Windows.Threading.DispatcherTimer(); tiempo.Interval = TimeSpan.FromSeconds(1); //intervalo de 1 seg tiempo.Tick += dispatcherTimer_Tick; tiempo.Start(); }
private void ThreadFunction() { MyThreadClass myThreadClassObject = new MyThreadClass(this); myThreadClassObject.Run(); }
private void ThreadFunction() { MyThreadClass myThreadClassObject = new MyThreadClass(this); myThreadClassObject.Run(); }