public CellSource(string strValue) { this.m_srcType = CellSourceType.ColumnName; this.m_oData = strValue; if ((strValue == null) || (strValue == "")) { this.m_srcType = CellSourceType.Constant; } if (strValue.StartsWith("'")) { strValue = strValue.TrimStart(new char[] { '\'' }); strValue = strValue.TrimEnd(new char[] { '\'' }); this.m_srcType = CellSourceType.Constant; this.m_oData = strValue; } else if (strValue.StartsWith("\"")) { strValue = strValue.TrimStart(new char[] { '"' }); strValue = strValue.TrimEnd(new char[] { '"' }); this.m_srcType = CellSourceType.Constant; this.m_oData = strValue; } else if (strValue.StartsWith("-") || char.IsDigit(strValue[0])) { try { int num = Convert.ToInt32(strValue); this.m_srcType = CellSourceType.ColumnIndex; this.m_oData = num; } catch { } } }
public CellSource(CellSourceType type, object data) { if ((type == CellSourceType.DisplayMember) && !((bool)data)) { this.m_srcType = CellSourceType.ColumnIndex; data = -1; } else { this.m_srcType = type; this.m_oData = data; } }
public CellSource(CellSourceType type, object data) { if ((type == CellSourceType.DisplayMember) && !((bool) data)) { this.m_srcType = CellSourceType.ColumnIndex; data = -1; } else { this.m_srcType = type; this.m_oData = data; } }
public CellSource(CellSourceType type, object data) { this.m_srcType = type; this.m_oData = data; }
public CellSource() { this.m_srcType = CellSourceType.ColumnIndex; this.m_oData = -1; }