예제 #1
0
파일: CellSource.cs 프로젝트: windygu/haina
 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
         {
         }
     }
 }
예제 #2
0
 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
         {
         }
     }
 }
예제 #3
0
 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;
     }
 }
예제 #4
0
 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;
     }
 }
예제 #5
0
 public CellSource(CellSourceType type, object data)
 {
     this.m_srcType = type;
     this.m_oData = data;
 }
예제 #6
0
 public CellSource()
 {
     this.m_srcType = CellSourceType.ColumnIndex;
     this.m_oData = -1;
 }
예제 #7
0
 public CellSource()
 {
     this.m_srcType = CellSourceType.ColumnIndex;
     this.m_oData   = -1;
 }
예제 #8
0
파일: CellSource.cs 프로젝트: windygu/haina
 public CellSource(CellSourceType type, object data)
 {
     this.m_srcType = type;
     this.m_oData   = data;
 }