public bool Assemble(string file, Assembler asm, DecompilerHost host) { var ldr = Services.RequireService <ILoader>(); this.Decompiler = CreateDecompiler(ldr, host); var svc = Services.RequireService <IWorkerDialogService>(); svc.StartBackgroundWork("Loading program", delegate() { Decompiler.Assemble(file, asm); }); if (Decompiler.Project == null) { return(false); } var browserSvc = Services.RequireService <IProjectBrowserService>(); browserSvc.Load(Decompiler.Project); if (Decompiler.Project.Programs.Count > 0) { var memSvc = Services.RequireService <ILowLevelViewService>(); memSvc.ViewImage(Decompiler.Project.Programs.First()); } return(false); }
public bool Assemble(string file, Assembler asm) { var ldr = Services.RequireService <ILoader>(); this.Decompiler = CreateDecompiler(ldr); var svc = Services.RequireService <IWorkerDialogService>(); svc.StartBackgroundWork("Loading program", delegate() { Decompiler.Assemble(file, asm); }); if (Decompiler.Project == null) { return(false); } var browserSvc = Services.RequireService <IProjectBrowserService>(); browserSvc.Load(Decompiler.Project); ShowLowLevelWindow(); return(false); }