/// <summary> /// Loads the file containing packets from a connection /// </summary> /// <returns> /// String containing specified flename /// </returns> public string LoadConnectionFile() { // call up the load form var clf = new Tools.CustomLoadForm(); // while an invalid file name is input do { clf.ShowDialog(); // if the inputted file exists if (System.IO.File.Exists(clf.FileNameRequested)) { // load the packets into the file handler var fh = new Tools.FileHandler(); fh.LoadPacketsFromFiles(clf.FileNameRequested); // assign the loaded packets to the awaiting matcher Matcher.ConnectionPackets = CougarPacket.ConvertRawPacketsToCougarPackets(fh.PacketsReadFromFile, fh.SensorIP); } } while (!System.IO.File.Exists(clf.FileNameRequested)); // return the file's name return(clf.FileNameRequested); }
private void loadESO() { var clf = new Tools.CustomLoadForm(); clf.ShowDialog(); if (clf.FileNameRequested != "") { var fh = new Tools.FileHandler(); fh.LoadPacketsFromFiles(clf.FileNameRequested); outBox.Text = clf.FileNameRequested; pmO.ConnectionPackets = CougarPacket.ConvertRawPacketsToCougarPackets(fh.PacketsReadFromFile, fh.SensorIP); } }
/// <summary> /// Loads the file containing packets from a connection /// </summary> /// <returns> /// String containing specified flename /// </returns> public string LoadConnectionFile() { // call up the load form var clf = new Tools.CustomLoadForm(); // while an invalid file name is input do { clf.ShowDialog(); // if the inputted file exists if (System.IO.File.Exists(clf.FileNameRequested)) { // load the packets into the file handler FileHandler.LoadPacketsFromFiles(clf.FileNameRequested); } } while (!System.IO.File.Exists(clf.FileNameRequested)); // return the file's name return(clf.FileNameRequested); }