示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (ofdModsXml.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         OmssaModification.LoadOmssaModifications(ofdModsXml.FileName, true);
         UpdateModsListboxes();
     }
 }
示例#2
0
        public void LoadUserMods(string userModFile)
        {
            OmssaModification.LoadOmssaModifications(userModFile, true);

            listBox1.Items.Clear();
            listBox2.Items.Clear();
            foreach (OmssaModification mod in OmssaModification.GetAllModifications())
            {
                if (mod.Name.Equals("carbamidomethyl C"))
                {
                    listBox2.Items.Add(mod);
                }
                else
                {
                    listBox1.Items.Add(mod);
                }
            }
        }
示例#3
0
        private void frmMain_DragDrop(object sender, DragEventArgs e)
        {
            string[] filepaths = (string[])e.Data.GetData(DataFormats.FileDrop);

            foreach (string filepath in filepaths)
            {
                if (Path.GetExtension(filepath).Equals(".csv", StringComparison.InvariantCultureIgnoreCase) &&
                    !lstOmssaCsvFiles.Items.Contains(filepath))
                {
                    lstOmssaCsvFiles.Items.Add(filepath);
                    UpdateOutputFolder(filepath);
                    UpdateRawFolder(filepath);
                }
                else if (Path.GetExtension(filepath).Equals(".xml", StringComparison.InvariantCultureIgnoreCase))
                {
                    OmssaModification.LoadOmssaModifications(filepath, true);
                    UpdateModsListboxes();
                }
            }
        }