示例#1
0
文件: Main.cs 项目: StraykerPL/Binder
        private void TabController_DoubleClick(object sender, EventArgs e)
        {
            var dialog = new TextMessageBox();

            dialog.ShowDialog();
            var tab = this.TabController.SelectedTab;

            tab.Name = dialog.Input.Text;
            tab.Text = dialog.Input.Text;
        }
示例#2
0
文件: Main.cs 项目: StraykerPL/Binder
        /// <summary>
        /// Creates new tab with separate table.
        /// </summary>
        private void NewTabToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dialog = new TextMessageBox();

            dialog.ShowDialog();

            var frm = new Main();
            var tab = frm.DataTab;

            tab.Width  = 188;
            tab.Height = 88;

            var pg = new TabPage
            {
                Name = dialog.Input.Text,
                Text = dialog.Input.Text
            };

            pg.BackColor = Color.White;
            pg.Controls.Add(tab);
            TabController.TabPages.Add(pg);
        }