Пример #1
0
        public frmMain()
        {
            InitializeComponent();
            frmBase fb = new frmBase();

            fb.panel_DERECHO   = this.splitContainer1.Panel2;
            fb.panel_IZQUIERDO = this.splitContainer1.Panel1;
            fb.CargarBotones();
            fb.Show();
        }
Пример #2
0
        public void ShowForm(frmBase frm)
        {
            FATabStripItem item = null;

            if (dicShows.ContainsKey(frm.Name))
            {
                FATabStrip.SelectedItem = dicShows[frm.Name];
                item = FATabStrip.SelectedItem;
                item.Controls.RemoveAt(0);
                frmBase opennedForm = (frmBase)Application.OpenForms[frm.Name];
                opennedForm.Close();
                //return;
            }
            else
            {
                item = new FATabStripItem(frm.Text, null);
                FATabStrip.AddTab(item);
                dicShows.Add(frm.Name, item);
            }
            FATabStrip.Dock = DockStyle.Fill;
            item.Dock       = DockStyle.Fill;
            frm.Dock        = DockStyle.Fill;

            frm.TopLevel        = false;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.WindowState     = FormWindowState.Maximized;

            item.Controls.Add(frm);


            frm.Dock = DockStyle.Fill;

            FATabStrip.SelectedItem = item;
            item.Selected           = true;
            frm.Show();

            defaulItem.Visible = false;
            GC.Collect();
        }
Пример #3
0
        private void frmBaseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new frmBase();

            f.Show();
        }