//Open file and load private void splitationToolStripMenuItem_Click(object sender, EventArgs e) { if (PictureBoxImageTextDeepLearning.BackgroundImage == null) { PictureBoxImageTextDeepLearning.BackgroundImage = PictureBoxImageTextDeepLearning.Image; PictureBoxImageTextDeepLearning.Image = null; } if (buttonSplitationConjunction.Text == "Splitation") { t = new SmallImageing(PictureBoxImageTextDeepLearning.BackgroundImage); bool Do = t.Splitation(pictureBoxTest); if (Do) { buttonSplitationConjunction.Text = "Conjunction"; MessageBox.Show("Splited!"); } } else if (buttonSplitationConjunction.Text == "Conjunction") { bool Do = t.Conjunction(pictureBoxTest, PictureBoxImageTextDeepLearning); if (Do) { PictureBoxImageTextDeepLearning.BackgroundImage = t.RootConjuction; PictureBoxImageTextDeepLearning.Refresh(); PictureBoxImageTextDeepLearning.Update(); buttonSplitationConjunction.Text = "Splitation"; MessageBox.Show("Conjuncted!"); } } }
//splitation and conjunction of one load image deterministic private void buttonSplitationConjunction_Click(object sender, EventArgs e) { //when there is no image if (PictureBoxImageTextDeepLearning.BackgroundImage == null) { //set image to back image PictureBoxImageTextDeepLearning.BackgroundImage = PictureBoxImageTextDeepLearning.Image; PictureBoxImageTextDeepLearning.Image = null; } //wen ready to splitation if (buttonSplitationConjunction.Text == "Splitation") { //create constructor image t = new SmallImageing(PictureBoxImageTextDeepLearning.BackgroundImage); //Do splitation bool Do = t.Splitation(pictureBoxTest); //wen successfull if (Do) { //change operation recurve buttonSplitationConjunction.Text = "Conjunction"; MessageBox.Show("Splited!"); } } else//when ready to conjunction if (buttonSplitationConjunction.Text == "Conjunction") { //Do conjunction bool Do = t.Conjunction(pictureBoxTest, PictureBoxImageTextDeepLearning); //when successfull if (Do) { //assgin conjuncted image to back image and refresh and update to pain even occured PictureBoxImageTextDeepLearning.BackgroundImage = t.RootConjuction; PictureBoxImageTextDeepLearning.Refresh(); PictureBoxImageTextDeepLearning.Update(); buttonSplitationConjunction.Text = "Splitation"; MessageBox.Show("Conjuncted!"); } } }
//conjuncton create shapes menue strip private void createConjunctionShapesToolStripMenuItem_Click(object sender, EventArgs e) { System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(CreateOneConShape)); t.Start(); t.Join(); t = new System.Threading.Thread(new System.Threading.ThreadStart(Draw)); t.Start(); t.Join(); 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(); * System.Threading.Thread.Sleep(1000); * }*/ }