//create main detection button private void CreateConSha_Click(object sender, EventArgs e) { Thread t = new Thread(new ThreadStart(CreateOneConShape)); t.Start(); t.Join(); for (int i = 0; i < On.tt.AllImage.Count; i++) { PictureBoxTest.BackgroundImage = On.tt.AllImage[i]; PictureBoxTest.BackgroundImageLayout = ImageLayout.Zoom; PictureBoxTest.Refresh(); PictureBoxTest.Update(); } for (int i = 0; i < On.Detected.Count; i++) { textBoxImageTextDeepLearning.AppendText(On.Detected[i]); } /* for (int i = 0; i < On.t.KeyboardAllImage.Count; i++) * { * PictureBoxTest.BackgroundImage = On.t.KeyboardAllImage[i]; * PictureBoxTest.BackgroundImageLayout = ImageLayout.Zoom; * PictureBoxTest.Refresh(); * PictureBoxTest.Update(); * * }*/ }
void Draw() { for (int i = 0; i < On.tt.AllImage.Count; i++) { Object O = new Object(); lock (O) { try { PictureBoxTest.BackgroundImage = On.tt.AllImage[i]; PictureBoxTest.BackgroundImageLayout = ImageLayout.Zoom; PictureBoxTest.Refresh(); PictureBoxTest.Update(); } catch (System.Exception t) { } } } }