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;
        }
        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();

            ControlsInspector.AddControl(dataGridViewDriverPackages, new ControlDataStateEvaluator(ValidateSelectedPack), "Select driver pack to download");
            dataGridViewDriverPackages.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            Initialized = false;
        }
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            ControlsInspector.AddControl(listViewCollections, new ControlDataStateEvaluator(ValidateSelectedCollections), "Select collections for deployments");

            UtilitiesClass.UpdateListViewColumnsSize(listViewCollections, columnHeaderName);

            Initialized = true;
        }
Beispiel #5
0
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            ControlsInspector.AddControl(dataGridViewDriverPackages, new ControlDataStateEvaluator(ValidateSelectedDriverPackages), "Select packages to import");
            dataGridViewDriverPackages.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            Initialized = false;

            InitializeDataGridView();
        }
Beispiel #6
0
        public AddResourcesListDialog()
        {
            InitializeComponent();

            Title = "Add Resources to Collection";

            Updater.CheckUpdates();

            controlsInspector = new ControlsInspector();
            controlsInspector.AddControl(listViewSelectedResources, new ControlDataStateEvaluator(ValidateResourceValue), "Search for resources");
            controlsInspector.InspectAll();
        }
Beispiel #7
0
        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;
        }
Beispiel #8
0
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            labelDestination.Text = registry.ReadString("DriverSourceFolder");

            ControlsInspector.AddControl(dataGridViewDrivers, new ControlDataStateEvaluator(ValidateSelectedDrivers), "Select drivers to capture");
            dataGridViewDrivers.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            Initialized = false;

            InitializeDataGridView();
        }
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            dataGridViewApplications.Rows.Clear();

            ControlsInspector.AddControl(dataGridViewApplications, new ControlDataStateEvaluator(ValidateSelectedApplications), "Select an application");

            string query = string.Format("SELECT * FROM SMS_Application WHERE IsLatest = 1 AND IsExpired = 1 AND HasContent = 1");

            backgroundWorker = new SmsBackgroundWorker();
            backgroundWorker.QueryProcessorCompleted    += new EventHandler <RunWorkerCompletedEventArgs>(BackgroundWorker_RunWorkerCompleted);
            backgroundWorker.QueryProcessorObjectsReady += new EventHandler <QueryProcessorObjectsEventArgs>(BackgroundWorker_QueryProcessorObjectsReady);
            UseWaitCursor = true;
            QueryProcessor.ProcessQuery(backgroundWorker, query);
        }
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            dataGridViewUpdates.Rows.Clear();
            dataGridViewUpdates.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            ControlsInspector.AddControl(dataGridViewUpdates, new ControlDataStateEvaluator(ValidateSelectedUpdatesPackages), "Select updates to remove");

            string query = string.Format("SELECT SU.CI_ID,SU.LocalizedDisplayName,SU.IsExpired,SU.IsSuperseded,SU.ArticleID FROM SMS_SoftwareUpdate AS SU JOIN SMS_CIRelation AS CIR ON SU.CI_ID = CIR.ToCIID WHERE CIR.RelationType = 1 AND (SU.IsExpired = 1 OR SU.IsSuperseded = 1)");

            backgroundWorker = new SmsBackgroundWorker();
            backgroundWorker.QueryProcessorCompleted    += new EventHandler <RunWorkerCompletedEventArgs>(BackgroundWorker_RunWorkerCompleted);
            backgroundWorker.QueryProcessorObjectsReady += new EventHandler <QueryProcessorObjectsEventArgs>(BackgroundWorker_QueryProcessorObjectsReady);
            UseWaitCursor = true;
            QueryProcessor.ProcessQuery(backgroundWorker, query);
        }
        public override void InitializePageControl()
        {
            base.InitializePageControl();

            dataGridViewCollections.Rows.Clear();
            dataGridViewCollections.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            ControlsInspector.AddControl(dataGridViewCollections, new ControlDataStateEvaluator(ValidateSelectedCollections), "Select collections to disable");

            string query = string.Format("SELECT * FROM SMS_Collection WHERE RefreshType IN (4,6) AND CollectionType = 2 AND CollectionID NOT LIKE 'SMS%'");

            smsBackgroundWorker = new SmsBackgroundWorker();
            smsBackgroundWorker.QueryProcessorCompleted    += new EventHandler <RunWorkerCompletedEventArgs>(BackgroundWorker_RunWorkerCompleted);
            smsBackgroundWorker.QueryProcessorObjectsReady += new EventHandler <QueryProcessorObjectsEventArgs>(BackgroundWorker_QueryProcessorObjectsReady);
            UseWaitCursor = true;
            QueryProcessor.ProcessQuery(smsBackgroundWorker, query);
        }
Beispiel #12
0
 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();
 }