public Image BackGlassImage(bool withGrill) { Image pic = B2sTools.StringToImage(getImageXML(getImageTypeToUse())); if (!withGrill && pic != null) { pic = B2sTools.CropImage(pic, new Rectangle(0, 0, pic.Width, pic.Height - GrillHeight)); } return(pic); }
public Image GrillImage() { Image pic = BackGlassImage(true); if (pic != null) { pic = B2sTools.CropImage(pic, new Rectangle(0, pic.Height - GrillHeight, pic.Width, GrillHeight)); } return(pic); }
private void btnExportRes_Click(object sender, EventArgs e) { SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory = Path.GetDirectoryName(screensPupFile); try { saveFileDialog1.FileName = selectedPupScreen.Window.DefaultResName; } catch { saveFileDialog1.FileName = ""; } saveFileDialog1.Filter = "res file|*.res"; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { if (saveFileDialog1.FileName != "") { string content = B2sTools.BuildResFile(selectedPupScreen, refScreens); System.IO.File.WriteAllText(saveFileDialog1.FileName, content); MessageBox.Show(this, "RES file saved", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }