public override IsobaricResult ReadFromFile(string fileName)
        {
            IsobaricResult result = new IsobaricResult();

            result.PlexType     = IsobaricScanXmlUtils.GetIsobaricType(fileName);
            result.UsedChannels = IsobaricScanXmlUtils.GetUsedChannels(fileName, result.PlexType);
            result.Comments     = IsobaricScanXmlUtils.GetComments(fileName);

            using (var reader = new IsobaricResultXmlFormatReader())
            {
                reader.Progress      = this.Progress;
                reader.ReadReporters = this.HasReporters && result.UsedChannels != null;
                reader.ReadPeaks     = this.ReadPeaks;
                reader.Accept        = this.Accept;

                reader.OpenFile(fileName);
                IsobaricScan item;
                while (null != (item = reader.Next(result.UsedChannels)))
                {
                    result.Add(item);
                }
            }

            return(result);
        }
        protected IsobaricLabelingExperimentalDesign GetStatisticOption()
        {
            var option = new IsobaricLabelingExperimentalDesign();

            option.DatasetMap   = pnlClassification.GetClassificationSet();
            option.IsobaricFile = iTraqFile.FullName;
            option.References   = GetReferenceFuncs();
            option.PlexType     = IsobaricScanXmlUtils.GetIsobaricType(txtIsobaricXmlFile.Text);

            return(option);
        }
 private void txtXmlFile_TextChanged(object sender, EventArgs e)
 {
     if (File.Exists(txtIsobaricXmlFile.Text))
     {
         try
         {
             refChannels.PlexType = IsobaricScanXmlUtils.GetIsobaricType(txtIsobaricXmlFile.Text);
         }
         catch (Exception ex)
         {
             MessageBox.Show(this, string.Format("Failed to get isobaric type from {0}, error: {1}", txtIsobaricXmlFile.Text, ex.Message));
         }
     }
 }