Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. private void ResizeForm(int x, int y)
  2. {
  3. this.resize = true;
  4. this.resizeX = true;
  5. this.resizeY = true;
  6. while (this.resize)
  7. {
  8. Thread.Sleep(5);
  9. bool flag = this.resizeX;
  10. if (flag)
  11. {
  12. bool flag2 = x < base.ClientRectangle.Width;
  13. if (flag2)
  14. {
  15. base.Size = new Size(base.ClientRectangle.Width - 1, base.ClientRectangle.Height);
  16. }
  17. else
  18. {
  19. bool flag3 = x > base.ClientRectangle.Width;
  20. if (flag3)
  21. {
  22. base.Size = new Size(base.ClientRectangle.Width + 1, base.ClientRectangle.Height);
  23. }
  24. else
  25. {
  26. this.resizeX = false;
  27. }
  28. }
  29. }
  30. bool flag4 = this.resizeY;
  31. if (flag4)
  32. {
  33. bool flag5 = y < base.ClientRectangle.Height;
  34. if (flag5)
  35. {
  36. base.Size = new Size(base.ClientRectangle.Width, base.ClientRectangle.Height - 1);
  37. }
  38. else
  39. {
  40. bool flag6 = y > base.ClientRectangle.Height;
  41. if (flag6)
  42. {
  43. base.Size = new Size(base.ClientRectangle.Width, base.ClientRectangle.Height + 1);
  44. }
  45. else
  46. {
  47. this.resizeY = false;
  48. }
  49. }
  50. }
  51. bool flag7 = !this.resizeX && !this.resizeY;
  52. if (flag7)
  53. {
  54. this.resize = false;
  55. Application.ExitThread();
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement