Beispiel #1
0
        private void btn_Screen_Click(object sender, EventArgs e)
        {
            if (f_EditorScreen != null && !f_EditorScreen.IsDisposed)
            {
                f_EditorScreen.WindowState = FormWindowState.Normal;
                f_EditorScreen.BringToFront();
                f_EditorScreen.Focus();
            }
            else
            {
                f_EditorScreen = new f_Screen
                {
                    parent = this
                };
            }

            f_EditorScreen.Show();
            if (Properties.Settings.Default.s_ToolbarPanel == 0)
            {
                if (tools == null || tools.IsDisposed)
                {
                    tools = new f_ToolsPanel();
                }
                f_EditorScreen.child = tools;
                tools.parent         = f_EditorScreen;
                tools.Show();
            }
        }
Beispiel #2
0
        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 = "";
                }
            }
        }
Beispiel #3
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 (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();
                }
            }
        }