internal static void AddGuildToList(string name) { string selection = Engine.MainWindow.FriendListSelect.Text; FriendGuild guild = new FriendGuild(name, true); if (RazorEnhanced.Settings.Friend.ListExists(selection)) { if (!RazorEnhanced.Settings.Friend.GuildExists(selection, name)) { RazorEnhanced.Settings.Friend.GuildInsert(selection, guild); } } RazorEnhanced.Friend.RefreshGuilds(); }
internal static void UpdateSelectedGuild(int i) { RazorEnhanced.Settings.Friend.GuildRead(FriendListName, out List <RazorEnhanced.Friend.FriendGuild> guilds); if (guilds.Count != Engine.MainWindow.FriendGuildListView.Items.Count) { return; } ListViewItem lvi = Engine.MainWindow.FriendGuildListView.Items[i]; FriendGuild old = guilds[i]; if (lvi != null && old != null) { FriendGuild guild = new Friend.FriendGuild(old.Name, lvi.Checked); RazorEnhanced.Settings.Friend.GuildReplace(RazorEnhanced.Friend.FriendListName, i, guild); } }