private void doUnpack(object files) { string input = ((string[])files)[0]; string output = ((string[])files)[1]; try { WAD w = new WAD(); w.LoadFile(input); w.Unpack(output, false); } catch (Exception ex) { Environment.Exit(0); } }
private void doUnpack(object files) { setControls(false, false); string input = ((string[])files)[0]; string output = ((string[])files)[1]; try { WAD w = new WAD(); w.Progress +=new EventHandler<System.ComponentModel.ProgressChangedEventArgs>(unpack_Progress); w.LoadFile(input); w.Unpack(output, cidName); MessageBox.Show("Successfully unpacked WAD to:\n" + output, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { setControls(true, false); } }