Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void DrawHangman(object sender, PaintEventArgs e)
- {
- g = panel1.CreateGraphics();
- switch (WroingChoise)
- {
- case 1:
- this.DrawFirstLevelTree();
- break;
- case 2:
- this.DrawSecondLevelTree();
- break;
- case 3:
- this.DrawThreeLevelTree();
- break;
- }
- }
- private void DrawFirstLevelTree()
- {
- Pen sb = new Pen(Color.Red, 3);
- Point point1 = new Point(300, 180);
- Point point2 = new Point(100, 180);
- g.DrawLine(sb, point1, point2);
- }
- private void DrawSecondLevelTree()
- {
- this.DrawFirstLevelTree();
- Pen sb = new Pen(Color.Red, 3);
- Point point1 = new Point(200, 180);
- Point point2 = new Point(200, 0);
- g.DrawLine(sb, point1, point2);
- }
- private void DrawThreeLevelTree()
- {
- this.DrawFirstLevelTree();
- this.DrawSecondLevelTree();
- Pen sb = new Pen(Color.Red, 3);
- Point point1 = new Point(200, 180);
- Point point2 = new Point(200, 0);
- g.DrawLine(sb, point1, point2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement