private void ModulesListBox_SelectedIndexChanged(object sender, EventArgs e) { String str = ""; string ext = ""; moduleName = ModulesListBox.SelectedItem.ToString().Substring(1, 11); str = moduleName.Substring(0, 8); str = str.TrimEnd(' '); ext = moduleName.Substring(8, 3); ext = ext.TrimEnd(' '); if (ext != "") { str += "." + ext; } SelectedModuleTextBox.Text = str; string moduleData = ""; ExtractToWindow(ref moduleData); ModuleDataTextBox.Clear(); if (moduleData.Length <= 2 && moduleData[0] == 0x0D) // handle display of "empty" module record { ModuleDataTextBox.Text = "<empty>"; } else // display module record strings in text box { ModuleDataTextBox.Text = moduleData.Substring(0, moduleData.Length - 2); // remove last cr-lf to eliminate blank line in text box } }
private void LoadLibraryButton_Click(object sender, EventArgs e) { ChooseLibraryFile(); LoadLibrary(); Cursor.Current = Cursors.WaitCursor; // show wait cursor ModuleDataTextBox.Clear(); UpdateModuleListTextBox(); Cursor.Current = Cursors.Default; // clear wait cursor }
private void LibraryListBoxItemSelected(object sender, EventArgs e) { LibraryFilesListBoxItem item = new LibraryFilesListBoxItem(); item = (LibraryFilesListBoxItem)LibraryFilesListBox.SelectedItem; SelectedLibraryTextBox.Text = item.FullPath; SelectedModuleTextBox.Clear(); SelectedModuleTextBox.Update(); libraryFileName = item.FileName; libraryFilesFolder = item.FileFolder; LoadLibrary(); ModuleDataTextBox.Clear(); Cursor.Current = Cursors.WaitCursor; // show wait cursor UpdateModuleListTextBox(); Cursor.Current = Cursors.Default; // clear wait cursor }