/// <summary> /// View a file using a browser /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolShowBtn_Click(object sender, EventArgs e) { IPhoneFile file = (IPhoneFile)fileList.FocusedItem.Tag; IPhoneBackup backup = Model.Backup; FileManager filemanager = FileManager.Current; FileInfo dest = filemanager.GetWorkingFile(backup, file); IBrowsable browser = _browserManger.Get(dest.Extension); try { if (browser != null) { Form form = browser.Open(); if (form != null) { if (browser.Modal) { form.ShowDialog(this); } else { form.Show(); } } } } catch (Exception ex) { Logger.DebugException(ex.Message, ex); MessageBox.Show(string.Format("'{0}' could not be opened by '{1}'" + "\n\n'{2}'" + "\nStacktrace\n{3}", dest.Name, browser.Name, ex.Message, ex.StackTrace), ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } }