public Bitmap doCutting(int mode) { Bitmap bmp = null; bmp = showCaptureArea(getScreenSize(), captureScreen(), mode); if (!IsHidden) { Show(); } if (f_EditorScreen != null && !f_EditorScreen.IsDisposed) { f_EditorScreen.Show(); } if (tools != null && !tools.IsDisposed) { tools.Show(); } if (f_EditorScreen != null && f_EditorScreen.pw != null && !f_EditorScreen.pw.IsDisposed && QshowPreview()) { f_EditorScreen.pw.Show(); } return(bmp); }
public void handleCutouts(int mode) { Bitmap bmp = null; if (Properties.Settings.Default.s_hasDelay) { } else { } bmp = doCutting(mode); if (mode == -1) { if (bmp != null) { Clipboard.SetImage(bmp); } } else { int i = 0; var x = Application.OpenForms; foreach (Form f in x) { if (f is f_Screen) { i++; break; } } if (i == 0) { f_EditorScreen = new f_Screen { parent = this }; f_EditorScreen.Show(); f_EditorScreen.Refresh(); if (Properties.Settings.Default.s_ToolbarPanel == 0) { tools = new f_ToolsPanel { parent = f_EditorScreen }; f_EditorScreen.child = tools; tools.Show(); } } if (f_EditorScreen != null) { f_EditorScreen.addImage(bmp, lastCutoutId); lastCutoutId = ""; } } }
private void btn_Settings_Click(object sender, EventArgs e) { int panel = Properties.Settings.Default.s_ToolbarPanel; if (panel == 0) { if (tools != null && !tools.IsDisposed) { try { tools.Close(); } catch { } } else if (f_EditorScreen != null && !f_EditorScreen.IsDisposed) { tools = new f_ToolsPanel { parent = f_EditorScreen }; f_EditorScreen.child = tools; tools.Show(); } } else if (panel == 1) { if (f_EditorScreen != null && !f_EditorScreen.IsDisposed) { f_EditorScreen.togglePanel(); } } else if (panel == 2) { if (f_EditorScreen != null && !f_EditorScreen.IsDisposed) { f_EditorScreen.toggleToolbar(); } } }