public Carte(etude proj, int i) { InitializeComponent(); projet = proj; nproj = i; fen = new Fenetre(); }
private void décalageToolStripMenuItem_Click(object sender, EventArgs e) { Affichage affichage = new Affichage(fen); affichage.ShowDialog(); fen = affichage.fenetre; fen.echelle = Convert.ToSingle(affichage.textBox1.Text); fen.xl = fen.xc - 0.5f * this.Width * fen.echelle; fen.xu = fen.xc + 0.5f * this.Width * fen.echelle; fen.yl = fen.yc - 0.5f * this.Height * fen.echelle; fen.yu = fen.yc + 0.5f * this.Height * fen.echelle; this.Invalidate(); }
public Affichage(Fenetre fen) { InitializeComponent(); fenetre = fen; }
private void decalageToolStripMenuItem_Click(object sender, EventArgs e) { Affichage affichage = new Affichage(fen); affichage.ShowDialog(); fen = affichage.fenetre; fen.echelle = Convert.ToSingle(affichage.textBox1.Text); fen.xl = fen.xc - 0.5f * this.Width * fen.echelle; fen.xu = fen.xc + 0.5f * this.Width * fen.echelle; fen.yl = fen.yc - 0.5f * this.Height * fen.echelle; fen.yu = fen.yc + 0.5f * this.Height * fen.echelle; this.Invalidate(); }