Ejemplo n.º 1
0
 private static void OpenJunkNodePreview(JunkNode item)
 {
     try
     {
         item.Open();
     }
     catch (Exception ex)
     {
         PremadeDialogs.GenericError(ex);
     }
 }
Ejemplo n.º 2
0
        private static void DisplayDetails(JunkNode item)
        {
            var groups = item.Confidence.ConfidenceParts.GroupBy(part => part.Change > 0).ToList();

            var positives = Localisable.Empty;

            if (groups.Any(x => x.Key))
            {
                var items = groups.First(x => x.Key)
                            .Where(x => x.Reason.IsNotEmpty())
                            .Select(x => x.Reason)
                            .ToArray();
                if (items.Any())
                {
                    positives = string.Join("\n", items);
                }
            }

            var negatives = Localisable.Empty;

            if (groups.Any(x => !x.Key))
            {
                var items = groups.First(x => !x.Key)
                            .Where(x => x.Reason.IsNotEmpty())
                            .Select(x => x.Reason)
                            .ToArray();
                if (items.Any())
                {
                    negatives = string.Join("\n", items);
                }
            }

            MessageBox.Show(string.Format(Localisable.JunkRemove_Details_Message,
                                          item.Confidence.GetRawConfidence(), positives, negatives), Localisable.JunkRemove_Details_Title,
                            MessageBoxButtons.OK, MessageBoxIcon.Information);
        }