Си диез / Говнокод #7974 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
if ((pen == true) || (brush == true))
 {
 mousePath = new System.Drawing.Drawing2D.GraphicsPath();
 myPaths.Add(mousePath);
 }
 else
 if ((rectangle == true) && (e.X > 0) && (e.Y > 0) && (e.X < pictureBox1.Width)
 && (e.Y < pictureBox1.Height))
 {
 if (Border == true)
 {
 PenForBrush.Width = trackBar1.Value;
if ((e.X >= rectX) && (e.Y >= rectY))
{
g.DrawRectangle(PenForBrush, rectX, rectY, e.X - rectX, e.Y - rectY);
}
else
if ((e.X <= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(e.X, e.Y, rectX - e.X, rectY - e.Y);
g.DrawRectangle(PenForBrush, R);
}
else
if ((e.X <= rectX) && (e.Y >= rectY))
{
Rectangle R = new Rectangle(e.X, rectY, rectX - e.X, e.Y - rectY);
g.DrawRectangle(PenForBrush, R);
}
else
if ((e.X >= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(rectX, e.Y, e.X - rectX, rectY - e.Y);
g.DrawRectangle(PenForBrush, R);
}
}
else  if (FillBorder == true)
{
else
if ((e.X <= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(e.X + width, e.Y + width,
rectX - e.X - trackBar1.Value, rectY - e.Y - trackBar1.Value);
g.FillRectangle(FillBrush, R);
                                    g.DrawRectangle(PenForBrush, e.X, e.Y, rectX - e.X, rectY - e.Y);
                                }
                                else
                                    if ((e.X <= rectX) && (e.Y >= rectY))
                                    {
                                        Rectangle R = new Rectangle(e.X + width, rectY + width,
                                                                    rectX - e.X - trackBar1.Value, e.Y - rectY - trackBar1.Value);
                                        g.FillRectangle(FillBrush, R);
                                        g.DrawRectangle(PenForBrush, e.X, rectY, rectX - e.X, e.Y - rectY);
                                    }
                                    else
                                        if ((e.X >= rectX) && (e.Y <= rectY))
                                        {
                                            Rectangle R = new Rectangle(rectX + width, e.Y + width,
                                                                        e.X - rectX - trackBar1.Value, rectY - e.Y - trackBar1.Value);
                                            g.FillRectangle(FillBrush, R);
                                            g.DrawRectangle(PenForBrush, rectX, e.Y, e.X - rectX, rectY - e.Y);
                                        }
                        }
else               if ((mark == true) && (!IsMarkPaint)
                    && (e.X - distance1 > 0) && (e.Y - distance2 > 0)
                    && (e.X + distance3 < pictureBox1.Width) && (e.Y + distance4 < pictureBox1.Height))
                {
                    if (Count == 0)
                    {
                        try
                        {
                            Rectangle R = new Rectangle(PreviousMarkPoint.X, PreviousMarkPoint.Y,
                                MarkRectangle.Width, MarkRectangle.Height);
                            SolidBrush s = new SolidBrush(Color.White);
                            g.FillRectangle(s, R);
Bitmap temp = new Bitmap(pictureBox1.Image.Width, pictureBox1.Image.Height);
                            temp = (Bitmap)pictureBox1.Image;
                            ImageClone = temp.Clone(MarkRectangle, PixelFormat.Format16bppArgb1555);
                        }
                        catch { }
if (myImages.Count > 35)
            {
                myImages.RemoveAt(0);
                ImageNames.RemoveAt(0);
            }

Графический редактор

Запостил: GavnoCoder111 GavnoCoder111, (Updated )

Комментарии (9) RSS

            • Ну может антипаттерн какой с таким названием.
              Дельфисты любят писать iButton1, iButton2... iButton35, так легче делать Layout всех элементов в onFromSize.
              Ответить
              • делпехаписты всегда не особо отличались от пехапистов.
                Ответить
  • а?M:W!V:G L"R(BP?V,P(T$D K)P$T"D?X,I$D(F!M!T(U"E)I:U:PW$L"KH)X$B!X:C.C(Z,X:D:Z(G:U H"LY!ZC B,D G,O?E.W,N)V O,D:PY?D:H"FC)R?I!PSG?F"Z?T(H"GO?ZW.M?G$F!G:A$L V,E(R B(J)B F K$N,J.A?HI)A:Y$K(M!BN.C:D!U"J:ZW(E L.T!U)H!N M P$V K!TO(CJ)U(RO!U.JE:P?F)N:P!C.Y,S:IO.E?JR$X(M$F(D!AO,Q"WZ W)V$O:C"D"N!BS$YE$N.A"S?CJ$A?O)A?G W)D G"R?T)S!F D,R$R,XW L!G)OP FF.S O"S,I(J:I:R F)A)Q U"E)D)Y$Z"K(CZ)Q.FLV?XH(X A,UF$QF C?GНETFMHHRUVTGINPFQGPVXXWRFLMYUJQPHVPVSZUGAETORADCJARATDYUMBKTZXTUQMJPRRVFFYHWCTMRKSIFUYYSEEVQUVENOQSQIBDARUNQTHHEFKVCXAR
    Ответить

Добавить комментарий

Семь раз отмерь — один отрежь, guest!

    А не использовать ли нам bbcode?


    8