private void btnUcgen_Click(object sender, EventArgs e) { Ucgen u = new Ucgen { X = (int)nudX.Value, Y = (int)nudY.Value, Genislik = (int)nudGenislik.Value, Yukseklik = (int)nudYukseklik.Value, DolguRenk = cdiCizim.Color }; u.Hipotenus(); ucgens.Add(u); }
private void pnlCizim_MouseMove(object sender, MouseEventArgs e) { if (suruklenenIndex != -1) { Dikdortgen suruklenen = dikdortgens[suruklenenIndex]; suruklenen.X = e.X - surukleSol; suruklenen.Y = e.Y - surukleUst; pnlCizim.Refresh(); } else if (suruklenenIndex1 != -1) { Ucgen suruklenen1 = ucgens[suruklenenIndex1]; suruklenen1.X = e.X - surukleSol1; suruklenen1.Y = e.Y - surukleUst1; pnlCizim.Refresh(); } }