private void btnSaveMotif_Click(object sender, EventArgs e) { if (PA == null) { return; } if (MotifMain == null) { DrawMotifs(); } if (MotifMain == null) { return; } dlgSaveMotif.FileName = ProjectName; DialogResult dlg = dlgSaveMotif.ShowDialog(); if (dlg != DialogResult.OK) { return; } string filename = dlgSaveMotif.FileName; if (Motif.SaveToFile(filename, MotifMain)) { MessageBox.Show(filename + " is saved", Analyzer.ProgramName); } }
private void btnSaveMotif_Click(object sender, EventArgs e) { if (OA == null) { return; } dlgSaveMotif.FileName = ProjectName; DialogResult dlg = dlgSaveMotif.ShowDialog(); if (dlg != DialogResult.OK) { return; } string filename = dlgSaveMotif.FileName; if (Motif == null) { Motif = new Motif(OA.NormalizedPeptideWeights, OA.PositionCaptions, OA.PositiveThreshold, OA.NegativeThreshold); } if (Motif.SaveToFile(filename, Motif)) { MessageBox.Show(filename + " is saved", Analyzer.ProgramName); } }