/// <summary> /// Method LoadWtsInfoProperties. /// </summary> private void LoadWtsInfoProperties() { var info = NativeMethodsHelper.QuerySessionInformationForStruct <WTSINFO>(this._server.Handle, this._sessionId, WTS_INFO_CLASS.WTSSessionInfo); this._connectState.Value = info.ConnectState; this._incomingStatistics.Value = new ProtocolStatistics(info.IncomingBytes, info.IncomingFrames, info.IncomingCompressedBytes); this._outgoingStatistics.Value = new ProtocolStatistics(info.OutgoingBytes, info.OutgoingFrames, info.OutgoingCompressedBytes); this._windowStationName.Value = info.WinStationName; this._domainName.Value = info.Domain; this._userName.Value = info.UserName; this._connectTime.Value = NativeMethodsHelper.FileTimeToDateTime(info.ConnectTime); this._disconnectTime.Value = NativeMethodsHelper.FileTimeToDateTime(info.DisconnectTime); this._lastInputTime.Value = NativeMethodsHelper.FileTimeToDateTime(info.LastInputTime); this._loginTime.Value = NativeMethodsHelper.FileTimeToDateTime(info.LogonTime); this._currentTime.Value = NativeMethodsHelper.FileTimeToDateTime(info.CurrentTime); }
/// <summary> /// Method LoadWinStationInformationProperties. /// </summary> private void LoadWinStationInformationProperties() { var winStationInfo = NativeMethodsHelper.GetWinStationInformation(this._server.Handle, this._sessionId); this._windowStationName.Value = winStationInfo.WinStationName; this._connectState.Value = winStationInfo.ConnectState; this._connectTime.Value = NativeMethodsHelper.FileTimeToDateTime(winStationInfo.ConnectTime); this._currentTime.Value = NativeMethodsHelper.FileTimeToDateTime(winStationInfo.CurrentTime); this._disconnectTime.Value = NativeMethodsHelper.FileTimeToDateTime(winStationInfo.DisconnectTime); this._lastInputTime.Value = NativeMethodsHelper.FileTimeToDateTime(winStationInfo.LastInputTime); this._loginTime.Value = NativeMethodsHelper.FileTimeToDateTime(winStationInfo.LoginTime); this._userName.Value = winStationInfo.UserName; this._domainName.Value = winStationInfo.Domain; this._incomingStatistics.Value = new ProtocolStatistics(winStationInfo.ProtocolStatus.Input); this._outgoingStatistics.Value = new ProtocolStatistics(winStationInfo.ProtocolStatus.Output); }