private void Button_Click(object sender, RoutedEventArgs e) { TransitioningContentSlide.ApplyTemplate(); layoutDorm.Children.Clear(); layoutDorm.VerticalAlignment = VerticalAlignment.Top; layoutDorm.HorizontalAlignment = HorizontalAlignment.Left; layoutDorm.Width = 1150; layoutDorm.Height = 720; if (handlerArrowLeft == 0) { layoutDorm.Children.Add(new HomeControl(user)); } else if (handlerArrowLeft == 1) { layoutDorm.Children.Add(new MyDorm(user)); } else if (handlerArrowLeft == 2) { layoutDorm.Children.Add(new MyDorm(BookDatabase.GetUserDorm(user.Email, dorm.Id))); } else { layoutDorm.Children.Add(new LikedDorm(LikeDatabase.GetAllListDormByEmail(user.Email), user)); } }
public ShowDorm(Dorm dorm, User user, byte State) { handlerArrowLeft = State; InitializeComponent(); this.user = user; this.dorm = dorm; TransitioningContentSlide.ApplyTemplate(); initDorm(); initProfile(); initLike(); initBookDorm(); initComment(); SetHover(iconSend); }