// ------------------------------------------------- public Form_NNodeCovers () { InitializeComponent (); mover = new Mover (this); //Font = new Font ("TimeSpan New Roman", 14); circle = new NCircle (new Point (ClientSize .Width / 3, ClientSize .Height / 3), ClientSize .Height / 4, Color .Yellow); mover .Add (circle); ring = new NRing (new Point (ClientSize .Width * 2 / 3, ClientSize .Height * 2 / 3), ClientSize .Height / 6, ClientSize .Height / 3, new double [] { 2, 3, 5, 7, 11 }); mover .Add (ring); text = new TextMR (this, new Point (400, 30), "Move and resize objects, \r\nbut no rotation for them here"); mover .Insert (0, text); mover .Insert (0, btnCovers); }
// ------------------------------------------------- Click_btnAddCircle private void Click_btnAddCircle (object sender, EventArgs e) { int radius = 70; int cx = rand .Next (nSeed) % (ClientSize .Width - 2 * radius) + radius; int cy = rand .Next (nSeed) % (ClientSize .Height - 2 * radius) + radius; NCircle circle = new NCircle (new Point (cx, cy), radius, clrNewCircle); mover .Insert (iTopElemOrder, circle); Invalidate (); }