void LoadFileDialog() { string temp = options.FileName; OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Multiselect = true; openFileDialog.Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*"; openFileDialog.InitialDirectory = Directory.GetCurrentDirectory(); if (openFileDialog.ShowDialog() == true) { try { options.FileName = openFileDialog.FileName; LoadFile(); } catch (Exception ex) { if (temp != null) { options.FileName = temp; Ada.currentFilename = temp; Ada.ResetComputerState(); UpdatePanels(); } MessageBox.Show("Error loading file:\n" + ex.Message); } } }