Esempio n. 1
0
        private void ReloadAllActivationData()
        {
            using (WaitCursor wait = new WaitCursor())
            {
                ActivationFinder finder = new ActivationFinder();
                // No Found callback b/c we process final list
                finder.ExceptionListeners += new ActivationFinder.ExceptionHandler(logException);

                // Call routine to actually find & report activations
                m_featureDb.LoadAllData(finder.FindAllActivationsOfAllFeatures());
                m_featureDb.MarkFaulty(finder.GetFaultyFeatureIdList());
                lblFeatureDefinitions.Text = string.Format(
                    "All {0} Features installed in the Farm",
                    m_featureDb.GetAllFeaturesCount());
            }
        }
Esempio n. 2
0
        private void btnLoadAllFeatureActivations_Click(object sender, EventArgs e)
        {
            using (WaitCursor wait = new WaitCursor())
            {
                allFeatureLocations = null;
                ActivationFinder finder = new ActivationFinder();
                // No Found callback b/c we process final list
                finder.ExceptionListeners += new ActivationFinder.ExceptionHandler(logException);

                // Call routine to actually find & report activations
                allFeatureLocations
                    = finder.FindAllActivationsOfAllFeatures();
            }
            string msgtext = string.Format(
                "Locations of {0} features loaded",
                allFeatureLocations.Count
                );
            MessageBox.Show(msgtext);
        }
Esempio n. 3
0
        private List<ActivationFinder.Location> GetFeatureLocations(Guid featureId)
        {
            Dictionary<Guid, List<ActivationFinder.Location>> dict = null;

            if (allFeatureLocations != null)
            {
                // use preloaded data
                dict = allFeatureLocations;
            }
            else
            {
                using (WaitCursor wait = new WaitCursor())
                {
                    ActivationFinder finder = new ActivationFinder();
                    // No Found callback b/c we process final list
                    finder.ExceptionListeners += new ActivationFinder.ExceptionHandler(logException);

                    // Call routine to actually find & report activations
                    dict = finder.FindAllActivations(featureId);
                }
            }
            if (dict.ContainsKey(featureId))
            {
                return dict[featureId];
            }
            else
            {
                return new List<ActivationFinder.Location>(); // empty list
            }
        }
Esempio n. 4
0
        private void btnFindActivatedFeature_Click(object sender, EventArgs e)
        {
            if (clbFeatureDefinitions.CheckedItems.Count != 1)
            {
                MessageBox.Show("Please select exactly 1 feature.");
                return;
            }
            Feature feature = (Feature)clbFeatureDefinitions.CheckedItems[0];

            ActivationFinder finder = new ActivationFinder();
            finder.FoundListeners += delegate(Guid featureId, string url, string name)
            {
                string msgtext = url + " = " + name;
                if (url == name) { msgtext = url; } // farm, farm
                logDateMsg(msgtext);
            };
            finder.ExceptionListeners += new ActivationFinder.ExceptionHandler(logException);

            // Call routine to actually find & report activations
            bool found = finder.FindFirstFeatureActivation(feature.Id);
            if (!found)
            {
                string msgString = "Feature was not found activated in the farm.";
                MessageBox.Show(msgString);
                logDateMsg(msgString);
            }
        }
Esempio n. 5
0
        private void ReloadAllActivationData()
        {
            using (WaitCursor wait = new WaitCursor())
            {
                ActivationFinder finder = new ActivationFinder();
                // No Found callback b/c we process final list
                finder.ExceptionListeners += new ActivationFinder.ExceptionHandler(logException);

                // Call routine to actually find & report activations
                m_featureDb.LoadAllData(finder.FindAllActivationsOfAllFeatures());
            }
        }