} //for fun public void TestPictures() { Rectangle HandSlot1 = new Rectangle(85, 725, 115, 65); Rectangle HandSlot2 = new Rectangle(277, 725, 115, 65); Rectangle HandSlot3 = new Rectangle(469, 725, 115, 65); Rectangle HandSlot4 = new Rectangle(661, 725, 115, 65); Rectangle HandSlot5 = new Rectangle(853, 725, 115, 65); string carsDB = "testcars"; Rectangle[] b = { HandSlot1, HandSlot2, HandSlot3, HandSlot4, HandSlot5 }; for (int i = 0; i < 5; i++) { MasterOfPictures.MakePicture(b[i], (carsDB + (i + 1) + "\\test1")); } } //fingers for test
void button9_Click(object sender, EventArgs e) { int x0 = Convert.ToInt32(textBox4.Text); int y0 = Convert.ToInt32(textBox5.Text); int x1 = Convert.ToInt32(textBox6.Text); int y1 = Convert.ToInt32(textBox7.Text); int rectwidth = x1 - x0; int rectheight = y1 - y0; string commonpath = @"C:\projects\bot\thereisnothinginteresting\"; string path = "test.jpg"; this.WindowState = FormWindowState.Minimized; Thread.Sleep(2000); Rectangle rect = new Rectangle(x0, y0, rectwidth, rectheight); MasterOfPictures.MakePicture(rect, commonpath + path); this.WindowState = FormWindowState.Normal; }