public void MyWork(MyLife l) { while (true) { if (workflag) { l.Evolute(); OutBox.Image = l.GetImage(); Application.DoEvents(); } System.Threading.Thread.Sleep(LifeSleep.count); } }
public void MyInit(MyLife ml) { FLab.Text = "Рабочее окно"; this.Size = new Size(MySize.mainsize * MySize.scalling + 23, MySize.mainsize * MySize.scalling + 66); this.FormBorderStyle = FormBorderStyle.FixedSingle; this.OutBox.Size = new Size(MySize.mainsize * MySize.scalling + 1, MySize.mainsize * MySize.scalling + 1); this.OutBox.Location = new Point(3, 23); this.OutBox.Visible = true; this.OutBox.Image = ml.GetImage(); //this.Invalidate(); }