Exemplo n.º 1
0
 private void file_Open_Click(object sender, RoutedEventArgs e)
 {
     AnnoModificationManager4.Misc.OpenFileDialog openFileDialog = new AnnoModificationManager4.Misc.OpenFileDialog();
     openFileDialog.Filter = "Valid Files|*.rda;*.sww;*.rdu|All files|*.*";
     bool? nullable = openFileDialog.ShowDialog();
     if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? 1 : 0)) == 0)
         return;
     OpenFile(openFileDialog.FileName, false);
 }
Exemplo n.º 2
0
 private void context_AddFiles_Click(object sender, RoutedEventArgs e)
 {
     AnnoModificationManager4.Misc.OpenFileDialog openFileDialog = new AnnoModificationManager4.Misc.OpenFileDialog();
     openFileDialog.Filter = "All files|*.*";
     openFileDialog.Multiselect = true;
     bool? nullable = openFileDialog.ShowDialog();
     if ((!nullable.GetValueOrDefault() ? 0 : (nullable.HasValue ? 1 : 0)) == 0)
         return;
     foreach (string file in openFileDialog.FileNames)
     {
         string generatedRDAFileName = RDAFile.FileNameToRDAFileName(file, CurrentReader.rdaFolder.FullPath);
         RDAFile rdafile = CurrentReader.rdaFolder.Files.Find((Predicate<RDAFile>)(f => f.FileName == generatedRDAFileName));
         if (rdafile == null)
         {
             RDAFile rdaFile = RDAFile.Create(CurrentReader.rdaFolder.Version, file, CurrentReader.rdaFolder.FullPath);
             if (rdaFile != null)
                 CurrentReader.rdaFolder.Files.Add(rdaFile);
         }
         else
             RDAExplorerGUI.Misc.RDAFileExtension.SetFile(rdafile, file, true);
     }
     RebuildTreeView();
 }