private void BackgroundWorkerQueryMachine_QueryProcessorCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if (e.Error != null) { SccmExceptionDialog.ShowDialog(this, e.Error, "Error"); } else if (e.Cancelled) { if (listViewSelectedResources.Items.Count > 0) { listViewSelectedResources.Items[0].Selected = true; listViewSelectedResources.Items[0].Focused = true; } } else if (listViewSelectedResources.Items.Count > 0) { listViewSelectedResources.Items[0].Selected = true; listViewSelectedResources.Items[0].Focused = true; } } finally { backgroundWorkerQueryMachine.Dispose(); backgroundWorkerQueryMachine = null; UseWaitCursor = false; buttonSearch.Focus(); buttonSearch.Text = "Search"; searchCompleteTime = DateTime.Now.Ticks; controlsInspector.InspectAll(); UtilitiesClass.UpdateListViewColumnsSize(listViewSelectedResources, columnMachineName); } }
private void ButtonSelectCollections_Click(object sender, EventArgs e) { using (BrowseCollectionDialog collectionDialog = new BrowseCollectionDialog(ConnectionManager)) { collectionDialog.MultiSelect = true; collectionDialog.CollectionType = CollectionType.Device; if (collectionDialog.ShowDialog(this) != DialogResult.OK) { return; } foreach (IResultObject collection in collectionDialog.SelectedCollections) { listViewCollections.Items.Add(new ListViewItem() { Text = collection["Name"].StringValue, SubItems = { collection["CollectionID"].StringValue }, Tag = collection }); } listViewCollections.Focus(); UtilitiesClass.UpdateListViewColumnsSize(listViewCollections, columnHeaderName); } ControlsInspector.InspectAll(); }
public override void InitializePageControl() { base.InitializePageControl(); browseFolderControlSource.Controls.OfType <SmsOsdTextBox>().First().Text = registry.ReadString("DriverSourceFolder"); browseFolderControlPackage.Controls.OfType <SmsOsdTextBox>().First().Text = registry.ReadString("DriverPackageFolder"); //checkBoxQuickMerge.Checked = registry.ReadBool("DriverPackageQuickMerge"); textBoxConsoleFolder.Text = registry.ReadString("DriverPackageConsoleFolder"); checkBoxLegacyFolder.Checked = registry.ReadBool("LegacyFolderStructure"); ControlsInspector = new ControlsInspector(); controlsValidator = new ControlsValidator(ControlsInspector); browseFolderControlSource.SetErrorMessageFolderPath("Specify a valid UNC path"); browseFolderControlSource.SetCustomValidateFilePath(new ControlDataStateEvaluator(ValidateSourceDirectory)); browseFolderControlSource.SetValidator(controlsValidator); browseFolderControlPackage.SetErrorMessageFolderPath("Specify a valid UNC path"); browseFolderControlPackage.SetCustomValidateFilePath(new ControlDataStateEvaluator(ValidatePackageDirectory)); browseFolderControlPackage.SetValidator(controlsValidator); ControlsInspector.InspectAll(); Dirty = false; Initialized = true; }
public AddResourcesListDialog() { InitializeComponent(); Title = "Add Resources to Collection"; Updater.CheckUpdates(); controlsInspector = new ControlsInspector(); controlsInspector.AddControl(listViewSelectedResources, new ControlDataStateEvaluator(ValidateResourceValue), "Search for resources"); controlsInspector.InspectAll(); }
public override void InitializePageControl() { base.InitializePageControl(); if (string.IsNullOrEmpty(registry.ReadString("DellCatalogURI"))) { registry.Write("DellCatalogURI", "http://downloads.dell.com/catalog/DriverPackCatalog.cab"); } if (string.IsNullOrEmpty(registry.ReadString("HPCatalogURI"))) { registry.Write("HPCatalogURI", "https://ftp.hp.com/pub/caps-softpaq/cmit/HPClientDriverPackCatalog.cab"); } if (string.IsNullOrEmpty(registry.ReadString("TempDownloadPath"))) { registry.Write("TempDownloadPath", Path.GetTempPath()); } if (string.IsNullOrEmpty(registry.ReadString("DellFolderPrefix"))) { registry.Write("DellFolderPrefix", "Dell"); } if (string.IsNullOrEmpty(registry.ReadString("HPFolderPrefix"))) { registry.Write("HPFolderPrefix", "HP"); } checkBoxWipeSource.Checked = registry.ReadString("WipeSource") == "" ? true : registry.ReadBool("WipeSource"); textBoxDellCatalogUri.Text = registry.ReadString("DellCatalogURI"); textBoxDellPrefix.Text = registry.ReadString("DellFolderPrefix"); textBoxHPCatalogUri.Text = registry.ReadString("HPCatalogURI"); textBoxHPPrefix.Text = registry.ReadString("HPFolderPrefix"); browseFolderControlDownload.Controls.OfType <SmsOsdTextBox>().First().Text = registry.ReadString("TempDownloadPath"); ControlsInspector = new ControlsInspector(); controlsValidator = new ControlsValidator(ControlsInspector); browseFolderControlDownload.SetErrorMessageFolderPath("Specify a valid path"); browseFolderControlDownload.SetCustomValidateFilePath(new ControlDataStateEvaluator(ValidateDownloadDirectory)); browseFolderControlDownload.SetValidator(controlsValidator); ControlsInspector.InspectAll(); Dirty = false; Initialized = true; }
private void DataGridViewDrivers_CellValueChanged(object sender, DataGridViewCellEventArgs e) { ControlsInspector.InspectAll(); Dirty = !ReadOnly; }
public override void OnActivated() { ControlsInspector.InspectAll(); base.OnActivated(); }
private void ButtonClear_Click(object sender, EventArgs e) { listViewCollections.Items.Clear(); ControlsInspector.InspectAll(); }