示例#1
0
        public bool OpenPackage(string filename)
        {
            if (!System.IO.File.Exists(filename))
            {
                return(false);
            }

            return(lp.LoadFromFile(filename));
        }
示例#2
0
 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);
     }
 }