예제 #1
0
        private void buttonMode_Click(object sender, EventArgs e)
        {
            switch (this.etatModeImage)
            {
            case modeImage.stretch:
                this.pictureBoxMain.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
                this.buttonMode.Text         = "Zoomer";
                this.pictureBoxMain.Refresh();
                this.etatModeImage = modeImage.center;
                break;

            case modeImage.center:
                this.pictureBoxMain.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
                this.buttonMode.Text         = "Centrer";
                this.pictureBoxMain.Refresh();
                this.etatModeImage = modeImage.zoom;
                break;

            case modeImage.zoom:
                this.pictureBoxMain.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                this.buttonMode.Text         = "Etirer";
                this.pictureBoxMain.Refresh();
                this.etatModeImage = modeImage.stretch;
                break;
            }
        }
예제 #2
0
 private void FormControlePrintScreen_Load(object sender, EventArgs e)
 {
     this.etatModeImage   = modeImage.center;
     this.buttonMode.Text = "Zoomer";
     FormControlePrintScreen.chargerImage(etat.initial, this);
     this.Focus();
 }