Ejemplo n.º 1
0
        public static DateTime GetSystemTime()
        {
            SYSTEMTIME stime = new SYSTEMTIME();

            GetSystemTime(ref stime);

            return(stime.ToDateTime().ToLocalTime());
        }
Ejemplo n.º 2
0
        internal ConnectionDetail(CONNMGR_CONNECTION_DETAILED_STATUS item)
        {
            this.Version           = item.dwVer;
            this.AdapterName       = item.szAdapterName;
            this.ConnectionOption  = item.dwFlags;
            this.ConnectionStatus  = item.dwConnectionStatus;
            this.ConnectionSubType = GetConnSubtype(item);
            this.ConnectionType    = item.dwType;
            this.Description       = item.szDescription;
            this.DestinatonNetwork = item.guidDestNet;
            this.DetailStatusParam = item.dwParams;
            this.IPAddress         = item.pIPAddr;
            SYSTEMTIME st = new SYSTEMTIME();

            st.wYear   = item.LastConnectTime[0];
            st.wMonth  = item.LastConnectTime[1];
            st.wDay    = item.LastConnectTime[3];
            st.wHour   = item.LastConnectTime[4];
            st.wMinute = item.LastConnectTime[5];
            st.wSecond = item.LastConnectTime[6];
            this.LastConnectionTime = st.ToDateTime();
        }
Ejemplo n.º 3
0
 public static DateTime ToDateTime(SYSTEMTIME time)
 {
     return(time.ToDateTime());
 }
Ejemplo n.º 4
0
 public static DateTime ToDateTime(SYSTEMTIME time)
 {
     return time.ToDateTime();
 }