Пример #1
0
        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);
            }
        }
Пример #2
0
 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();
 }
Пример #3
0
        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);
        }
Пример #4
0
        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();
                }
            }
        }