Code: Select all
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
public partial class Screen1
{
public delegate void MontrerProgres(int valeur);
Thread t1;
int i ;
void Button1_Click(System.Object sender, System.EventArgs e)
{
AnalogNumeric1.Value=0;
t1 = new Thread(new ThreadStart(Selection));
t1.Start();
}
public void Selection()
{
for (i= 0; i < 10; i++)
{
Form.ActiveForm.Invoke(new MontrerProgres(changeValue), i);
Thread.Sleep(1000);
}
}
public void changeValue(int i)
{
i = i + 1;
AnalogNumeric1.Value=i;
}
void Screen1_Opened(System.Object sender, System.EventArgs e)
{
}
}
}