include Unit2.h
//---------------------------------------------------------------------------
# pragma package (smart_init)
# pragma resource *. dfm * Form2;
//---------------------------------------------------------------------------
__ fastcall TForm2 :: TForm2 (TComponent * Owner)
: TForm (Owner)
{
} int H=150;
//---------------------------------------------------------------------------FGR[1];FGRClass::Draw()
{= X + (- D/2) * cos (B * M_PI/180);=Y + (- D/2) * sin (B * M_PI/180);
=X + D/2 * cos (B * M_PI/180);=Y + D/2 * sin (B * M_PI/180);
=X + (- 3 * D/4) * cos (B * M_PI/180) - (- 3 * D/4) * sin (B * M_PI/180);=Y + (-3 * D/4) * cos (B * M_PI/180) + (- 3 * D/4) * sin (B * M_PI/180);
=X + (- D/2 + D/32) * cos (B * M_PI/180);=Y + (- D/2 + D/32) * sin (B * M_PI/180 );
=X - (- D/4) * sin (B * M_PI/180);=Y + (- D/4) * cos (B * M_PI/180);
=X + D/4 * cos (B * M_PI/180) - (- D/4) * sin (B * M_PI/180);=Y + (- D/4) * cos (B * M_PI/180) + D/4 * sin (B * M_PI/180);
=X + 3 * D/4 * cos (B * M_PI/180);=Y + 3 * D/4 * sin (B * M_PI/180);
- gt; PaintBox1- gt; Canvas- gt; Brush- gt; Color=clBlack;
- gt; PaintBox1- gt; Canvas- gt; Pie (XD/2, YD/2, X + D/2, Y + D/2, M, N, M1, N1);- gt; PaintBox1- gt; Canvas- gt; Brush- gt; Color=clWhite; - gt; PaintBox1- gt; Canvas- gt; Pie (XD/2, YD/2, X + D/2, Y + D/ 2, M1, N1, M, N); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + D/32, YD/2 + D/32, X + D/2-D/32, Y + D/2-D/32, M3, N3, K, L); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 2 * D/32, YD/2 + 2 * D/ 32, X + D/2-2 * D/32, Y + D/2-2 * D/32, M3, N3, K, L); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/ 2 + 3 * D/32, YD/2 + 3 * D/32, X + D/2-3 * D/32, Y + D/2-3 * D/32, M3, N3, K, L) ; - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 4 * D/32, YD/2 + 4 * D/32, X + D/2-4 * D/32, Y + D/ 2-4 * D/32, K1, L1, M3, N3); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 5 * D/32, YD/2 + 5 * D/32, X + D/2-5 * D/32, Y + D/2-5 * D/32, K1, L1, M3, N3); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 6 * D/32, YD/2 + 6 * D/32, X + D/2-6 * D/32, Y + D/2-6 * D/32, K1, L1, M3, N3); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 7 * D/32, YD/2 + 7 * D/32, X + D/2-7 * D/32, Y + D/2-7 * D/32, K2, L2, K1, L1); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 8 * D/32, YD/2 + 8 * D/32, X + D/2-8 * D/32, Y + D/2-8 * D/32, K2, L2, K1, L1); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 9 * D/32, YD/2 + 9 * D/32, X + D/2-9 * D/32, Y + D/2-9 * D/32, K2, L2, K1, L1); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 10 * D/32, YD/2 + 10 * D/32, X + D/2-10 * D/32, Y + D/2-10 * D/32, K3, L3, K2, L2); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 11 * D/32, YD/2 + 11 * D/32, X + D/ 2-11 * D/32, Y + D/2-11 * D/32, K3, L3, K2, L2); - gt; PaintBox1- gt; Canvas- gt; Arc (XD/2 + 12 * D/ 32, YD/2 + 12 * D/32, X + D/2-12 * D/32, Y + D/2-12 * D/32, K3, L3, K2, L2);
}
__ fastcall TForm2 :: Button1Click (TObject * Sender)
{[1] .X=285; [1] .Y=175; [1] .D=H; [1] .Vx=0; [1] .By=0; [ 1] .B=0;
- gt; Caption= Вихідний стан ;
}
//---------------------------------------------------------------------------__fastcall TForm2 :: Timer1Timer (TObject * Sender)
{
[1] .B +=FGR [1] .By; - gt; Repaint (); FGR [1] .Draw ();
}
//---------------------------------------------------------------------------__fastcall TForm2 :: Button3Click (TObject * Sender)
{[1] .By=5; - gt; Text=FGR [1] .By; - gt; Enabled=false; - gt; Enabled=true; - gt; Caption= Заново ;
}
//--------------------------------------------------------------------------__fastcall TForm2 :: Button7Click (TObject * Sender)
{- gt; Enabled=true; [1] .By +=5; (FGR [1] .By gt;=180)
{- gt; Enabled=false;
} - gt; Text=FGR [1] .By; (Button6- gt; Enabled)
{if (FGR [1] .By gt;=0)
{- gt; Enabled=false; - gt; Enabled=true;
} - gt; Text=FGR [1] .By;
} (Button5- gt; Enabled)
{(FGR [1] .By gt;=0 || FGR [1] .By lt;=180)
{- gt; Enabled=true;
...