Skip to content

Commit

Permalink
GUI: Change Players table code to add rows directly
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Jan 17, 2021
1 parent 0b7d975 commit bc5a0be
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 69 deletions.
64 changes: 0 additions & 64 deletions GUI/Descriptors.cs

This file was deleted.

1 change: 0 additions & 1 deletion GUI/MCGalaxyGUI.csproj
Expand Up @@ -58,7 +58,6 @@
</Compile>
<Compile Include="Controls\HackyPropertyGrid.cs" />
<Compile Include="Controls\TimespanUpDown.cs" />
<Compile Include="Descriptors.cs" />
<Compile Include="GuiPerms.cs" />
<Compile Include="Popups\ColorSelector.cs" />
<Compile Include="Popups\ColorSelector.Designer.cs">
Expand Down
28 changes: 28 additions & 0 deletions GUI/Window/Window.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions GUI/Window/Window.Main.cs
Expand Up @@ -224,9 +224,10 @@ public partial class Window : Form {
Player[] players = PlayerInfo.Online.Items;
string selected = GetSelected(main_Players);

PlayerCollection pc = new PlayerCollection();
foreach (Player pl in players) { pc.Add(pl); }
main_Players.DataSource = pc;
main_Players.Rows.Clear();
foreach (Player pl in players) {
main_Players.Rows.Add(pl.name, pl.level.name, pl.group.Name);
}

Reselect(main_Players, selected);
main_Players.Refresh();
Expand Down
1 change: 0 additions & 1 deletion GUI/Window/Window.cs
Expand Up @@ -57,7 +57,6 @@ public partial class Window : Form {
Text = Server.Config.Name + " - " + Server.SoftwareNameVersioned;
MakeNotifyIcon();

main_Players.DataSource = new PlayerCollection();
main_Players.Font = new Font("Calibri", 8.25f);
main_Maps.Font = new Font("Calibri", 8.25f);
}
Expand Down

0 comments on commit bc5a0be

Please sign in to comment.