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