private void SidePanelHide_btn_Click(object sender, EventArgs e) { if (Side_Panel_Hided) { MainSide_pnl.Width = 280; SideMenu_pnl.Width = 280; SidePanelHadler_pnl.Width = 280; //MainMenMain_pnl.Width = MainMenMain_pnl.Width - 146; if (MainSide_pnl.Width >= 71) { SideMenuTimer.Stop(); Side_Panel_Hided = false; this.Refresh(); //MainMenuMain_pnl.Refresh(); Vehicles_btn.Text = " Vehicles"; Driver_btn.Text = " Drivers"; Customer_btn.Text = " Customer"; BackHome_btn.Text = " Home"; MainMenusettings_btn.Text = " Settings"; Packages_btn.Text = " Packages"; NameTag_btn.Visible = true; } } else { MainSide_pnl.Width = 94; SideMenu_pnl.Width = 94; SidePanelHadler_pnl.Width = 83; //MainMenMain_pnl.Width = MainMenMain_pnl.Width + 146; if (MainSide_pnl.Width <= Panel_Size) { Vehicles_btn.Text = ""; Driver_btn.Text = ""; Customer_btn.Text = ""; BackHome_btn.Text = ""; MainMenusettings_btn.Text = ""; Packages_btn.Text = ""; NameTag_btn.Visible = false; SideMenuTimer.Stop(); Side_Panel_Hided = true; this.Refresh(); //MainMenuMain_pnl.Refresh(); } } #endregion }
private void SideMenuTimer_Tick(object sender, EventArgs e) { if (Side_Panel_Hided) { MainSide_pnl.Width = 280; SideMenu_pnl.Width = 280; SidePanelHadler_pnl.Width = 280; //MainMenMain_pnl.Width = MainMenMain_pnl.Width - 146; if (MainSide_pnl.Width >= 71) { SideMenuTimer.Stop(); Side_Panel_Hided = false; this.Refresh(); MainMenuMain_pnl.Refresh(); Rent_btn.Text = " Rent"; Hire_btn.Text = " Hire"; Return_btn.Text = " Customer"; Data_btn.Text = " Data"; Settings_btn.Text = " Settings"; NameTag_btn.Visible = true; } } else { MainSide_pnl.Width = 94; SideMenu_pnl.Width = 94; SidePanelHadler_pnl.Width = 83; //MainMenMain_pnl.Width = MainMenMain_pnl.Width + 146; if (MainSide_pnl.Width <= Panel_Size) { SideMenuTimer.Stop(); Side_Panel_Hided = true; this.Refresh(); MainMenuMain_pnl.Refresh(); Rent_btn.Text = ""; Hire_btn.Text = ""; Return_btn.Text = ""; Data_btn.Text = ""; Settings_btn.Text = ""; NameTag_btn.Visible = false; } } }