Exemple #1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            switch (fitComboBox.SelectedIndex)
            {
            case 2:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Stretch);
                break;

            case 3:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Tile);
                break;

            case 4:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Center);
                break;

            case 0:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Fill);
                break;

            case 1:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Fit);
                break;

            case 5:
                WallpaperManager.Set(bmp, WallpaperManager.Style.Span);
                break;
            }
        }
Exemple #2
0
 private void okButton_Click(object sender, EventArgs e)
 {
     if (stretchedRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Stretch);
     }
     else if (tiledRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Tile);
     }
     else if (centeredRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Center);
     }
     else if (fillRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Fill);
     }
     else if (fitRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Fit);
     }
     else if (spanRadio.Checked)
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Span);
     }
 }
 private void okButton_Click(object sender, EventArgs e)
 {
     if (fitComboBox.Text == "Stretch")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Stretch);
     }
     else if (fitComboBox.Text == "Tile")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Tile);
     }
     else if (fitComboBox.Text == "Center")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Center);
     }
     else if (fitComboBox.Text == "Fill")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Fill);
     }
     else if (fitComboBox.Text == "Fit")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Fit);
     }
     else if (fitComboBox.Text == "Span")
     {
         WallpaperManager.Set(bmp, WallpaperManager.Style.Span);
     }
 }