Ejemplo n.º 1
0
 private void Add_Click(object sender, RoutedEventArgs e)
 {
     using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
     {
         if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             var entry = new AnnotatedPathEntry(PathEntry.FromFilePath(dialog.SelectedPath));
             UserPath.Add(entry);
         }
     }
 }
Ejemplo n.º 2
0
        private void CheckPath(AnnotatedPathEntry path)
        {
            path.ClearIssues();
            if (!path.Path.Exists)
            {
                path.AddIssue("Does not exist");
                return;
            }

            listFiles(path.Path.ActualPath)
            .Select(file => new { file = file, hit = FirstDir(file) })
            .Where(fh => fh.hit.Directory.ToLower() != path.Path.ActualPath.ToLower())
            .Each(fh => path.AddIssue(string.Format("{0} shadowed by {1}", fh.file, fh.hit.FullPath)));
        }
Ejemplo n.º 3
0
        private void CheckPath(AnnotatedPathEntry path)
        {
            path.ClearIssues();
            try
            {
                if (!path.Path.Exists)
                {
                    path.AddIssue("Does not exist");
                    path.SeriousError = true;
                    return;
                }

                listFiles(path.Path.ActualPath)
                .Select(file => new { file = file, hit = FirstDir(file) })
                .Where(fh => fh.hit.Directory.ToLower() != path.Path.ActualPath.ToLower())
                .Each(fh => path.AddIssue(string.Format("{0} shadowed by {1}", fh.file, fh.hit.FullPath)));
            }
            catch (Exception ex)
            {
                Debug.Print("Error checking path: {0}", ex);
                path.SeriousError = true;
                path.AddIssue(string.Format("Error checking this path: {0}", ex.Message));
            }
        }
Ejemplo n.º 4
0
 private void Add_Click(object sender, RoutedEventArgs e)
 {
     using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
     {
         if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             var entry = new AnnotatedPathEntry(PathEntry.FromFilePath(dialog.SelectedPath));
             UserPath.Add(entry);
         }
     }
 }
Ejemplo n.º 5
0
        private void CheckPath(AnnotatedPathEntry path)
        {
            path.ClearIssues();
            if (!path.Path.Exists)
            {
                path.AddIssue("Does not exist");
                return;
            }

            listFiles(path.Path.ActualPath)
                .Select(file => new { file=file, hit=FirstDir(file)})
                .Where(fh => fh.hit.Directory.ToLower() != path.Path.ActualPath.ToLower())
                .Each(fh => path.AddIssue(string.Format("{0} shadowed by {1}", fh.file, fh.hit.FullPath)));
        }
Ejemplo n.º 6
0
        private void CheckPath(AnnotatedPathEntry path)
        {
            path.ClearIssues();
            try
            {
                if (!path.Path.Exists)
                {
                    path.AddIssue("Does not exist");
                    path.SeriousError = true;
                    return;
                }

                listFiles(path.Path.ActualPath)
                    .Select(file => new { file=file, hit=FirstDir(file)})
                    .Where(fh => fh.hit.Directory.ToLower() != path.Path.ActualPath.ToLower())
                    .Each(fh => path.AddIssue(string.Format("{0} shadowed by {1}", fh.file, fh.hit.FullPath)));
            }
            catch (Exception ex)
            {
                Debug.Print("Error checking path: {0}", ex);
                path.SeriousError = true;
                path.AddIssue(string.Format("Error checking this path: {0}", ex.Message));
            }
        }