private void but_loganalysis_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.ShowDialog(); if (ofd.FileName != "") { string xmlfile = LogAnalyzer.CheckLogFile(ofd.FileName); if (File.Exists(xmlfile)) { var out1 = LogAnalyzer.Results(xmlfile); MissionPlanner.Controls.LogAnalyzer frm = new Controls.LogAnalyzer(out1); frm.Show(); } else { CustomMessageBox.Show("Bad input file"); } } }