private void SetMiddlePictureNine(bool isTen) { if (!isTen) { PictureBox pb5 = GeneratePictureBox(); pb5.Location = SolitaireUtil.HorizontalVerticalCenter(pb5, panelMiddle); pb5.Image = CardImage; pb5.BringToFront(); panelMiddle.Controls.Add(pb5); } SetMiddlePictureFour(); PictureBox pb1 = GeneratePictureBox(); PictureBox pb2 = GeneratePictureBox(); PictureBox pb3 = GeneratePictureBox(); PictureBox pb4 = GeneratePictureBox(); pb1.Location = new Point(0, 28 + 15); pb2.Location = new Point(pictureBoxMiddle.Width - 22, 28 + 15); pb3.Location = new Point(0, 100 - 28); pb4.Location = new Point(pictureBoxMiddle.Width - 22, 100 - 28); pb1.Image = pb2.Image = CardImage; pb3.Image = pb4.Image = CardImageRotate; pb1.SendToBack(); pb2.SendToBack(); pb3.SendToBack(); pb4.SendToBack(); panelMiddle.Controls.Add(pb1); panelMiddle.Controls.Add(pb2); panelMiddle.Controls.Add(pb3); panelMiddle.Controls.Add(pb4); pictureBoxMiddle.SendToBack(); }
private void SetMiddlePictureFive() { SetMiddlePictureFour(); PictureBox pb = GeneratePictureBox(); pb.Location = SolitaireUtil.HorizontalVerticalCenter(pb, panelMiddle); pb.Image = CardImage; panelMiddle.Controls.Add(pb); pictureBoxMiddle.SendToBack(); }
private void SetMiddlePictureEight() { SetMiddlePictureSeven(); PictureBox pb = GeneratePictureBox(); pb.Location = SolitaireUtil.HorizontalVerticalCenter(pb, panelMiddle); pb.Location = new Point(pb.Location.X, (100 + (pb.Location.Y / 2)) / 2 + 15); pb.Image = CardImageRotate; pb.BringToFront(); panelMiddle.Controls.Add(pb); pictureBoxMiddle.SendToBack(); }
private void SetMiddlePictureSix() { SetMiddlePictureFour(); PictureBox pb1 = GeneratePictureBox(); PictureBox pb2 = GeneratePictureBox(); pb1.Location = SolitaireUtil.VerticalCenter(pb1, panelMiddle); pb1.Location = new Point(0, pb1.Location.Y); pb2.Location = new Point(pictureBoxMiddle.Width - 24, pb1.Location.Y); pb1.Image = pb2.Image = CardImage; panelMiddle.Controls.Add(pb1); panelMiddle.Controls.Add(pb2); pictureBoxMiddle.SendToBack(); }
private void SetMiddlePictureTwo() { PictureBox pb1 = GeneratePictureBox(); PictureBox pb2 = GeneratePictureBox(); pb1.Location = new Point(pb1.Location.X, 10); pb2.Location = new Point(pb2.Location.X, 105); pb1.Location = SolitaireUtil.HorizontalCenter(pb1, panelMiddle); pb2.Location = SolitaireUtil.HorizontalCenter(pb2, panelMiddle); pb1.Image = CardImage; pb2.Image = CardImageRotate; panelMiddle.Controls.Add(pb1); panelMiddle.Controls.Add(pb2); pictureBoxMiddle.SendToBack(); }
private void SetMiddlePictureTen() { PictureBox pb1 = GeneratePictureBox(); PictureBox pb2 = GeneratePictureBox(); pb1.Location = pb2.Location = SolitaireUtil.HorizontalCenter(pb1, panelMiddle); pb1.Location = new Point(pb1.Location.X, (100 - 28 - 28 - 15) / 2 + 15); pb2.Location = new Point(pb1.Location.X, (100 + ((100 - 28) / 2)) / 2 + 15); pb1.Image = CardImage; pb2.Image = CardImageRotate; pb1.BringToFront(); pb2.BringToFront(); panelMiddle.Controls.Add(pb1); panelMiddle.Controls.Add(pb2); SetMiddlePictureNine(true); pictureBoxMiddle.SendToBack(); }