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 void hideToolBar() { child = new f_SettingPanel(); child.parent = this; child.Show(); Properties.Settings.Default.s_ToolbarPanel = 0; Properties.Settings.Default.Save(); //splitContainer1.Panel2Collapsed = true; p_Tools.Width = 0; ts_Tools.Hide(); invalidateTools(); }
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); }
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 (fs != null && !fs.IsDisposed) { tools = new f_SettingPanel(); tools.parent = fs; fs.child = tools; tools.Show(); } } else if (panel == 1) { if (fs != null && !fs.IsDisposed) { fs.togglePanel(); } } else if (panel == 2) { if (fs != null && !fs.IsDisposed) { fs.toggleToolbar(); } } }