Пример #1
0
 public AboutDialogViewModel(ISystemInfoService systemInfoService, IRegionManager regionManager,
                             IMessageService messageService, IDialogService dialogService, IEventAggregator eventAggregator) :
     base(regionManager, dialogService, eventAggregator, messageService)
 {
     _systemInfoService = systemInfoService;
     BindData();
 }
Пример #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            try
            {
                if (String.IsNullOrWhiteSpace(this.txtCompName.Text))
                {
                    MessageBox.Show("Please enter a computer name or IP.", "No system!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    this.Cursor = Cursors.WaitCursor;

                    ClearAllTabControls();
                    InitializeConnection();

                    _sysInfo = new SystemInfoService(_sysConnector.Scope, _sysConnector.Options);
                    var sysInfo = _sysInfo.GetSystemInfo().FirstOrDefault();

                    SetGenericSystemInfo(sysInfo);
                    SetMemoryInfo(sysInfo);
                    SetDiskInfo(sysInfo);
                    SetComputerSystemInfo(sysInfo);

                    this.Cursor = Cursors.Default;
                }
            }
            catch (Exception ex)
            {
                var message = new MessageWindow("Error", ex);
                message.ShowDialog();
                this.Cursor = Cursors.Default;
            }
        }
Пример #3
0
 public SystemInfoController(ISystemInfoService iSystemInfo, ILogger <SystemInfoController> logger, IMapper mapper, IHttpContextAccessor httpContextAccessor)
 {
     _systemInfoService   = iSystemInfo;
     _logger              = logger;
     _mapper              = mapper;
     _httpContextAccessor = httpContextAccessor;
 }
Пример #4
0
        public static IEnumerable <SystemInfoViewModel> GetSystemInfo()
        {
            IEnumerable <SystemInfoViewModel> systemInfo = null;
            ISystemInfoService _sysInfoService           = DependencyResolver.Current.GetService <ISystemInfoService>();

            //var user = GetCurrentUserAsync();
            systemInfo = _sysInfoService.GetSystemInfo(userId: "", showAll: 1);
            return(systemInfo);
        }
Пример #5
0
        public SystemInfoViewModel(ISystemInfoService systemInfoService, IDispatcherService dispatcherService, IClipboardService clipboardService)
        {
            Argument.IsNotNull(() => systemInfoService);
            Argument.IsNotNull(() => dispatcherService);
            Argument.IsNotNull(() => clipboardService);

            _systemInfoService = systemInfoService;
            _dispatcherService = dispatcherService;
            _clipboardService = clipboardService;

            SystemInfo = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>(string.Empty, string.Empty) };

            CopyToClipboard = new Command(OnCopyToClipboardExecute);
        }
Пример #6
0
 public AdministrationController(IMapper mapper,
                                 SignInManager <ApplicationUser> signInManager,
                                 IAdministrationService administrationService,
                                 IBoardService boardService,
                                 ICategoryToModeratorService categoryToModeratorService,
                                 ISystemInfoService systemInfoService)
 {
     _mapper                     = mapper;
     _signInManager              = signInManager;
     _administrationService      = administrationService;
     _boardService               = boardService;
     _categoryToModeratorService = categoryToModeratorService;
     _systemInfoService          = systemInfoService;
 }
Пример #7
0
        public SystemInfoViewModel(ISystemInfoService systemInfoService, IClipboardService clipboardService)
        {
            Argument.IsNotNull(() => systemInfoService);
            Argument.IsNotNull(() => clipboardService);

            _systemInfoService = systemInfoService;
            _clipboardService  = clipboardService;

            SystemInfo = new List <KeyValuePair <string, string> > {
                new KeyValuePair <string, string>(string.Empty, string.Empty)
            };

            CopyToClipboard = new Command(OnCopyToClipboardExecute);
        }
Пример #8
0
        public List <DataTable> GetSystemInfo()
        {
            List <DataTable> dtList = new List <DataTable>();
            DataTable        dtTemp = new DataTable();

            _sysInfo = new SystemInfoService(_scope, _options);
            var sysInfo = _sysInfo.GetSystemInfo().FirstOrDefault();

            dtList.Add(ExtensionMethods.ConvertToDataTable(sysInfo, "System Info"));
            dtList[0].Columns.Remove("Disks");
            dtList[0].Columns.Remove("Drives");
            dtList[0].Columns.Remove("CompSystem");
            dtList.Add(CreateExcelFile.ListToDataTable(sysInfo.Disks, "Disks"));
            dtList.Add(CreateExcelFile.ListToDataTable(sysInfo.CompSystem, "Computer System"));

            return(dtList);
        }
        public SystemInfoViewModel(ISystemInfoService systemInfoService)
        {
            Argument.IsNotNull(() => systemInfoService);

            _systemInfoService = systemInfoService;
        }
Пример #10
0
 public NetworkInfoController(ISystemInfoService service)
 {
     this.service = service;
 }
Пример #11
0
 public SystemInfoController(ISystemInfoService service)
 {
     _service = service;
 }
Пример #12
0
 public TelemetryService(ITelemetryClient telemetry, ISystemInfoService infoService)
 {
     _telemetry   = telemetry;
     _infoService = infoService;
 }
Пример #13
0
 public TelemetryService(ILogger logger, ITelemetryClient telemetry, ISystemInfoService infoService)
 {
     _logger      = logger;
     _telemetry   = telemetry;
     _infoService = infoService;
 }
Пример #14
0
 public HardwareInfoController(ISystemInfoService service)
 {
     this.service = service;
 }
Пример #15
0
 public AboutController(InterpreterManager interpManager, SessionManager sessionManager, ISystemInfoService systemInfo)
 {
     _interpManager  = interpManager;
     _sessionManager = sessionManager;
     _systemInfo     = systemInfo;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StaticTelemetryProperties"/> class.
 /// </summary>
 /// <param name="systemInfo">Interfaces provides system-level information.</param>
 public StaticTelemetryProperties(ISystemInfoService systemInfo)
 {
     _systemInfo = systemInfo;
 }
Пример #17
0
 public RamInfoController(ISystemInfoService service)
 {
     this.service = service;
 }
Пример #18
0
        public SystemInfoViewModel(ISystemInfoService systemInfoService)
        {
            Argument.IsNotNull(() => systemInfoService);

            _systemInfoService = systemInfoService;
        }
Пример #19
0
 public LoadController(ISystemInfoService systemInfo)
 {
     _systemInfo = systemInfo;
     _timer      = new Timer(UpdateMeasurement, null, 0, 3000);
     UpdateMeasurement(null);
 }
Пример #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobInfoFactoryService"/> class.
 /// </summary>
 /// <param name="fileStorageService">Service to access storage.</param>
 /// <param name="logger">Logger object.</param>
 /// <param name="systemInfoService">Service to access system information such as system version.</param>
 public BlobInfoFactoryService(IFileStorageService fileStorageService, ILogger <BlobInfoFactoryService> logger, ISystemInfoService systemInfoService)
 {
     _fileStorageService = fileStorageService;
     _logger             = logger;
     _systemInfoService  = systemInfoService;
 }