コード例 #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(SelectedFolder))
     {
         AvailableFolders.Remove(SelectedFolder);
     }
 }
コード例 #2
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            FolderPickerDialog dlg = new FolderPickerDialog();

            if (dlg.ShowDialog() == true)
            {
                if (!AvailableFolders.Contains(dlg.SelectedPath))
                {
                    AvailableFolders.Add(dlg.SelectedPath);
                    SelectedFolder = dlg.SelectedPath;
                }
            }
        }