Пример #1
0
        public void Load()
        {
            try
            {
                _infoService.Query();
                LogDevice();

                _logger.Debug("Sending telemetry");
                Task.WaitAll(
                    _telemetry.SendTelemetry(new UserEngagementModel
                {
                    DeviceId = _infoService.DeviceId,
                    AppName  = "kflearning",
                    Event    = "app_start"
                }),
                    _telemetry.SendIdentification(new DeviceIdentificationModel
                {
                    DeviceId     = _infoService.DeviceId,
                    CPU          = _infoService.CPU,
                    RAM          = _infoService.RAM,
                    OS           = _infoService.OS,
                    Architecture = _infoService.Architecture
                })
                    );
            }
            catch (Exception ex)
            {
                _logger.Error("Cannot post telemetry data", ex);
            }
        }
Пример #2
0
 public void Load()
 {
     try
     {
         _infoService.Query();
         Task.WaitAll(
             _telemetry.SendTelemetry(new UserEngagementModel
         {
             DeviceId = _infoService.DeviceId,
             AppName  = "kfmaintenance",
             Event    = "app_start"
         }),
             _telemetry.SendIdentification(new DeviceIdentificationModel
         {
             DeviceId     = _infoService.DeviceId,
             CPU          = _infoService.CPU,
             RAM          = _infoService.RAM,
             OS           = _infoService.OS,
             Architecture = _infoService.Architecture
         })
             );
     }
     catch (Exception)
     {
         // ignore
     }
 }
Пример #3
0
        protected override void OnLoad(EventArgs e)
        {
            // app version
            lblVersion.Text = PathHelpers.GetVersionString();

            // listen remote shutdowns
            _remoteService.ShutdownRequested += RemoteService_ShutdownRequested;
            _remoteService.Listen();

            // fill diagnostics
            _infoService.Query();
            lblOS.Text        = _infoService.OS;
            lblOSVersion.Text = _infoService.OSVersion;
            lblOSArch.Text    = _infoService.Architecture;
            lblRam.Text       = _infoService.RAM.ToString();
            lblCpu.Text       = _infoService.CPU;

            // system registry
            _systemTweaker.Query();
            chkWriteProtect.Checked = _systemTweaker.LockUsbCopying;
            chkRegistry.Checked     = _systemTweaker.LockRegistryEditor;
            chkTaskManager.Checked  = _systemTweaker.LockTaskManager;
            chkControlPanel.Checked = _systemTweaker.LockControlPanel;
            chkDesktop.Checked      = _systemTweaker.LockDesktop;
            chkWallpaper.Checked    = _systemTweaker.LockWallpaper;
            pnWallpaper.Enabled     = _systemTweaker.LockWallpaper;
            if (_systemTweaker.WallpaperPath == null)
            {
                rdWDefault.Checked   = true;
                chkWallpaper.Checked = false;
            }
            else
            {
                rdWCustom.Checked = true;
                lblFileName.Text  = _systemTweaker.WallpaperPath;
            }

            // app settings
            txtCluster.Text = Settings.Default.Cluster;
        }