Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.35 KB | None | 0 0
  1.         private void DrawHangman(object sender, PaintEventArgs e)
  2.         {
  3.             g = panel1.CreateGraphics();
  4.  
  5.             switch (WroingChoise)
  6.             {
  7.                 case 1:
  8.                     this.DrawFirstLevelTree();
  9.                     break;
  10.                 case 2:
  11.                     this.DrawSecondLevelTree();
  12.                     break;
  13.                 case 3:
  14.                     this.DrawThreeLevelTree();
  15.                     break;
  16.             }
  17.         }
  18.  
  19.         private void DrawFirstLevelTree()
  20.         {
  21.             Pen sb = new Pen(Color.Red, 3);
  22.             Point point1 = new Point(300, 180);
  23.             Point point2 = new Point(100, 180);
  24.             g.DrawLine(sb, point1, point2);
  25.         }
  26.  
  27.         private void DrawSecondLevelTree()
  28.         {
  29.             this.DrawFirstLevelTree();
  30.  
  31.             Pen sb = new Pen(Color.Red, 3);
  32.             Point point1 = new Point(200, 180);
  33.             Point point2 = new Point(200, 0);
  34.             g.DrawLine(sb, point1, point2);
  35.         }
  36.  
  37.         private void DrawThreeLevelTree()
  38.         {
  39.             this.DrawFirstLevelTree();
  40.             this.DrawSecondLevelTree();
  41.  
  42.             Pen sb = new Pen(Color.Red, 3);
  43.             Point point1 = new Point(200, 180);
  44.             Point point2 = new Point(200, 0);
  45.             g.DrawLine(sb, point1, point2);
  46.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement