public bool OpenPackage(string filename) { if (!System.IO.File.Exists(filename)) { return(false); } return(lp.LoadFromFile(filename)); }
void Activate_miOpen(object sender, System.EventArgs e) { ofd.Filter = ExtensionProvider.BuildFilterString( new SimPe.ExtensionType[] { SimPe.ExtensionType.Package, SimPe.ExtensionType.DisabledPackage, SimPe.ExtensionType.AllFiles } ); if (ofd.ShowDialog() == DialogResult.OK) { package.LoadFromFile(ofd.FileName); } }