/// <summary>
 /// Handles the ClusteringCompleted event
 /// </summary>
 /// <param name="args">The arguments for the event</param>
 public void ClusteringCompletedEventHandler(ClusteringCompletedEventArgs args)
 {
     if (args.ClusteringActive)
     {
         IsChecked = true;
         OnToolbarItemSelected(EventArgs.Empty);
     }
 }
 /// <summary>
 /// Handles the ClusteringCompleted event
 /// </summary>
 /// <param name="args">The arguments for the event</param>
 public void ClusteringCompletedEventHandler(ClusteringCompletedEventArgs args)
 {
     IsEnabled = !args.ClusteringActive;
 }
        /// <summary>
        /// Handles the ClusteringCompleted event
        /// </summary>
        /// <param name="args">The arguments for the event</param>
        public void ClusteringCompletedEventHandler(ClusteringCompletedEventArgs args)
        {
            IsEnabled = !args.ClusteringActive;

            if (!args.ClusteringActive)
                IsChecked = false;
        }
        /// <summary>
        /// Handles the ClusteringCompleted event
        /// </summary>
        /// <param name="args">The arguments for the event</param>
        public void ClusteringCompletedEventHandler(ClusteringCompletedEventArgs args)
        {
            IsActive = true;
                OnClusteringFinished(new ClusteringEventArgs(AttributeSimilarityManager.Instance.GetAttributesWithWeights(), args.SimilarityValues));

                // Ensure that clustering has been performed and that
                // Exact (if in simple mode) is not selected
                if (IsActive)
                {
                    // Save thresholds
                    if (args.SimilarityValues != null)
                    {
                        thresholdValues = args.SimilarityValues.OrderBy(value => value).ToList<double>();

                        // Check if we have more than one value returned
                        if (thresholdValues.Count > 1)
                        {
                            NumberOfThresholds = thresholdValues.Count;

                            // Update the currently set threshold value if no
                            // threshold was previously used
                            if (double.IsNaN(args.ThresholdUsed))
                                SimilarityThresholdValue = thresholdValues.Count;

                            IsThresholdSliderEnabled = true;
                        }
                        else
                            IsThresholdSliderEnabled = false;

                        // TODO:  NEED TO KNOW IF MULTIPLE ATTRIBUTES WERE SELECTED AND IF THEY WERE BOTH SET TO EXACT OR NOT
                    }
                }
                else
                {
                    thresholdValues.Clear();
                    IsThresholdSliderEnabled = false;
                }
        }