Пример #1
0
        //Fills the tabs with views
        public Form1()
        {
            InitializeComponent();
            DataTab s = new Stock();
            DataTab c = new Client_s_Order();
            DataTab o = new OrderPiece();

            Tab.TabPages[0].Controls.Add(s.pnl);
            Tab.TabPages[1].Controls.Add(c.pnl);
            Tab.TabPages[2].Controls.Add(o.pnl);
            this.Activated += Form1_Activated;
        }
Пример #2
0
        //Updates the views when this form become the main window
        private void Form1_Activated(object sender, EventArgs e)
        {
            DataTab sa = new Stock();
            DataTab ca = new Client_s_Order();
            DataTab oa = new OrderPiece();

            Tab.TabPages[0].Controls.Clear();
            Tab.TabPages[0].Controls.Add(sa.pnl);
            Tab.TabPages[1].Controls.Clear();
            Tab.TabPages[1].Controls.Add(ca.pnl);
            Tab.TabPages[2].Controls.Clear();
            Tab.TabPages[2].Controls.Add(oa.pnl);
        }