private void Conami_DoWork(object sender, DoWorkEventArgs e) { while (!Conami.CancellationPending) { System.Threading.Thread.Sleep(500); Conami.ReportProgress(1); } }
public MainForm() { InitializeComponent(); style = new Style(); labelGuidanceR.Visible = false; labelGuidanceE.Visible = false; initPerspectives(); refreshActionPanel(); conStage = 1; conLog = new List <string>(); Conami.RunWorkerAsync(); }
private void Conami_ProgressChanged(object sender, ProgressChangedEventArgs e) { List <string> scenar10 = new List <string>() { "Up&Down", "Up&Down", "Up&Down", "Up&Down", "Left", "Right", "Left", "Right", "SortX", "SortY", "Strat" }; if (conStage == 10) { buttonRun.Text = "START"; } if (conStage == 11) { Conami.CancelAsync(); } foreach (var click in conLog) { conStage = click == scenar10[conStage] ? conStage + 1 : 0; } conLog.Clear(); }