private void generateChangeLogToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult res = this.openFileDialogChanges.ShowDialog(this);
if (res != DialogResult.OK)
return;
Dictionary<long, SEntity> instances = new Dictionary<long, SEntity>();
this.m_loading = true;
try
{
using (FormatSPF format = new FormatSPF(this.openFileDialogChanges.FileName, SchemaDOC.Types, instances))
{
format.Load();
}
}
catch(Exception x)
{
MessageBox.Show(x.Message);
return;
}
finally
{
this.m_loading = false;
}
// now import changes
DocProject docProjectBase = null;
foreach (SEntity o in instances.Values)
{
if (o is DocProject)
{
docProjectBase = (DocProject)o;
break;
}
}
ChangeLogGenerator.Generate(docProjectBase, this.m_project);
this.LoadTree();
}