private void employees_Click(object sender, EventArgs e) { // Moving the buttonSelector ButtonSelector.Top = employees.Top; ButtonSelector.Height = employees.Height; // Show the employees Panel Console.WriteLine("employees Showing"); tabControl.SelectedIndex = 0; // Hiding all the other tabs avilable tabControl.TabPages[1].Hide(); tabControl.TabPages[2].Hide(); tabControl.TabPages[3].Hide(); // Loading tab's content TabContent m = new TabContent(this, 0, TabChooser.Employees); m.TopLevel = false; // Attching it to the TabPage tabControl.TabPages[0].Controls.Add(m); // Showing the content m.FormBorderStyle = FormBorderStyle.None; m.Dock = DockStyle.Fill; m.Show(); tabControl.TabPages[0].Show(); }
private void ManageATMs_Click(object sender, EventArgs e) { // Moving the buttonSelector ButtonSelector.Top = ManageATMs.Top; ButtonSelector.Height = ManageATMs.Height; // Show the ATMsContent Panel Console.WriteLine("ATMs Showing"); // Hiding all the other tabs avilable tabControl.TabPages[0].Hide(); tabControl.TabPages[2].Hide(); tabControl.TabPages[3].Hide(); // Loading tab's content TabContent m = new TabContent(this, 1, TabChooser.ATM); m.TopLevel = false; // Attching it to the TabPage tabControl.TabPages[1].Controls.Add(m); // Showing the content m.FormBorderStyle = FormBorderStyle.None; m.Dock = DockStyle.Fill; m.Show(); // Displaying the TabPage tabControl.TabPages[1].Show(); }
private void ManageCars_Click(object sender, EventArgs e) { // Moving the buttonSelector ButtonSelector.Top = ManageCars.Top; ButtonSelector.Height = ManageCars.Height; // Change Tab tabControl.TabPages[0].Hide(); tabControl.TabPages[1].Hide(); tabControl.TabPages[2].Hide(); TabContent m = new TabContent(this, 3, TabChooser.Cars); m.TopLevel = false; m.FormBorderStyle = FormBorderStyle.None; m.Dock = DockStyle.Fill; m.Show(); // Attching it to the TabPage and showing tabControl.TabPages[3].Controls.Add(m); tabControl.TabPages[3].Show(); }