private void LoadGroups() { AccountsFileInteractions accountsFileInteractions = new AccountsFileInteractions(); accountsFileInteractions.RecoverGroups(); foreach (Group Groupobject in accountsFileInteractions.Groups) { string[] row1 = { Groupobject.name }; ListViewItem li = new ListViewItem(row1); listViewGroups.Items.Add(li); groups.Add(Groupobject); } }
private void LoadGroups() { //if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BlueSheep\groups.bs")) //{ // StreamReader reader = new StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BlueSheep\groups.bs"); // while (reader.Peek() > 0) // { // string line = reader.ReadLine(); // } AccountsFileInteractions accountsFileInteractions = new AccountsFileInteractions(); accountsFileInteractions.RecoverGroups(); foreach (Group Groupobject in accountsFileInteractions.Groups) { string[] row1 = { Groupobject.name }; ListViewItem li = new ListViewItem(row1); listViewGroups.Items.Add(li); groups.Add(Groupobject); } //} }