private void Tt_panel_Tick(object sender, EventArgs e) { posX -= 15; if (posX <= 30) { pnl_user.Location = new Point(30, pnl_user.Location.Y); Tt_panel.Stop(); Tt_panel.Enabled = false; } else { pnl_user.Location = new Point(posX, pnl_user.Location.Y); } }
void MenuHide() { if (!SingIn) { foreach (object item in ms1.Items) { if (item is ToolStripMenuItem) { (item as ToolStripMenuItem).Visible = false; } else if (item is ToolStripTextBox) { (item as ToolStripTextBox).Visible = false; } } ms1.SuspendLayout(); btn_Search.Hide(); tc_main.SelectedIndex = 0; tms_obm.Visible = true; tabPage1.SuspendLayout(); pnl_user.Location = new Point((tabPage1.Width / 2) - pnl_user.Width, pnl_user.Location.Y); tabPage1.ResumeLayout(); ms1.ResumeLayout(); tms_home.Visible = false; } else { ms1.SuspendLayout(); Animations.Enabled = true; Animations.Start(); ms1.ResumeLayout(); pnl_user.SuspendLayout(); Tt_panel.Enabled = true; Tt_panel.Start(); pnl_user.ResumeLayout(); tms_home.Visible = true; } }