public void LoadSettings() { try { _xm.Login(); string raw = _xm.GetConfigFile(AdminPanelConstants.serverTab); _xm.Logout(); string line = string.Empty; using (StringReader sr = new StringReader(raw)) { while ((line = sr.ReadLine()) != null) { line = line.Trim(); if (line == ".") { break; } XMSettingsRow row = XMSettingsRow.Parse(line); if (row != null) { _rows.Add(row); } } } } catch (Exception error) { Log.WriteException(error); } }