Skip to content

Commit fd08e95

Browse files
committed
Pre Release 2
1 parent 9489475 commit fd08e95

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

SuperGrate/Classes/UserList.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public static void SetColumns(this ListView Owner, UserRow TemplateRow, string F
6464
public static void SetRows(this ListView Owner, UserRows Rows)
6565
{
6666
Owner.BeginUpdate();
67+
Owner.SuspendLayout();
6768
Owner.Items.Clear();
6869
if (Rows != null)
6970
{
@@ -87,7 +88,9 @@ public static void SetRows(this ListView Owner, UserRows Rows)
8788
}
8889
}
8990
Owner.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
91+
Owner.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
9092
}
93+
Owner.ResumeLayout();
9194
Owner.EndUpdate();
9295
}
9396
}

SuperGrate/Main.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SuperGrate/Main.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ private async void BtnListSource_Click(object sender, EventArgs e)
148148
listUsers.Items.Clear();
149149
lblUserList.Text = "Users on Source Computer:";
150150
Dictionary<string, string> users = await Misc.GetUsersFromHost(tbSourceComputer.Text);
151-
List<string> tags = new List<string>();
152151
if (users != null)
153152
{
154153
bool setting;
@@ -164,10 +163,9 @@ private async void BtnListSource_Click(object sender, EventArgs e)
164163
Logger.Verbose("Skipped unknown SID: " + user.Key + ".");
165164
continue;
166165
}
167-
listUsers.Items.Add(user.Value);
168-
tags.Add(user.Key);
166+
ListViewItem item = listUsers.Items.Add(user.Value);
167+
item.Tag = user.Key;
169168
}
170-
listUsers.Tag = tags.ToArray();
171169
listUsers.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
172170
listUsers.EndUpdate();
173171
CurrentListSource = ListSources.SourceComputer;

0 commit comments

Comments
 (0)