Example #1
0
        public static int DBFWriteDateAttribute(IntPtr intptr_0, int int_0, int int_1, DateTime dateTime_0)
        {
            int num = ShapeLib.DBFWriteDateAttribute_1(intptr_0, int_0, int_1,
                                                       int.Parse(dateTime_0.ToString("yyyyMMdd")));

            return(num);
        }
Example #2
0
        public static int DBFWriteLogicalAttribute(IntPtr intptr_0, int int_0, int int_1, bool bool_0)
        {
            int num;

            num = (!bool_0
                ? ShapeLib.DBFWriteLogicalAttribute_1(intptr_0, int_0, int_1, 'F')
                : ShapeLib.DBFWriteLogicalAttribute_1(intptr_0, int_0, int_1, 'T'));
            return(num);
        }
Example #3
0
        public static DateTime DBFReadDateAttribute(IntPtr intptr_0, int int_0, int int_1)
        {
            DateTime dateTime;
            int      num = ShapeLib.DBFReadDateAttribute_1(intptr_0, int_0, int_1);
            string   str = num.ToString();

            try
            {
                DateTime dateTime1 = new DateTime(int.Parse(str.Substring(0, 4)), int.Parse(str.Substring(4, 2)),
                                                  int.Parse(str.Substring(6, 2)));
                dateTime = dateTime1;
            }
            catch
            {
                dateTime = new DateTime((long)0);
            }
            return(dateTime);
        }
Example #4
0
 public static bool DBFReadLogicalAttribute(IntPtr intptr_0, int int_0, int int_1)
 {
     return(ShapeLib.DBFReadLogicalAttribute_1(intptr_0, int_0, int_1) == "T");
 }