public cross_cell(cross_word cw, string data, ref int count) { data = HttpUtility.HtmlDecode(data); crossWord = cw; if (data == "-") { type = cross_cell_Type.empty; return; } if (data.IndexOf('@') >= 0) { type = cross_cell_Type.header; data = data.Trim(new char[] { '@' }); value = data; //if (data.Length == 1) value = data[0]; return; } type = data.IndexOf('*') >= 0 ? cross_cell_Type.answer : cross_cell_Type.normal; if (data.IndexOf('_') >= 0) delimiter = data.IndexOf('|') >= 0 ? cross_cell_Delimiter.both : cross_cell_Delimiter.bottom; else delimiter = data.IndexOf('|') >= 0 ? cross_cell_Delimiter.right : cross_cell_Delimiter.no; data = data.Trim(new char[] { '*', '_', '|', '@' }); if (data.Length != 1) throw new Exception(); value = data; count++; this.varNameLow = string.Format("{0}{1}", cw.varName, count); }
public cross_line(cross_word cw, List<string> data, ref int count) { cells = new cross_cell[data.Count]; for (int i = 0; i < data.Count; i++) cells[i] = new cross_cell(cw, data[i], ref count); }