Exemplo n.º 1
0
        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            try
            {
                TabPage  tpage = new TabPage("代码调试");
                F_Runphp form  = new F_Runphp();              //动态创建一个窗体
                form.FormBorderStyle  = FormBorderStyle.None; //取消边框
                form.TopLevel         = false;
                form.txt_phpcode.Text = "<?php \r\n\r\n\r\n?>";
                form.Dock             = DockStyle.Fill;//控件边缘控制
                tpage.Controls.Add(form);
                tab_main.TabPages.Add(tpage);

                form.Show();
                tab_main.SelectedTab = tpage;
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 2
0
        private void 调试选中ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (txt_code.ActiveTextAreaControl.SelectionManager.SelectedText != null && txt_code.ActiveTextAreaControl.SelectionManager.SelectedText != "")
            {
                try
                {
                    TabPage  tpage = new TabPage("代码调试");
                    F_Runphp form  = new F_Runphp();             //动态创建一个窗体
                    form.FormBorderStyle = FormBorderStyle.None; //取消边框
                    form.TopLevel        = false;
                    form.Dock            = DockStyle.Fill;       //控件边缘控制
                    tpage.Controls.Add(form);
                    F_Main.Tab.TabPages.Add(tpage);

                    form.txt_phpcode.Text = "<?php \r\n\r\n" + txt_code.ActiveTextAreaControl.SelectionManager.SelectedText + " \r\n?>";
                    form.Show();
                    F_Main.Tab.SelectedTab = tpage;
                }
                catch (Exception)
                {
                }
            }
        }