Example #1
0
 private void RemoveFiles(IEnumerable <string> objectstoRemove)
 {
     if (DTAFiles != null)
     {
         DtaFile toRemove = null;
         foreach (string obj in objectstoRemove)
         {
             bool remove = false;
             foreach (DtaFile dtaFile in DTAFiles)
             {
                 if (remove = (dtaFile.Name == obj))
                 {
                     toRemove = dtaFile;
                     break;
                 }
             }
             if (remove)
             {
                 DTAFiles.Remove(toRemove);
             }
         }
         UpdateDtaList();
     }
 }
Example #2
0
        private void StartNextSearch()
        {
            if(InvokeRequired)
            {
                Invoke(new StartNextSearchCallBack(StartNextSearch));
            }
            else
            {
                if(DtaIndex == 0)
                {
                    pictureBox1.Image = imageList1.Images["rotating"];
                    pictureBox1.Show();
                    ArgumentLine.SetDataBase("\"\\\"" + DataBase.FullPathWithoutExtension + "\\\"\"");
                    if(usermodsCB.Checked && UserMod != null)
                    {
                        ArgumentLine.SetUserModFile("\"" + UserMod.FilePath + "\"");
                    }
                }
                else
                {
                    foreach(ResultFile result in CurrentDTA.ResultFiles)
                    {
                        UpdateStatus(result.NameWithExt + " was created");
                    }
                }
                if(DtaIndex >= DTAFiles.Count)
                {
                    UpdateStatus("Searching Completed");
                    pictureBox1.Image = imageList1.Images["success"];
                    pictureBox1.Visible = true;
                    statusLabel.Text = "Searching Completed";
                    dtafileLB.ClearSelected();
                    DisableAll(true);
                    pictureBox2.Visible = false;
                    return;
                }
                CurrentDTA = DTAFiles[DtaIndex];
                dtafileLB.ClearSelected();
                dtafileLB.SelectedIndex = DtaIndex;
                UpdateStatus("Searching " + CurrentDTA.Name + "...");
                ArgumentLine.SetInputFile(CurrentDTA.FilePath);

                // Output Files
                if(ocCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.Csv);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                if(oxCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.Xml);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                if(opCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.PepXml);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                CurrentDTA.Arguments = ArgumentLine;
                UpdateStatus("Searching with the Following Parameters:");
                UpdateStatus(ArgumentLine.ToString());
                Omssa.StartSearch(ArgumentLine);
                DtaIndex++;
            }
        }
Example #3
0
 public ExitEventArgs(DtaFile dtafile)
 {
     DTA = dtafile;
 }
Example #4
0
        private void StartNextSearch()
        {
            if (InvokeRequired)
            {
                Invoke(new StartNextSearchCallBack(StartNextSearch));
            }
            else
            {
                if (DtaIndex == 0)
                {
                    pictureBox1.Image = imageList1.Images["rotating"];
                    pictureBox1.Show();
                    ArgumentLine.SetDataBase("\"\\\"" + DataBase.FullPathWithoutExtension + "\\\"\"");
                    if (usermodsCB.Checked && UserMod != null)
                    {
                        ArgumentLine.SetUserModFile("\"" + UserMod.FilePath + "\"");
                    }
                }
                else
                {
                    foreach (ResultFile result in CurrentDTA.ResultFiles)
                    {
                        UpdateStatus(result.NameWithExt + " was created");
                    }
                }
                if (DtaIndex >= DTAFiles.Count)
                {
                    UpdateStatus("Searching Completed");
                    pictureBox1.Image   = imageList1.Images["success"];
                    pictureBox1.Visible = true;
                    statusLabel.Text    = "Searching Completed";
                    dtafileLB.ClearSelected();
                    DisableAll(true);
                    pictureBox2.Visible = false;
                    return;
                }
                CurrentDTA = DTAFiles[DtaIndex];
                dtafileLB.ClearSelected();
                dtafileLB.SelectedIndex = DtaIndex;
                UpdateStatus("Searching " + CurrentDTA.Name + "...");
                ArgumentLine.SetInputFile(CurrentDTA.FilePath);

                // Output Files
                if (ocCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.Csv);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                if (oxCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.Xml);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                if (opCB.Checked)
                {
                    string outputfile = ArgumentLine.SetOutputFile(Path.Combine(OutputFilePath, CurrentDTA.Name), OutputFileType.PepXml);
                    CurrentDTA.AddResult(new ResultFile(outputfile, OutputFilePath));
                }
                CurrentDTA.Arguments = ArgumentLine;
                UpdateStatus("Searching with the Following Parameters:");
                UpdateStatus(ArgumentLine.ToString());
                Omssa.StartSearch(ArgumentLine);
                DtaIndex++;
            }
        }
Example #5
0
 public ExitEventArgs(DtaFile dtafile)
 {
     DTA = dtafile;
 }