Exemplo n.º 1
0
        void RefreshUsersListBox()
        {
            UsersListBox.ClearSelected();
            UsersListBox.Items.Clear();

            gitUserManager.Users.ForEach(x => UsersListBox.Items.Add(x.Name));
        }
        void InitializeUsersListBox()
        {
            UsersListBox.ClearSelected();
            UsersListBox.Items.Clear();

            gitUserManager.Users.ForEach(x =>
            {
                UsersListBox.Items.Add(x.Name);

                if (gitUserManager.ActiveUsers.Contains(x))
                {
                    UsersListBox.SelectedItems.Add(x.Name);
                }
            });
        }
Exemplo n.º 3
0
        void InitializeGitUserEditForm(GitUser user)
        {
            currentUser = user;

            NameTextBox.Text       = currentUser.Name;
            EmailTextBox.Text      = currentUser.Email;
            SshKeyFileTextBox.Text = currentUser.SshKeyPath;
            SaveButton.Text        = currentUser is NullGitUser ? "Save New User" : "Update User";
            ErrorsLabel.Text       = "";

            if (currentUser is NullGitUser)
            {
                UsersListBox.ClearSelected();
            }
        }