public void Load(BinaryReader reader) { // Clear current list of group settings Groups.Clear(); // Get number of group settings instances int count = reader.ReadInt32(); // Enumerate every instance of group settings for (int i = 0; i < count; i++) { // Get instance of group settings GroupSettings settings = GroupSettings.Parse(reader); // Add group settings to list Groups.Add(settings); } }
public void Load(BinaryReader reader) { // Clear current list of group settings MainWindow.listGroupConfigs.Items.Clear(); // Get number of group settings instances int count = reader.ReadInt32(); // Enumerate every instance of group settings for (int i = 0; i < count; i++) { // Get instance of group settings GroupSettings settings = GroupSettings.Parse(reader); // Create control from settings ControlGroupSettings control = new ControlGroupSettings(settings); // Add instance to group settings items control MainWindow.listGroupConfigs.Items.Add(control); } }