Exemplo n.º 1
0
        private void AddFolder(object sender, RoutedEventArgs e)
        {
            var dialog = new CommonOpenFileDialog
            {
                IsFolderPicker = true,
            };

            if (dialog.ShowDialog() != CommonFileDialogResult.Ok)
            {
                return;
            }

            var dir = new DirectoryInfo(dialog.FileName);

            if (!dir.Exists)
            {
                return;
            }
            string path = dir + "\\";

            pathfolder = dir.FullName;
            foreach (var fInf in dir.GetDirectories())
            {
                OldNameFolders.Add(new Foldername()
                {
                    Value = fInf.Name, Path = path
                });
                OldNamesFolder.Add(fInf);
            }
        }
Exemplo n.º 2
0
        private void RefreshButton_Clik(object sender, RoutedEventArgs e)
        {
            _actions.Clear();

            // clear all filenames added
            OldNameFiles.Clear();

            // clear all folderames added
            OldNameFolders.Clear();
        }