private async void BT_TimeLine_Click(object sender, RoutedEventArgs e) { if (IsLoggedIn && !IsOffline) { if (TimeLineWindow == null) { TimeLineWindow = new TimeLineWindow { fromMainMenu = true }; TimeLineWindow.Show(); //timeLineWindow.Activate(); } else { await TimeLineWindow.RefreshTimeline(null, true); TimeLineWindow.Show(); TimeLineWindow.Activate(); } } else { GlobalHelper.ShowOfflineMessage(); } }
private void BT_DeleteBlinded_Click(object sender, RoutedEventArgs e) { if (MainWindow.IsLoggedIn && !MainWindow.IsOffline) { List <FriendData.Profile> blinded = new List <FriendData.Profile>(); foreach (var friend in MainWindow.UserFriends.profiles) { if (friend.blocked == true) { blinded.Add(friend); } } if (blinded.Count > 0) { if (MessageBox.Show($"{blinded.Count.ToString()}명의 제한된 사용자를 삭제하시겠습니까?\n이 작업은 돌이킬 수 없습니다.", "경고", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes) { ProgressWindow pw = new ProgressWindow(blinded); pw.TB_Content.Text = "초기화중..."; pw.ShowDialog(); } } else { MessageBox.Show("친구 목록에 제한된 사용자가 없습니다."); } } else { GlobalHelper.ShowOfflineMessage(); } }
private void BT_Favorite_Click(object sender, RoutedEventArgs e) { if (!IsLoggedIn && !IsOffline) { GlobalHelper.ShowOfflineMessage(); } else { TimeLineWindow.showBookmarkedGlobal = true; TimeLineWindow timeLineWindow = new TimeLineWindow(UserProfile.id); timeLineWindow.Show(); timeLineWindow.Activate(); } }
private void BT_Write_Click(object sender, RoutedEventArgs e) { if (!IsLoggedIn && !IsOffline) { GlobalHelper.ShowOfflineMessage(); } else { if (StoryWriteWindow == null) { StoryWriteWindow = new StoryWriteWindow(); StoryWriteWindow.Show(); //storyWriteWindow.Activate(); } else { StoryWriteWindow.Show(); StoryWriteWindow.Activate(); } } }
private async void BT_MyProfile_Click(object sender, RoutedEventArgs e) { if (IsLoggedIn && !IsOffline) { if (ProfileTimeLineWindow == null) { var window = new TimeLineWindow(UserProfile.id); window.Show(); } else { await ProfileTimeLineWindow.RefreshTimeline(null, true); ProfileTimeLineWindow.Show(); ProfileTimeLineWindow.Activate(); } } else { GlobalHelper.ShowOfflineMessage(); } }
private void BT_Friends_Click(object sender, RoutedEventArgs e) { if (IsLoggedIn && !IsOffline) { if (FriendListWindow == null) { FriendListWindow = new FriendSelectWindow(null, true); FriendListWindow.BT_Submit.Visibility = Visibility.Collapsed; FriendListWindow.RD_Submit.Height = new GridLength(0); FriendListWindow.Show(); //friendListWindow.Activate(); } else { FriendListWindow.Show(); FriendListWindow.Activate(); } } else { GlobalHelper.ShowOfflineMessage(); } }
public async void BT_Notifiations_Click(object sender, RoutedEventArgs e) { if (IsLoggedIn && !IsOffline) { if (NotificationsWindow == null) { NotificationsWindow = new NotificationsWindow(); NotificationsWindow.Show(); //notificationsWindow.Activate(); } else { await NotificationsWindow.Refresh(); NotificationsWindow.Show(); NotificationsWindow.Activate(); } } else { GlobalHelper.ShowOfflineMessage(); } }