public bool ReadFromString(string s) { s = s.Replace(Constants.FlexModelCommDelim, "~"); var tok = s.Split('~'); if (tok.Length > 0) { var items = tok[0].Split(new[] { '%' }, StringSplitOptions.RemoveEmptyEntries); foreach (var itemStr in items) { var item = new CMorphForm(); if (!item.ReadFromString(itemStr)) { return false; } _flexia.Add(item); } } if (tok.Length > 1) { _comments = tok[1]; } return true; }
public bool ReadFromString(string s) { s = s.Replace(Constants.FlexModelCommDelim, "~"); var tok = s.Split('~'); if (tok.Length > 0) { var items = tok[0].Split(new[] { '%' }, StringSplitOptions.RemoveEmptyEntries); foreach (var itemStr in items) { var item = new CMorphForm(); if (!item.ReadFromString(itemStr)) { return(false); } _flexia.Add(item); } } if (tok.Length > 1) { _comments = tok[1]; } return(true); }