Exemplo n.º 1
0
        private void AddFile(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 + "\\";

            foreach (var fInf in dir.GetFiles())
            {
                OldNameFiles.Add(new Filename()
                {
                    Value = fInf.Name, Path = path
                });
                OldNamesFile.Add(fInf);
            }
        }
Exemplo n.º 2
0
        private void UpdateOldNameFile()
        {
            var tempList = OldNamesFile.ToList();

            OldNamesFile.Clear();

            foreach (var fInf in tempList)
            {
                fInf.Refresh();
                OldNamesFile.Add(fInf);
            }
        }