Exemplo n.º 1
0
        public virtual void LoadScript(string scriptFilename, OllyScript script)
        {
            // If the script file is not a rooted path, first try looking at
            // the current directory. If there is no file there, try finding
            // it in the installation directory.
            var fsSvc = Services.RequireService <IFileSystemService>();

            if (!fsSvc.IsPathRooted(scriptFilename))
            {
                string curDir  = fsSvc.GetCurrentDirectory();
                var    absPath = Path.Combine(curDir, scriptFilename);
                if (fsSvc.FileExists(absPath))
                {
                    scriptFilename = absPath;
                }
                else
                {
                    var dir = Path.GetDirectoryName(GetType().Assembly.Location);
                    absPath        = Path.Combine(dir, scriptFilename);
                    scriptFilename = absPath;
                }
            }
            script.LoadFile(scriptFilename, null);
        }
Exemplo n.º 2
0
 public virtual void LoadScript(string scriptFilename, OllyScript script)
 {
     script.LoadFile(scriptFilename, null);
 }
Exemplo n.º 3
0
 public virtual void LoadScript(string scriptFilename, OllyScript script)
 {
     script.LoadFile(scriptFilename, null);
 }