public void handleCutouts(int mode) { Bitmap bmp = doCutting(mode); int i = 0; var x = Application.OpenForms; foreach (Form f in x) { if (f is f_Screen) { i++; break; } } if (i == 0) { fs = new f_Screen(); fs.parent = this; fs.Show(); if (Properties.Settings.Default.s_ToolbarPanel == 0) { tools = new f_SettingPanel(); tools.parent = fs; fs.child = tools; tools.Show(); } } if (fs != null) { fs.addImage(bmp); } }
public Bitmap doCutting(int mode) { Bitmap bmp = null; bmp = showCaptureArea(getScreenSize(), captureScreen(), mode); Show(); if (fs != null && !fs.IsDisposed) { fs.Show(); } if (tools != null && !tools.IsDisposed) { tools.Show(); } if (fs != null && fs.pw != null && !fs.pw.IsDisposed) { fs.pw.Show(); } return(bmp); }