public string Read(string fileName) { // create a new instance of the binary file reader if (this.readerWriterBinarySpikes != null) { this.readerWriterBinarySpikes.Close(); } this.readerWriterBinarySpikes = new ReaderWriterBinarySpikes(); // open the file for reading string returnString = this.readerWriterBinarySpikes.Read(fileName); if (returnString != "0") { return(returnString); } // set the viewer top axis label to the file name string[] fileParts = fileName.Split('\\'); this.layoutScatterFull.LayoutScatter.AxisPanel.TopAxisLabel = fileParts[fileParts.Length - 1]; this.layoutScatterFull.LayoutScatter.AxisPanel.TopAxisLabelShow = true; this.SetupElements(); return("0"); }
public void Close() { if (this.readerWriterBinarySpikes != null) { this.readerWriterBinarySpikes.Close(); this.readerWriterBinarySpikes = null; } // remove the options menu from the main menu (if we added it) if (this.mainMenu != null) { this.mainMenu.MenuItems.Remove(this.optionsMenuItem); } }