in src/IdFix/FormApp.cs [674:717]
private void undoUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.Filter = StringLiterals.UpdateFileFilter;
openFileDialog.Title = StringLiterals.UndoUpdates;
openFileDialog.ShowDialog();
if (!String.IsNullOrEmpty(openFileDialog.FileName))
{
//First reset firstRun
firstRun = false;
statusDisplay(StringLiterals.LoadingUpdates);
this.Invoke(new Action(() =>
{
grid.Columns[StringLiterals.Update].ReadOnly = true;
grid.Rows.Clear();
action.Items.Clear();
action.Items.Add(StringLiterals.Undo);
action.Items.Add(StringLiterals.Complete);
editActionToolStripMenuItem.Visible = false;
removeActionToolStripMenuItem.Visible = false;
undoActionToolStripMenuItem.Visible = true;
using (StreamReader reader = new StreamReader(openFileDialog.FileName))
{
this.grid.SetFromLdf(reader, true);
}
EnableButtons();
statusDisplay(StringLiterals.ActionSelection);
}));
}
}
}
catch (Exception ex)
{
statusDisplay(StringLiterals.Exception + toolStripStatusLabel1.Text + " " + ex.Message);
throw;
}
}