private void ReadLineWrapping(XmlReader reader)
{
if (reader.HasAttributes)
{
while (reader.MoveToNextAttribute())
{
string attrName = reader.Name.ToLower();
switch (attrName)
{
case "mode":
this._lineWrapping_Mode = (LineWrappingMode)Enum.Parse(typeof(LineWrappingMode), reader.Value, true);
break;
case "indentsize":
this._lineWrapping_IndentSize = this.getInt(reader.Value);
break;
case "indentmode":
this._lineWrapping_IndentMode = (LineWrappingIndentMode)Enum.Parse(typeof(LineWrappingIndentMode), reader.Value, true);
break;
case "visualflags":
string flags = reader.Value.Trim();
if (flags != string.Empty)
{
LineWrappingVisualFlags? wvf = null;
foreach (string flag in flags.Split(' '))
wvf |= (LineWrappingVisualFlags)Enum.Parse(typeof(LineWrappingVisualFlags), flag.Trim(), true);
if (wvf.HasValue)
this._lineWrapping_VisualFlags = wvf;
}
break;
case "visualflagslocations":
this._lineWrapping_VisualFlagsLocations = (LineWrappingVisualFlagsLocations)Enum.Parse(typeof(LineWrappingVisualFlagsLocations), reader.Value, true);
break;
}
}
reader.MoveToElement();
}
reader.Skip();
}