public static DiagData[] LoadDiagLog(IWin32Window owner) { using (var form = new DiagLogOpenForm()) { return(form.ShowDialog(owner) != DialogResult.OK ? new DiagData[0] : form.diagData.ToArray()); } }
private void btnOpenDiagLog_Click(object sender, EventArgs e) { diagDataLog = DiagLogOpenForm.LoadDiagLog(this); logFileStatusLable.Text = "Log row count: " + diagDataLog.Length; timeBar.Maximum = diagDataLog.Length; }