예제 #1
0
 public static DateTime ToDateTime(cef_time_t *ptr)
 {
     return(new DateTime(
                ptr->year,
                ptr->month,
                ptr->day_of_month,
                ptr->hour,
                ptr->minute,
                ptr->second,
                ptr->millisecond,
                DateTimeKind.Utc
                ));
 }
        public static DateTime ToDateTime(cef_time_t *ptr)
        {
            var year = ptr->year;

            if (year > 9999)
            {
                return(s_maxDateTime);
            }
            return(new DateTime(
                       year,
                       ptr->month,
                       ptr->day_of_month,
                       ptr->hour,
                       ptr->minute,
                       ptr->second != 60 ? ptr->second : 59,
                       ptr->millisecond,
                       DateTimeKind.Utc
                       ));
        }
예제 #3
0
 public static extern cef_v8value_t *create_date(cef_time_t *date);
 /// <summary>
 /// Create a new CefV8Value object of type Date. This method should only be
 /// called from within the scope of a CefRenderProcessHandler, CefV8Handler or
 /// CefV8Accessor callback, or in combination with calling Enter() and Exit()
 /// on a stored CefV8Context reference.
 /// </summary>
 public static cef_v8value_t *CreateDate(cef_time_t *date)
 {
     throw new NotImplementedException(); // TODO: CefV8Value.CreateDate
 }