public WsServerNodeStateViewModel(IWsServerNode data) { _address = data.Address; _description = data.Description; _minerClientWsSessionCount = data.MinerClientWsSessionCount; _minerStudioWsSessionCount = data.MinerStudioWsSessionCount; _minerClientSessionCount = data.MinerClientSessionCount; _minerStudioSessionCount = data.MinerStudioSessionCount; _osInfo = data.OSInfo; _totalPhysicalMemory = data.TotalPhysicalMemory; _availablePhysicalMemory = data.AvailablePhysicalMemory; _cpuPerformance = data.CpuPerformance; _processMemoryMb = data.ProcessMemoryMb; _threadCount = data.ThreadCount; _handleCount = data.HandleCount; _availableFreeSpaceInfo = data.AvailableFreeSpaceInfo; _cpu = data.Cpu; _cpuVm = new CpuDataViewModel(data.Cpu); this.RemoteDesktop = new DelegateCommand(() => { #region AppRoot.RemoteDesktop?.Invoke(new RdpInput(GetRemoteDesktopIp(), "administrator", string.Empty, string.Empty, onDisconnected: message => { VirtualRoot.Out.ShowError(message, autoHideSeconds: 4, toConsole: true); })); #endregion }); }
public WebApiServerStateViewModel(IWebApiServerState data) { _description = data.Description; _oSInfo = data.OSInfo; _totalPhysicalMemory = data.TotalPhysicalMemory; _address = data.Address; _cpuPerformance = data.CpuPerformance; _availablePhysicalMemory = data.AvailablePhysicalMemory; _cpu = data.Cpu; _cpuVm = new CpuDataViewModel(data.Cpu); _wsServerNodes = data.WsServerNodes; _wsServerNodeVms = new ObservableCollection <WsServerNodeStateViewModel>(data.WsServerNodes.Select(a => new WsServerNodeStateViewModel(a))); }
public WsServerNodeStateViewModel(IWsServerNode data) { _address = data.Address; _description = data.Description; _minerClientWsSessionCount = data.MinerClientWsSessionCount; _minerStudioWsSessionCount = data.MinerStudioWsSessionCount; _minerClientSessionCount = data.MinerClientSessionCount; _minerStudioSessionCount = data.MinerStudioSessionCount; _osInfo = data.OSInfo; _totalPhysicalMemory = data.TotalPhysicalMemory; _availablePhysicalMemory = data.AvailablePhysicalMemory; _cpuPerformance = data.CpuPerformance; _cpu = data.Cpu; _cpuVm = new CpuDataViewModel(data.Cpu); }
public WebApiServerStateViewModel(IWebApiServerState data) { _description = data.Description; _oSInfo = data.OSInfo; _totalPhysicalMemory = data.TotalPhysicalMemory; _address = data.Address; _cpuPerformance = data.CpuPerformance; _availablePhysicalMemory = data.AvailablePhysicalMemory; _processMemoryMb = data.ProcessMemoryMb; _threadCount = data.ThreadCount; _handleCount = data.HandleCount; _availableFreeSpaceInfo = data.AvailableFreeSpaceInfo; _captchaCount = data.CaptchaCount; _cpu = data.Cpu; _cpuVm = new CpuDataViewModel(data.Cpu); _wsServerNodes = data.WsServerNodes; _wsServerNodeVms = new ObservableCollection <WsServerNodeStateViewModel>(data.WsServerNodes.Select(a => new WsServerNodeStateViewModel(a))); }