private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { int x = e.X; int y = e.Y; System.Drawing.Point p = new Point(x, y); riskcsharp.ulke c = haritaolustur.getCityAtPoint(p); if (c == lastcity) { return; } if (c != null) { tooltip.Visible = true; Secilen_Ulke.Text = c.ismi; pictureBox1.Cursor = Cursors.Hand; } else { pictureBox1.Cursor = Cursors.Default; } lastcity = c; }
private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { System.Drawing.Point p = new Point(e.X, e.Y); g = pictureBox1.CreateGraphics(); secilenSehir = haritaolustur.getCityAtPoint(p); if (secilenSehir == null) { return; } else if (Durum.dr_index == 0)//Durum:UlkeSec { drm_UlkeSec.renk_fill(g, p, secilenSehir, Sıradakioyuncu, panel1, Bonus_Asker, Secilen_Ulke, Harita.Ulkeler, İlerle, 21); //label'a yazdırma haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 1) //Durum:ilk bonusAsker { drm_askerDagit.askerdagitim_islem(secilenSehir, Durum.sırakimde, Secilen_Ulke, Sıradakioyuncu, panel1,label1,Bonus_Asker); haritaolustur.tablo_yenile(label7, label8, label9, label10); haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 2) { btngec.Visible = false; drm_askerDagit2.askerdagitim_2(secilenSehir, Durum.sırakimde, label1,Bonus_Asker); haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 3) { btngec.Visible = true; drm_atakk.push(secilenSehir); drm_atakk.atak_(drm_atak.tutulanulke, Sıradakioyuncu, Secilen_Ulke, panel1,label1); haritaolustur.tablo_yenile(label7, label8, label9, label10); if (profil.oyuncular[0].Ulke_sayisi==0 || profil.oyuncular[1].Ulke_sayisi==0) { MessageBox.Show(profil.oyuncular[1].ismioku()); } else if(profil.oyuncular[1].Ulke_sayisi==0){ MessageBox.Show(profil.oyuncular[0].ismioku()+" kazandı.."); } } Secilen_Ulke.Text = "Sectiginiz ulke " + secilenSehir.ismi; }
private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { System.Drawing.Point p = new Point(e.X, e.Y); g = pictureBox1.CreateGraphics(); secilenSehir = haritaolustur.getCityAtPoint(p); if (secilenSehir == null) { return; } else if (Durum.dr_index == 0)//Durum:UlkeSec { drm_UlkeSec.renk_fill(g, p, secilenSehir, Sıradakioyuncu, panel1, Bonus_Asker, Secilen_Ulke, Harita.Ulkeler, İlerle, 21); //label'a yazdırma haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 1) //Durum:ilk bonusAsker { drm_askerDagit.askerdagitim_islem(secilenSehir, Durum.sırakimde, Secilen_Ulke, Sıradakioyuncu, panel1, label1, Bonus_Asker); haritaolustur.tablo_yenile(label7, label8, label9, label10); haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 2) { btngec.Visible = false; drm_askerDagit2.askerdagitim_2(secilenSehir, Durum.sırakimde, label1, Bonus_Asker); haritaolustur.tablo_yenile(label7, label8, label9, label10); } else if (Durum.dr_index == 3) { btngec.Visible = true; drm_atakk.push(secilenSehir); drm_atakk.atak_(drm_atak.tutulanulke, Sıradakioyuncu, Secilen_Ulke, panel1, label1); haritaolustur.tablo_yenile(label7, label8, label9, label10); if (profil.oyuncular[0].Ulke_sayisi == 0 || profil.oyuncular[1].Ulke_sayisi == 0) { MessageBox.Show(profil.oyuncular[1].ismioku()); } else if (profil.oyuncular[1].Ulke_sayisi == 0) { MessageBox.Show(profil.oyuncular[0].ismioku() + " kazandı.."); } } Secilen_Ulke.Text = "Sectiginiz ulke " + secilenSehir.ismi; }
public void renk_fill(System.Drawing.Graphics grap, System.Drawing.Point p, ulke ulkelabel, Label label, Panel panel, Label labell, Label secilen_ulke, List <ulke> ulkeler, Button buton1, int adet) { if (ulkelabel.sahip == null) { riskcsharp.ulke c = Games.haritaolustur.getCityAtPoint(p); if (c == null) { return; } mybrush = new SolidBrush(Durum.sırakimde.renkoku()); grap.FillPolygon(mybrush, c.ulke_Koordinat); kalan_bonus(labell); toprak_Ekle(Durum.sırakimde, 1); asker_Ver(Durum.sırakimde, 1); asker_dagit(adet, ulkelabel); oyuncu_Degistir(profil.oyuncular); ortam_Controldegistir(Durum.sırakimde, label, secilen_ulke, panel); } int i = 0; foreach (ulke k in ulkeler) { if (k.sahip != null) { i++; } } if (i == ulkeler.Count) { buton1.Enabled = true; } else { buton1.Enabled = false; } }
private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { int x = e.X; int y = e.Y; System.Drawing.Point p = new Point(x, y); riskcsharp.ulke c = haritaolustur.getCityAtPoint(p); if (c == lastcity) return; if (c != null) { tooltip.Visible = true; Secilen_Ulke.Text = c.ismi; pictureBox1.Cursor = Cursors.Hand; } else { pictureBox1.Cursor = Cursors.Default; } lastcity = c; }