/// <summary> /// Select a backup path /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void openToolStripMenuItem_Click(object sender, EventArgs e) { FolderBrowserDialog from = new FolderBrowserDialog(); from.Description = "Select a iDevice backup to inspect"; from.SelectedPath = IPhoneBackup.DefaultPath; DialogResult result = from.ShowDialog(this); if (result == DialogResult.OK) { IPhoneBackup[] backups = IPhoneBackup.Load(from.SelectedPath); if (backups.Length < 1) { MessageBox.Show("No backups found!"); } else { changeBackupToolStripMenuItem.DropDownItems.Clear(); ToolStripItem[] items = PopulateBackupChangeList(backups); changeBackupToolStripMenuItem.DropDownItems.AddRange(items); SelectBackupForm form = new SelectBackupForm(backups.ToArray()); form.ShowDialog(this); if (form.Selected != null) { SelectBackup(form.Selected); } } } }
/// <summary> /// Select a backup path /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void openToolStripMenuItem_Click(object sender, EventArgs e) { FolderBrowserDialog from = new FolderBrowserDialog(); from.Description = "Select a iDevice backup to inspect"; from.SelectedPath = IPhoneBackup.DefaultPath; DialogResult result = from.ShowDialog(this); if (result == DialogResult.OK) { IPhoneBackup[] backups = IPhoneBackup.Load(from.SelectedPath); if (backups.Length < 1) { MessageBox.Show("No backups found!"); } else { changeBackupToolStripMenuItem.DropDownItems.Clear(); ToolStripItem[] items = PopulateBackupChangeList(backups); changeBackupToolStripMenuItem.DropDownItems.AddRange(items); SelectBackupForm form = new SelectBackupForm(backups.ToArray()); form.ShowDialog(this); if (form.Selected != null) SelectBackup(form.Selected); } } }