/// <summary> /// Initializes a new Steam GUI. /// </summary> public SteamGUI() { InitializeComponent(); _log = LogManager.GetLogger(this); _log.Info("SteamGUI is initializing..."); _steamClosed = false; sendButton.Enabled = false; nameLabel.Text = SteamManager.GetName(); statusLabel.Text = SteamManager.GetStatus(true); friendsLabel.Text = string.Format(FriendFormat, SteamManager.FriendList.GetFriendCount(true), SteamManager.FriendList.GetFriendCount()); foreach (var friend in SteamManager.FriendList.GetFriends()) { var item = new ListViewItem(new[] { friend.GetName(), friend.GetStatus(true) }) { Tag = friend.SteamID }; friendList.Items.Add(item); } SteamManager.FriendList.OnFriendsUpdate += UpdateData; _log.Debug("SteamGUI is registering to OnSteamClose event..."); SteamManager.OnSteamClose += SteamClose; _log.Debug("SteamGUI is registering to OnMinecraftData event..."); SteamManager.OnMinecraftData += UpdateMinecraftdata; _log.Info("SteamGUI loaded!"); }