Exemplo n.º 1
0
        public static IMEPackage OpenME1Package(string pathToFile, IPackageUser user = null, bool forceLoadFromDisk = false)
        {
            IMEPackage pck = OpenMEPackage(pathToFile, user, forceLoadFromDisk);

            if (pck.Game == MEGame.ME1)
            {
                return(pck);
            }

            pck.Release(user);
            throw new FormatException("Not an ME1 package file.");
        }
Exemplo n.º 2
0
        public static ME1Package OpenME1Package(string pathToFile, WPFBase wpfWindow = null, WinFormsBase winForm = null)
        {
            IMEPackage pck = OpenMEPackage(pathToFile, wpfWindow, winForm);
            ME1Package pcc = pck as ME1Package;

            if (pcc == null)
            {
                pck.Release(wpfWindow, winForm);
                throw new FormatException("Not an ME1 package file.");
            }
            return(pcc);
        }
        public static IMEPackage OpenME1Package(string pathToFile, WPFBase wpfWindow = null, WinFormsBase winForm = null, bool forceLoadFromDisk = false)
        {
            IMEPackage pck = OpenMEPackage(pathToFile, wpfWindow, winForm, forceLoadFromDisk);

            if (pck.Game == MEGame.ME1)
            {
                return(pck);
            }

            pck.Release(wpfWindow, winForm);
            throw new FormatException("Not an ME1 package file.");
        }
Exemplo n.º 4
0
 private void FileHexViewerWPF_OnClosing(object sender, CancelEventArgs e)
 {
     pcc?.Release();
     Interpreter_Hexbox_Host.Dispose();
     Interpreter_Hexbox_Host.Child = null;
 }
Exemplo n.º 5
0
 public void LoadMEPackage(string s)
 {
     pcc?.Release(winForm: this);
     pcc = MEPackageHandler.OpenMEPackage(s, winForm: this);
 }
Exemplo n.º 6
0
 public void LoadMEPackage(string s)
 {
     pcc?.Release(wpfWindow: this);
     pcc = MEPackageHandler.OpenMEPackage(s, wpfWindow: this);
 }