public UserPageWindow() { InitializeComponent(); db = new ApplicationContext(); DoubleAnimation btnAnimation = new DoubleAnimation(); btnAnimation.From = 0; btnAnimation.To = 268; btnAnimation.Duration = TimeSpan.FromSeconds(3); Profile.BeginAnimation(Button.WidthProperty, btnAnimation); HelpBtn.BeginAnimation(Button.WidthProperty, btnAnimation); Settings.BeginAnimation(Button.WidthProperty, btnAnimation); }
//hides the main menu void hideMenu() { ClassicBtn.Hide(); ExitBtn.Hide(); HelpBtn.Hide(); TimeBtn.Hide(); multiplayerBtn.Hide(); menuBack.Hide(); HomeTLbl.Hide(); boardHomeBtn.Show(); TitleLbl.Show(); if (gameMode == 2) { P1ScoreLbl.Show(); P2ScoreLbl.Show(); turnLbl.Show(); } }
//shows the main menu void showMenu() { ClassicBtn.Invoke(new Action(() => ClassicBtn.Show())); ExitBtn.Invoke(new Action(() => ExitBtn.Show())); HelpBtn.Invoke(new Action(() => HelpBtn.Show())); multiplayerBtn.Invoke(new Action(() => multiplayerBtn.Show())); TimeBtn.Invoke(new Action(() => TimeBtn.Show())); menuBack.Invoke(new Action(() => menuBack.Show())); HomeTLbl.Invoke(new Action(() => HomeTLbl.Show())); boardHomeBtn.Invoke(new Action(() => boardHomeBtn.Hide())); CountdownLbl.Invoke(new Action(() => CountdownLbl.Hide())); TitleLbl.Invoke(new Action(() => TitleLbl.Hide())); if (gameMode == 2) { P1ScoreLbl.Invoke(new Action(() => P1ScoreLbl.Hide())); P2ScoreLbl.Invoke(new Action(() => P2ScoreLbl.Hide())); turnLbl.Invoke(new Action(() => turnLbl.Hide())); } }