private void btn_Screen_Click(object sender, EventArgs e) { if (fs != null && !fs.IsDisposed) { fs.WindowState = FormWindowState.Normal; fs.BringToFront(); fs.Focus(); } else { fs = new f_Screen(); fs.parent = this; } fs.Show(); if (Properties.Settings.Default.s_ToolbarPanel == 0) { if (tools == null || tools.IsDisposed) { tools = new f_SettingPanel(); } fs.child = tools; tools.parent = fs; tools.Show(); } }
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(); }
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(); } } }