Exemplo n.º 1
0
        private void deleteGroupButton_Click(object sender, RoutedEventArgs e)
        {
            foreach (MiniInfo mini in myGroupsStackPanel.Children)
            {
                if (mini.Button.Content.ToString() == ((Info)ContentArea.Content).nameLabel.Content.ToString())
                {
                    Audit.GroupDeleteSuccess(loggedUser.Username, mini.Button.Content.ToString());
                    myGroupsStackPanel.Children.Remove(mini);
                    clientProxy.DeleteGroup(mini.Button.Content.ToString(), loggedUser.Username);
                    break;
                }
            }

            ((Info)ContentArea.Content).obj  = loggedUser;
            ((Info)ContentArea.Content).type = "user";
            ((Info)ContentArea.Content).SetInfo();

            deleteGroupButton.Visibility = Visibility.Hidden;
            changeGroupButton.Visibility = Visibility.Hidden;
        }