コード例 #1
0
ファイル: MainForm.cs プロジェクト: trishorts/Compass
 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();
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: dbaileychess/Compass
        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++;
            }
        }
コード例 #3
0
ファイル: ExitEventArgs.cs プロジェクト: trishorts/Compass
 public ExitEventArgs(DtaFile dtafile)
 {
     DTA = dtafile;
 }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: trishorts/Compass
        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++;
            }
        }
コード例 #5
0
ファイル: ExitEventArgs.cs プロジェクト: dbaileychess/Compass
 public ExitEventArgs(DtaFile dtafile)
 {
     DTA = dtafile;
 }