private void CompareTFButton_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); List <Vector <double> > ZList = new List <Vector <double> >(); List <Vector <Complex> > SrList = new List <Vector <Complex> >(); ofd.InitialDirectory = @"C:\Users\ConraN01\Documents\Spyder_WS\MRI_RF_TF_Tool_Project\Test Files for Python Utility\Neuro Orion MRI RF Heating TF Files"; ofd.Multiselect = true; ofd.Filter = "Matlab MAT (*.mat)|*.mat|All Files (*.*)|*.*"; if (ofd.ShowDialog() != DialogResult.OK) { return; } if (ofd.FileNames.Length == 0) { MessageBox.Show(this, "No files selected", "TF Reading Error"); } try { foreach (string f in ofd.FileNames) { ZList.Add(MatlabReader.Read <double>(f, "z").Column(0)); SrList.Add(MatlabReader.Read <Complex>(f, "Sr").Column(0)); } } catch (Exception ex) { MessageBox.Show(this, ex.ToString(), "TF Reading Error"); return; } TFComparisonForm tfcf = new TFComparisonForm(ofd.FileNames, ZList, SrList); tfcf.Show(); }
private void ViewTFButton_Click(object sender, EventArgs e) { var shortfname = TransferFunctionFilenameLabel.Text; TFComparisonForm tfcf = new TFComparisonForm( new string[] { shortfname }, new Vector <double>[] { TFz }, new Vector <Complex>[] { TFSr }, shortfname ); tfcf.Show(this); }