示例#1
0
 private void panel1_MouseUp(object sender, MouseEventArgs e)
 {
     SekilCiz.sekilCizUp();
     if (!sec)
     {
         if (bkare)
         {
             Point[] kareNoktalar = { new Point(x, y), new Point(x, e.Y), new Point(e.X, e.Y), new Point(e.X, y) };
             Kaydet.cokgen(strRenk, kareNoktalar);
         }
         else if (bdaire)
         {
             Kaydet.daire(strRenk, (2 * x - e.X), (2 * y - e.Y), (2 * (e.X - x)), (2 * (e.Y - y)));
         }
         else if (baltigen)
         {
             Point[] altigenNoktalar = { new Point(Math.Abs((x - (e.X - x) / 2)), Math.Abs(y - Math.Abs(e.Y - y))), new Point(Math.Abs(2 * x - e.X), y), new Point(Math.Abs((x - (e.X - x) / 2)), e.Y), new Point((x + (e.X - x) / 2), e.Y), new Point(e.X, y), new Point((x + (e.X - x) / 2), Math.Abs(y - Math.Abs(e.Y - y))) };
             Kaydet.cokgen(strRenk, altigenNoktalar);
         }
         else if (bucgen)
         {
             Point[] ucgenDizi = { new Point(x, y), new Point(Math.Abs(x - (e.X - x)), e.Y), new Point(e.X, e.Y) };
             Kaydet.cokgen(strRenk, ucgenDizi);
         }
     }
     ciz = false;
 }
示例#2
0
 private void panel1_MouseMove(object sender, MouseEventArgs e)
 {
     if (ciz)
     {
         SekilCiz.sekilCiz(panel1, e, secimRenk, strRenk);
     }
 }
示例#3
0
 private void panel1_MouseDown(object sender, MouseEventArgs e)
 {
     if (!sec)
     {
         ciz = true;
     }
     if (ciz)
     {
         SekilCiz.sekilCiz(e);
     }
     x = e.X;
     y = e.Y;
 }
示例#4
0
 private void karePanel_MouseClick(object sender, MouseEventArgs e)
 {
     sekil = "K";
     SekilCiz.sekilCizTik("kare");
     MenuArkaplanRenk.ArkaPlanDegis(dairePanel, Color.MistyRose);
     MenuArkaplanRenk.ArkaPlanDegis(altigenPanel, Color.MistyRose);
     MenuArkaplanRenk.ArkaPlanDegis(ucgenPanel, Color.MistyRose);
     MenuArkaplanRenk.ArkaPlanDegis(karePanel, Color.SeaGreen);
     bucgen   = false;
     baltigen = false;
     bdaire   = false;
     bkare    = true;
 }