private void toolStripMenuItemFileSave_Click(object sender, EventArgs e)
{
if (this.m_file != null)
{
string ext = System.IO.Path.GetExtension(this.m_file).ToLower();
try
{
switch (ext)
{
case ".ifcdoc":
using (FormatSPF format = new FormatSPF(this.m_file, SchemaDOC.Types, this.m_instances))
{
format.InitHeaders(this.m_file, "IFCDOC_10_4");
format.Save();
}
break;
#if MDB
case ".mdb":
using (FormatMDB format = new FormatMDB(this.m_file, SchemaDOC.Types, this.m_instances))
{
format.Save();
}
break;
#endif
}
this.m_modified = false;
}
catch (System.Exception x)
{
MessageBox.Show(x.Message);
}
// then optionally upload if connected to server
if (this.m_server != null)
{
this.toolStripMenuItemPublish_Click(this, EventArgs.Empty);
}
}
else
{
toolStripMenuItemFileSaveAs_Click(sender, e);
}
}