Exemplo n.º 1
0
        /// <summary>
        /// Prompts the user for a metadata file and adds to the project.
        /// </summary>
        public void AddMetadataFile()
        {
            var fileName = uiSvc.ShowOpenFileDialog(null);

            if (fileName == null)
            {
                return;
            }
            var projectLoader = new ProjectLoader(
                Services,
                loader,
                this.decompilerSvc.Decompiler.Project,
                this.sc.RequireService <DecompilerEventListener>());

            try
            {
                var metadata = projectLoader.LoadMetadataFile(fileName);
                decompilerSvc.Decompiler.Project.MetadataFiles.Add(metadata);
                RememberFilenameInMru(fileName);
            }
            catch (Exception e)
            {
                uiSvc.ShowError(e, "An error occured while parsing the metadata file {0}", fileName);
            }
        }
Exemplo n.º 2
0
        public void AddMetadataFile()
        {
            var fileName = uiSvc.ShowOpenFileDialog(null);

            if (fileName == null)
            {
                return;
            }
            mru.Use(fileName);
            var projectLoader = new ProjectLoader(Services, loader, this.decompilerSvc.Decompiler.Project);
            var metadata      = projectLoader.LoadMetadataFile(fileName);

            decompilerSvc.Decompiler.Project.MetadataFiles.Add(metadata);
        }