I'm creating a UWP APP to receive the data from ADC board, I was used WindForm to develop it, it can work, but because UWP doesn't support using Control.Invoke look through the papers, but I still have no idea how can I start, how can I convert the windform code to UWP code?
The windform code as below
public async Task StartProcess()
{
IsCancelled = false;
Task t = new Task(() =>
{
while (IsCancelled == false)
{
I = I + 1;
SetTextBox(I);
}
});
t.Start();
}
public void SetTextBox(int _Val)
{
if (InvokeRequired)
{
this.Invoke((MethodInvoker)delegate () { SetTextBox(_Val); });
return;
}
textBox1.Text = Convert.ToString(_Val);
}