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; }
private void Reload() { _tweaker.Query(); chkWriteProtect.Checked = _tweaker.LockUsbCopying; chkRegistry.Checked = _tweaker.LockRegistryEditor; chkTaskManager.Checked = _tweaker.LockTaskManager; chkControlPanel.Checked = _tweaker.LockControlPanel; chkWallpaper.Checked = _tweaker.LockWallpaper; chkDesktop.Checked = _tweaker.LockDesktop; chkRaf.Checked = Settings.Default.Raf; if (string.IsNullOrEmpty(_tweaker.WallpaperPath)) { rdWDefault.Checked = true; } else { rdWCustom.Checked = true; lblFileName.Text = Path.GetFileName(_tweaker.WallpaperPath); } }